WhiteBox-Systems / whitebox

A tool for showing software developers how their (C/C++) code behaves as they write it. (README and public issues)
https://whitebox.systems
17 stars 0 forks source link

Intermittent crashes when updating object files list #22

Open wfchandler opened 1 year ago

wfchandler commented 1 year ago

What happened?

Actual behaviour: Whitebox will sometimes crash when a file is added or removed from the Object files list.

Expected behaviour: Whitebox does not crash when this list is updated.

System/app details

WhiteBox version - 0.99.0 WhiteBox commit - e948c4605730dc1d7100f06f0020020400ab92f1 Assert level - 1 Debug info - false Kernel - Linux 6.1.6-200.fc37.x86_64 OS - Fedora Linux 37 (Server Edition) Architecture - x86-64 CPU name - Intel(R) Core(TM) i5-6500T CPU @ 2.50GHz CPU count - 4 CPU MHz - RAM - 32G

How to reproduce the error

Steps to reproduce:

  1. Start Whitebox and connect your editor to it
  2. Navigate to Preferences -> Object files and remove a file from the list
  3. Click OK to persist the change. Whitebox may crash at this point. ...

Does the error happen consistently with the above steps? 10% of the time.

Minimal reproducible code example: Does not appear to be related to specific code, I've been using random functions in https://github.com/git/git

Crash/log attachments & additional info

Error written to console below. I suspect that errno = 11 is unrelated to this issue and was set slightly before the actual crash during normal network polling.

Internal Error: 

Assertion failed in `jit_remove_elf_symbols` - /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app.c(4584):
    rm_status != -1
    errno => 11: Resource temporarily unavailable

Backtrace:

#0  0x00007f8c886c691f in _IO_getc (fp=0x7f8c8881aaa0 <_IO_2_1_stdin_>) at getc.c:39
#1  0x0000000001038135 in handle_signal (signum=<optimized out>, sig_info=<optimized out>, thrd_ctx=<optimized out>) at /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app_base_linux.c:189
#2  <signal handler called>
#3  0x0000000000fdf953 in jit_remove_elf_symbols (elf=0x90a9650) at /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app.c:4584
#4  reload_obj_file (obj=0x90a9630, scratch=<optimized out>, scratch@entry=0x408f128 <Block_Mem+2488>) at /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app.c:4680
#5  0x000000000106ba7a in handle_user_action_change_obj_paths (app=0x408e770 <Block_Mem>, action=<optimized out>) at /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app.c:3663
#6  0x00000000010246ed in jit_actions_from_user_actions (app=0x408e770 <Block_Mem>) at /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app.c:7249
#7  loop (app=app@entry=0x408e770 <Block_Mem>) at /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app.c:8285
#8  0x000000000101b8d0 in linux_loop (app=<optimized out>, app@entry=0x408e770 <Block_Mem>) at /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app_linux.c:2032
#9  0x0000000001037f18 in main (argc=1, argv=0x7ffc15ceb858) at /home/azmr/shared-drives/D:/Documents/Coding/C/whitebox/app_base_linux.c:347

Attached is the output of an strace taken while this crash occurred. The problem occurred after /home/wfc/devel/git/strvec.o was read into memory, this file was next in the list after the object file I removed.

wb-object-list-crash.txt

wfchandler commented 1 year ago

Encountered this when disabling a group of objects as well.

azmr commented 1 year ago

Thanks for letting us know, we'll look into it