[Converted from Gnats 2083] When debugging remotely a program with several threads, most times the gdbserver crashes with the following output: thread getmsg err: no event message for getmsg Segmentation fault (core dumped) and the corresponding gdb gets an timeout: (gdb) c Continuing. [New Thread 1024] Watchdog has expired. Target detached. Here are some more information about the problem: - it seems that it happens only since I changed to the linux 2.6 kernel - because it works sometimes and sometimes not, I assume a timing critical code path which results in a race condition - turning on debug in gdbserver seems to help a little bit, but not for big processes with lots of threads - http://lists.gnu.org/archive/html/bug-gdb/2003-05/msg00042.html describes a similiar probloem - I've also tried to port the patch from this posting: http://sources.redhat.com/ml/gdb/2005-02/msg00058.html to ppc, it helps a little bit as well, but like the other hack it doesn't solve the problem for big processes with many threads - I've used a small test program which I found on the gdb mailinglist: http://lists.gnu.org/archive/html/bug-gdb/2001-04/msg00042.html to reproduce the problem I know that this problem is a little bit tricky, but I'll do all what I can to help you to solve it. So if you need more information to fix the problem or if you have some ideas where I can start looking at the problem feel free to tell me. Thank you very much, Christian Release: GNU gdb 6.3 Environment: Linux: 2.6.13.1, ppc gcc: (GCC) 3.3.3 gdb: This GDB was configured as "--host=i686-pc-linux-gnu --target=powerpc-vendor-linux-uclibc" How-To-Repeat: 1. compile the attached file with -lpthread for the ppc platform 2. start it on a ppc platform with the gdbserver connect with gdb to the remote target 3. "continue"
Sorry that noone responded to this earlier. Do you have any idea if this has been fixed in the meantime (either kernel or gdb / gdbserver)? Could you try with some more recent versions? Since this has the looks of a kernel problem, it would be very useful to have some confirmation --- as there's nothing for us to do in that case. Thanks.
Closing the issue due to lack of feedback for over a year, and because it all indicated an early kernel bug. Please reopen if the same problem still exists with recent gdb releases, with reasonably recent kernels.