Emmanuel De Paepe wrote:
> How safe is this command?
>
> I used this on my computer (not as a su) in Solaris 10 and suddenly
> the whole environment was hanging. I logged in from another computer
> on this machine and could perform an 'init 6' without a problem. So
> apparently it made the GUI hang.
truss should be 100% safe. If it causes an application to
malfunction (other than to make it run slower) it is a bug.
That said, truss is effectively a debugger, and there are fundamental
limitations on how you can use a debugger. In particular, if you
apply truss to a program, and at the same time are sending the output
of truss to that program for processing, truss and that program can
deadlock.
It sounds like you might have trussed the X server from a terminal
running on your X desktop. At some point truss blocked waiting to
output something to its terminal, the terminal blocked writing to
your terminal application, the terminal application was blocked
waiting for the X server, and the X server was stopped because truss
was blocked waiting for the terminal. The result is no-one could
make progress. The same thing would happen if you ran gdb or dbx on
the X server from an xterm.
If you do need to truss X or some other service integral to your
desktop [1], I recommend using the -o option to send truss's output
to a file; in the vast majority of cases this will avoid entirely the
possibility of a deadlock.
Dave
[1] "Traditionally" the X server was the primary thing you wanted to
avoid, but under Gnome there seems to be quite a few other critical
processes that will cause your entire desktop to hang if stopped.
_______________________________________________
opensolaris-help mailing list
[email protected]