Re: select() "hangs"



On Mon, 18 Dec 2006 10:49:15 -0800, ralph.schlosser wrote:

Alex,

[snip]
Please consider the following code excerpt:
[...]
I have not spotted anything obviously wrong with the code above. How do you
know it is select() which blocks? Have you run the code under a system call
tracer? Are all descriptors set to non-blocking mode?

I definately know it's the select call since I have put a debug
statement directly after the select() line. I'm not aware of any system
call tracers other than strace (under Linux), which in my case can't be
used directly as I have a daemon application.


strace -p <PID>

man strace(1).
.



Relevant Pages

  • Re: select() "hangs"
    ... that your process blocks in select. ... attach the strace to you're daemon when it seems to stuck, ... where PID is the PID of your daemon process. ...
    (comp.unix.programmer)
  • Re: select() "hangs"
    ... Are all descriptors set to non-blocking mode? ... Is there any better tool than strace you would suggest? ...
    (comp.unix.programmer)
  • Re: [PATCH] tracer for sys_open() - sreadahead
    ... and low-overhead alternative to strace, ... The tracer only logs succesfull calls, as those are the only ones we ... That would be sad to find one tracer for open, one for read, one for write... ... and I'm working on a plugin for the patch that Neil ...
    (Linux-Kernel)
  • Re: Zombie process when ptracing
    ... On 11/23, Nick Piggin wrote: ... I have a process stuck in Z state ... This can happen if the tracer (strace) itself hangs, ...
    (Linux-Kernel)
  • Re: strace & ptrace under Solaris
    ... >using strace and ptrace on Solaris from the command line? ... >ERROR: tracer already exists ... Strace is a streams protocol tracer..... ...
    (comp.unix.solaris)