in reply to Trying to track a sleeping CGI request with gdb

If your OS has 'pstack' (which at least Linux and Solaris do) then you can get a stack trace from a running process without using gdb.

You won't see too much of use unless you've got symbols loaded, but it's worth a try.

Otherwise, on Linux you can try 'strace -p <pid>' to get a look at what system calls the process is doing, this can be quite illuminating.

The equivalent on Solaris is 'truss', which can also peek into shared libraries (see the -u option).

  • Comment on Re: Trying to track a sleeping CGI request with gdb

Replies are listed 'Best First'.
Re^2: Trying to track a sleeping CGI request with gdb
by talexb (Chancellor) on Oct 10, 2006 at 18:26 UTC

    strace! That's the sucker.

    Just tried it on another process (not the one I want) but at least it gave me a C style trace of what's going on, and that should be enough to find out where the code's at and what it's waiting for.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds