Giter Site home page Giter Site logo

Comments (5)

allinurl avatar allinurl commented on June 4, 2024 1

Thanks a bunch for sharing this. It's really helpful! I've just pushed a commit that I think should fix this problem. Please rebase from master and give it a try. Let me know if it resolves the issue on your side.

from goaccess.

sascha-egerer avatar sascha-egerer commented on June 4, 2024 1

Thank you! That solved the issue. Running multithreaded really is a big deal!
Thank you for doing such a good job. With the product but also with the communication regarding issues. Keep up the good work!

from goaccess.

allinurl avatar allinurl commented on June 4, 2024

I appreciate you reporting this issue. Unfortunately right now I don't have access to an M1 to debug it hands-on. Would you be able to run goaccess in debug mode on your Mac using gdb or lldb and provide any details?

$ ./configure --enable-debug --enable-geoip=mmdb --enable-utf8
$ make
$ gdb --args ./goaccess goaccess --jobs=6 --datetime-format='%d/%b/%Y:%H:%M:%S %z' --log-format ...
(gdb) r <enter>
(gdb) bt full <enter>

from goaccess.

sascha-egerer avatar sascha-egerer commented on June 4, 2024

I'm sorry but I have no idea about C programming and debugging. It is probably also the case that there is no gdb for the M1 architecture. I therefore used lldb. I would be happy to help if you can give me more info on what I should/can do.

$ LC_TIME="en_US.UTF-8" lldb -- ./goaccess --jobs=6 --datetime-format='%d/%b/%Y:%H:%M:%S %z' --log-format='%h - - [%x] - %V - "%r" %s %b %R %u' access.*.log --geoip-database GeoLite2-City_20231115/GeoLite2-City.mmdb --tz="Europe/Berlin" -e "10.1.103.20-10.1.103.22" --anonymize-ip -a -o report.html --persist --restore --db-path=storage --anonymize-level=2
(lldb) target create "./goaccess"
Current executable set to '/usr/local/bin/goaccess' (arm64).
(lldb) settings set -- target.run-args  "--jobs=6" "--datetime-format=%d/%b/%Y:%H:%M:%S %z" "--log-format=%h - - [%x] - %V - \"%r\" %s %b %R %u" "access.20231201.log" "--geoip-database" "GeoLite2-City_20231115/GeoLite2-City.mmdb" "--tz=Europe/Berlin" "-e" "10.1.103.20-10.1.103.22" "--anonymize-ip" "-a" "-o" "report.html" "--persist" "--restore" "--db-path=storage" "--anonymize-level=2"
(lldb) process launch
Process 36109 launched: '/usr/local/bin/goaccess' (arm64)
Process 36109 stopped1201.log] {4979} @ {1659/s}{0/s}
* thread #4, stop reason = EXC_BAD_ACCESS (code=1, address=0x17002aca0)
    frame #0: 0x000000018a500478 libsystem_c.dylib`__findenv_locked + 92
libsystem_c.dylib`:
->  0x18a500478 <+92>:  ldrb   w16, [x9]
    0x18a50047c <+96>:  cbz    w16, 0x18a5004ac          ; <+144>
    0x18a500480 <+100>: ldrb   w17, [x15]
    0x18a500484 <+104>: cmp    w16, w17
Target 0: (goaccess) stopped.
(lldb) frame variable
(lldb) bt
error: goaccess debug map object file "/Volumes/Projects/OpenSource/goaccess/src/util.o" changed (actual: 0x65a058a0, debug map: 0x659f12eb) since this executable was linked, debug info will not be loaded
error: goaccess debug map object file "/Volumes/Projects/OpenSource/goaccess/src/parser.o" changed (actual: 0x65a058a0, debug map: 0x659f12ea) since this executable was linked, debug info will not be loaded
* thread #4, stop reason = EXC_BAD_ACCESS (code=1, address=0x17002aca0)
  * frame #0: 0x000000018a500478 libsystem_c.dylib`__findenv_locked + 92
    frame #1: 0x000000018a5003f0 libsystem_c.dylib`getenv + 64
    frame #2: 0x000000018a505e70 libsystem_c.dylib`_st_tzset_basic + 60
    frame #3: 0x000000018a505e04 libsystem_c.dylib`localtime_r + 52
    frame #4: 0x00000001000354a4 goaccess`str_to_time + 480
    frame #5: 0x000000010002187c goaccess`parse_format + 2684
    frame #6: 0x0000000100020c7c goaccess`parse_line + 404
    frame #7: 0x000000010002414c goaccess`read_lines_thread + 156
    frame #8: 0x000000018a66a034 libsystem_pthread.dylib`_pthread_start + 136

from goaccess.

sascha-egerer avatar sascha-egerer commented on June 4, 2024

Ok I'm trying to figure out whats going on even if i don't really have a clue.

Looks like this log entry is one of the problematic onces:

