Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

underlying gdb process has been killed after running to first breakpoint #218

Open
chisaipete opened this issue Jul 13, 2018 · 7 comments
Open

Comments

@chisaipete
Copy link

Describe the bug
I load my binary, manually set a break-point several statements into my main function, then click run. The program spawns multiple threads as expected (it's using SDL2) but once it reaches the first break-point, execution stops, the gui is updated, and I see the following in red text in the gdbgui console:

The underlying gdb process has been killed. This tab will no longer function as expected.
Error occurred on server when running gdb command: gdb is not running
Error occurred on server when running gdb command: gdb is not running
Error occurred on server when running gdb command: gdb is not running
Error occurred on server when running gdb command: gdb is not running
...

Screenshots
issue_gdbgui

Please complete the following information:

  • OS: Windows 10
  • gdbgui version (gdbgui -v): 0.12.0.0
  • gdb version (gdb -v): 8.1
  • browser [e.g. chrome, safari]: chrome
  • python packages (pip freeze):
    cffi==1.11.5
    click==6.7
    Flask==0.12.4
    Flask-Compress==1.4.0
    Flask-SocketIO==2.9.6
    gdbgui==0.12.0.0
    gevent==1.3.4
    greenlet==0.4.13
    itsdangerous==0.24
    Jinja2==2.10
    MarkupSafe==1.0
    pycparser==2.18
    pygdbmi==0.8.3.0
    Pygments==2.2.0
    python-engineio==2.2.0
    python-socketio==2.0.0
    six==1.11.0
    Werkzeug==0.14.1

Additional context
If it helps, I'm using the neuwin.net Mingw distro. Pretty light as far as mingw on windows gets.

@chisaipete
Copy link
Author

I should also mention that I can debug this and other programs just fine using gdb on the command line.

@cs01
Copy link
Owner

cs01 commented Jul 15, 2018

Thanks for filing. It might be a gdb bug in its machine interface implementation. Unfortunately with the info you provided I don't know what the cause is. Maybe if you re-run with strace and post results here it will help.

@chisaipete
Copy link
Author

I'm not sure what you mean. Is "strace" a specific gdb or gdbgui command? I'm running on Windows 10, isn't strace a linux utility?

@cs01
Copy link
Owner

cs01 commented Jul 16, 2018

Yes strace intercepts and prints all system calls. You're right that it might not be available on windows (I am pretty Linux centric). It might be available as a package in mingw. Or there might be another utility available to debug the issue.

What I'm really looking for is a way to see what is causing the abrupt exit, which is likely due to a segfault. The info you provided is not quite specific enough to be actionable since I can't tell what the root cause is (lots of things can cause a segfault).

@msik314
Copy link

msik314 commented Jun 9, 2019

I am running into this issue, too.

The differenences in my information are this:
gdbgui version: 0.13.1.2
browser: Firefox
python packages:
Click==7.0
pipx==0.13.1.1
userpath==1.1.0

I do have strace on Windows, and this is the relevant part of my strace log:
--- Process 3928 thread 9116 exited with status 0x0
--- Process 3928 thread 10232 exited with status 0x0
--- Process 3928 thread 6772 created
--- Process 948 thread 8276 created
--- Process 1532 thread 6536 created
--- Process 8376 thread 8552 created
--- Process 3928 thread 10040 exited with status 0x0
--- Process 3928 thread 420 created
--- Process 3928 thread 6772 exited with status 0x0
--- Process 948 thread 3672 exited with status 0x0
--- Process 3928 thread 9884 created
--- Process 9492 loaded C:\Windows\System32\cryptbase.dll at 00007ff9a2350000
--- Process 9492, exception c0000005 at 00007ff9a3bb42e0
--- Process 8376 thread 4292 created
--- Process 9492 thread 9672 exited with status 0xc0000005
--- Process 9492 exited with status 0xc0000005
--- Process 9320 exited with status 0xc0000005
--- Process 5636 thread 9676 created
--- Process 5636 thread 6036 created
--- Process 5636 thread 9676 exited with status 0x0
--- Process 5636 thread 6036 exited with status 0x0

Exception 0xc0000005 is the exception code for a Memory Access Violation a.k.a Segfault. I can provide the full log if necessary.

Update:
I did some digging and I think that gdb is crashing when trying to read the registers. At least in my case, this is then an issue with gdb itself.

@dgtlrift
Copy link

Is there a diagnostic code that gdbgui can output when it catches a segv from GDB? I'm seeing the same error code when starting an app via GDB.

@w809291634
Copy link

gcc版本出现问题,找一个适合的mingw,下面是我用的版本,测试能够使用
winlibs-x86_64-posix-seh-gcc-7.5.0-mingw-w64-7.0.0-r1.7z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants