Bug 18367 - gdbserver doesn't work if parent blocks SIGCHLD
Summary: gdbserver doesn't work if parent blocks SIGCHLD
Status: NEW
Alias: None
Product: gdb
Classification: Unclassified
Component: server (show other bugs)
Version: 7.9
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-01 20:25 UTC by Matt Grochowalski
Modified: 2015-05-18 20:21 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Grochowalski 2015-05-01 20:25:11 UTC
Steps to reproduce (on Linux x86):
1. Launch gdbserver from a parent that has SIGCHLD blocked. For example, replace SIGINT with SIGCHLD in the code in http://stackoverflow.com/questions/4515274
2. Try to connect through a gdb client
3. GDB prints the following and remote debugging doesn't work:
Ignoring packet error, continuing...
warning: unrecognized item "timeout" in "qSupported" response
Ignoring packet error, continuing...
Ignoring packet error, continuing...
Bogus trace status reply from target: timeout

Running gdbserver with the "--debug" option produces the following output:
>>>> entering linux_wait_1
linux_wait_1: [Process 3252]
my_waitpid (-1, 0x40000001)
my_waitpid (-1, 0x80000001): status(bffff58c), -1
LWFE: waitpid(-1, ...) returned -1, No child processes
leader_pid=3252, leader_lp!=NULL=1, num_lwps=1, zombie=0
sigsuspend'ing

This was introduced some time after 7.3. Looks like it may be due to the fix for PR 12702.