Bug 120064 - X server locks up when strace' ed
X server locks up when strace' ed
Product: Fedora
Classification: Fedora
Component: XFree86 (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: X/OpenGL Maintenance List
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2004-04-05 14:40 EDT by Steve Knodle
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-12 14:19:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Knodle 2004-04-05 14:40:58 EDT
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):

How reproducible:

Steps to Reproduce:
1.Running  gdm-
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

Additional info:
Comment 1 Mike A. Harris 2004-04-06 06:50:22 EDT
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.
Comment 2 Steve Knodle 2004-04-06 11:46:12 EDT
"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.
Comment 3 Mike A. Harris 2004-10-12 14:19:03 EDT
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"

Note You need to log in before you can comment on or make changes to this bug.