9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Weird problem.
@ 2002-02-26 18:01 Dan Cross
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Cross @ 2002-02-26 18:01 UTC (permalink / raw)
  To: 9fans

I'm looking at a Plan 9 machine where ps(1) keeps hanging; in particular,
it hangs while trying to open one of the status files under /proc/*. (eg,
open("/proc/$somepid/status", OREAD); hangs).  Looking at the source code
to devproc.c, I see that one of the first things procopen() does is lock
p->debug once it finds the proctable entry for the process that particular
file is associated with.  My guess, based only on vague feeling and nothing
more substantial, is that there exists some sort of deadlock with p->debug.

Is there a way to see what locks a process holds, short of instrumenting
the kernel to do so?  I'd hate to simply reboot the machine, since I think
that the error state would be difficult to recreate, and I'd really like
to understand what's going on.  Alternatively, if anyone's seen this before
and knows what's up, that'd be great.

	- Dan C.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] Weird problem.
@ 2002-02-26 23:37 Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2002-02-26 23:37 UTC (permalink / raw)
  To: 9fans

If you run acid -k, you can get a kernel stack trace
for the process doing the open.  That will tell you
what exactly is blocking.  p->debug is a QLock, and
unfortunately they don't keep track of who is currently
holding it.  The kernel trace might suggest where to
go next though.

grep /proc/ /proc/*/fd might be useful too.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-02-26 23:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-26 18:01 [9fans] Weird problem Dan Cross
2002-02-26 23:37 Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).