Re: GDB hangs when calling inferior functions
Yao Qi <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Stephen Roberts <[email protected]> writes: > I've included a gdb testcase below - hopefully this format is acceptable. This testcase reproduces the issue around 99% of the time on my ubuntu 16.04 machine. This figure drops closer to 50% when under heavy load, which suggested a race condition. I dug deeper into this and found that the threads which hang are always ones which did not hit the breakpoint but were stopped when another thread did hit a breakpoint. Threads which are stopped at breakpoints are immune to this issue. Loading the system allows more threads to reach the breakpoint before they are stopped by gdb. I can reproduce the hang with your test case. Looks inferior_event_handler (INF_EXEC_COMPLETE, ) should be called somewhere, may be in infrun or the thread finite-state machine is in a wrong state for inferior call. -- Yao (齐尧)