mikesart / inotify-info

Linux inotify info reporting app
MIT License
298 stars 31 forks source link

AddressSanitizer: SEGV on unknown address 0x000000000000 #15

Closed suside closed 1 year ago

suside commented 1 year ago

Hello im getting this error quite randomly:


❯ ./_debug/inotify-info
------------------------------------------------------------------------------
INotify Limits:
  max_queued_events    16384
  max_user_instances   512
  max_user_watches     524288
------------------------------------------------------------------------------
AddressSanitizer:DEADLYSIGNAL
=================================================================
==221236==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f0029e7fa74 bp 0x7ffe7df0c910 sp 0x7ffe7df0c070 T0)
==221236==The signal is caused by a READ memory access.
==221236==Hint: address points to the zero page.
    #0 0x7f0029e7fa74 in _IO_fgets libio/iofgets.c:47
    #1 0x7f002a9d860d in __interceptor_fgets ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1324
    #2 0x562f56d8916c in get_uid(char const*) (/home/su/workspace_kantor/inotify-info/_debug/inotify-info+0x13b16c) (BuildId: c7d4437f0a723a7a984f9bcb109b16f5db24ac2c)
    #3 0x562f56d8da6c in init_inotify_proclist(std::__debug::vector<procinfo_t, std::allocator<procinfo_t> >&) (/home/su/workspace_kantor/inotify-info/_debug/inotify-info+0x13fa6c) (BuildId: c7d4437f0a723a7a984f9bcb109b16f5db24ac2c)
    #4 0x562f56d937b6 in main (/home/su/workspace_kantor/inotify-info/_debug/inotify-info+0x1457b6) (BuildId: c7d4437f0a723a7a984f9bcb109b16f5db24ac2c)
    #5 0x7f0029e2aa8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #6 0x7f0029e2ab48 in __libc_start_main_impl ../csu/libc-start.c:360
    #7 0x562f56d88474 in _start (/home/su/workspace_kantor/inotify-info/_debug/inotify-info+0x13a474) (BuildId: c7d4437f0a723a7a984f9bcb109b16f5db24ac2c)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV libio/iofgets.c:47 in _IO_fgets
==221236==ABORTING
mikesart commented 1 year ago

Hi suside - can you try the latest? I made a change that might fix this maybe, hopefully? Thanks!

mikesart commented 1 year ago

Closing this... if you have it happen again please re-open. Thanks!

suside commented 1 year ago

I can confirm that this is not happening on latest. :+1: