Red Hat Bugzilla – Bug 120064
X server locks up when strace' ed
Last modified: 2007-11-30 17:10:39 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312
Description of problem:
strace -p (Process ID of X server) as root on console
soon causes the X server to permanently enter state "T"
Killing it (and any dangling children) allows the X-server to restart.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
2. sudo tcsh in a terminal window
3. ps ax to fine PID of "X"
4. strace -p (PID above)
5. ssh from another machine, run "ps ax"
Actual Results: After the sctrace command, Console screen, keyboard,
all lock up. Stay locked up until X server (and dangling children
like xterm) is killed.
Expected Results: strace should have listed X's system calls until
You can not debug the X server via gdb nor strace the X server from
a terminal inside the X server you are debugging. That will never
work, and is not a bug.
The only way to strace or debug the X server, is by having 2
computers via ethernet or serial cable or similar, and debugging
the X server via remote shell to the computer running the X server.
"truss -p (PID of Xsun)" does not wedge in Solaris
"strace -p (PID of X)" does not wedge in RedHat 9.0
and for that matter:
"trace -p )PID of in.telnetd)" on SunOS 2.5.1 doesn't wedge the
terminal session its serving.
The behavior reported here should be avoidable.
If you are in X, inside an xterm or other terminal, you can not
run strace or gdb on the running X server. As soon as you do,
the X server will be stopped, and the debugger is in control,
however it is running inside an xterm and it can not receive
input from the X server, and cannot display output to the
X server, because the X server is stopped.
This is not a bug, but rather normal and very expected behaviour.
If you disagree with this resolution, please feel free to file
a bug report in X.Org bugzilla at http://bugs.freedesktop.org
in the "xorg" component. If you wish Red Hat to track the newly
filed X.Org bug report, you can paste the URL here and we will
add it to our upstream bug report tracker.
Setting status to "NOTABUG"