00.00.00.00 - - [01/Dec/2023:00:07:35 +0000] - foo.de - "GET /foo/acb6629fe45c43ad5d8b.woff2 HTTP/1.1" 200 12708 "https://foo.bar/baz/styles.css?1701094867" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"

If i put this one in a log file and analyze it i'll break - but only if i have the --tz argument given.

With --tz

LC_TIME="en_US.UTF-8" lldb -- ./goaccess --jobs=6 --datetime-format='%d/%b/%Y:%H:%M:%S %z' --log-format='%h - - [%x] - %V - "%r" %s %b %R %u' access.test.log -e "10.1.103.20-10.1.103.22" --tz="Europe/Berlin" --anonymize-ip -a -o report.html --persist --restore --db-path=storage --anonymize-level=2
(lldb) target create "./goaccess"
Current executable set to '/usr/local/bin/goaccess' (arm64).
(lldb) settings set -- target.run-args  "--jobs=6" "--datetime-format=%d/%b/%Y:%H:%M:%S %z" "--log-format=%h - - [%x] - %V - \"%r\" %s %b %R %u" "access.test.log" "-e" "10.1.103.20-10.1.103.22" "--tz=Europe/Berlin" "--anonymize-ip" "-a" "-o" "report.html" "--persist" "--restore" "--db-path=storage" "--anonymize-level=2"
(lldb) frame variable
error: Command requires a current process.
(lldb) process launch
Process 37709 launched: '/usr/local/bin/goaccess' (arm64)
 [SETTING UP STORAGE access.test.log] {0} @ {0/s}
Process 37709 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x16ff12ca0)
    frame #0: 0x000000018a500478 libsystem_c.dylib`__findenv_locked + 92
libsystem_c.dylib`:
->  0x18a500478 <+92>:  ldrb   w16, [x9]
    0x18a50047c <+96>:  cbz    w16, 0x18a5004ac          ; <+144>
    0x18a500480 <+100>: ldrb   w17, [x15]
    0x18a500484 <+104>: cmp    w16, w17
Target 0: (goaccess) stopped.
(lldb) frame variable
(lldb) bt
error: goaccess debug map object file "/Volumes/Projects/OpenSource/goaccess/src/util.o" changed (actual: 0x65a058a0, debug map: 0x659f12eb) since this executable was linked, debug info will not be loaded
error: goaccess debug map object file "/Volumes/Projects/OpenSource/goaccess/src/ui.o" changed (actual: 0x65a058a0, debug map: 0x659f12eb) since this executable was linked, debug info will not be loaded
error: goaccess debug map object file "/Volumes/Projects/OpenSource/goaccess/src/output.o" changed (actual: 0x65a058a0, debug map: 0x659f12ea) since this executable was linked, debug info will not be loaded
error: goaccess debug map object file "/Volumes/Projects/OpenSource/goaccess/src/goaccess.o" changed (actual: 0x65a0589f, debug map: 0x659f12e9) since this executable was linked, debug info will not be loaded
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x16ff12ca0)
  * frame #0: 0x000000018a500478 libsystem_c.dylib`__findenv_locked + 92
    frame #1: 0x000000018a5043f4 libsystem_c.dylib`__setenv_locked + 72
    frame #2: 0x000000018a566f80 libsystem_c.dylib`putenv + 140
    frame #3: 0x0000000100035270 goaccess`set_tz + 100
    frame #4: 0x00000001000300e8 goaccess`generate_time + 32
    frame #5: 0x000000010001db10 goaccess`output_html + 532
    frame #6: 0x000000010001444c goaccess`standard_output + 232
    frame #7: 0x0000000100013a54 goaccess`main + 2616
    frame #8: 0x000000018a2e90e0 dyld`start + 2360

Without --tz

LC_TIME="en_US.UTF-8" lldb -- ./goaccess --jobs=6 --datetime-format='%d/%b/%Y:%H:%M:%S %z' --log-format='%h - - [%x] - %V - "%r" %s %b %R %u' access.test.log -e "10.1.103.20-10.1.103.22" --anonymize-ip -a -o report.html --persist --restore --db-path=storage --anonymize-level=2
(lldb) target create "./goaccess"
Current executable set to '/usr/local/bin/goaccess' (arm64).
(lldb) settings set -- target.run-args  "--jobs=6" "--datetime-format=%d/%b/%Y:%H:%M:%S %z" "--log-format=%h - - [%x] - %V - \"%r\" %s %b %R %u" "access.test.log" "-e" "10.1.103.20-10.1.103.22" "--anonymize-ip" "-a" "-o" "report.html" "--persist" "--restore" "--db-path=storage" "--anonymize-level=2"
(lldb) process launch
Process 37900 launched: '/usr/local/bin/goaccess' (arm64)
 [SETTING UP STORAGE access.test.log] {0} @ {0/s}
Cleaning up resources...
Process 37900 exited with status = 0 (0x00000000)

Hope this helps.

from goaccess.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.