Following on from a problem described in "How is it that I can attach strace to a process that isn't in the output of ps?"
I'm trying to debug a process that hangs part way through.
By using strace -f
on my parent process, I was able to determine that I have a bunch of threads that are just showing:
# strace -p 26334
Process 26334 attached - interrupt to quit
epoll_wait(607, {}, 4096, 500) = 0
epoll_wait(607, {}, 4096, 500) = 0
epoll_wait(607, {}, 4096, 500) = 0
epoll_wait(607, {}, 4096, 500) = 0
epoll_wait(607, ^C <unfinished ...>
Process 26334 detached
Investigating further:
# readlink /proc/26334/fd/607
anon_inode:[eventpoll]
My gut tells me that I've managed to get some threads in a deadlock situation, but I don't really know enough about epoll
to move forward. Are there any commands that can give me some insight into what these threads are polling for, or which file descriptors this epoll descriptor maps to.
Best Answer
When you run
strace
the lines it's returning are system functions. In case it wasn't obviousepoll_wait()
is a function that you can do aman epoll_wait
to find out implementation details like so:The description for
epoll
:So it would seem that you're process is blocking on file descriptors, waiting to see if I/O is possible on any of them.
I would change my tactics a bit and try and make use of
lsof -p <pid>
to see if you can narrow down what these files actually are.