DragonFly BSD
DragonFly bugs List (threaded) for 2005-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: find stuck in state "clock"


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Mon, 29 Aug 2005 02:59:27 +0200

Simon 'corecode' Schubert wrote:
Ok, I tried to play a bit Sherlock Holmes (on the live system).

Conclusion:


tcsh is terminating, calling exit(2). The kernel closes all fdesc, including the controlling terminal ttyp5. Trying to flush ttyp5, the vnode gets locked, but ttylclose/ttywflush blocks while the output queue is draining.

At the same time sshd, the process controlling ptsp5, does a chown of ttyp5. For some reason it holds the namecache entry locked [*]. kern_chown tries to lock the vnode of ttyp5 and blocks on this attempt. sshd can't read from ptsp5 and thus drain the output queue tcsh is waiting for.

Deadlock.

But I have no clue where do remove that deadlock. Probably somewhere in the tty code and not in chown. Any hints?

[*] The fact that the namecache entry is locked, doesn't lead to the deadlock, but it is the reason that dozens of find(1)s lock on /dev/ttyp5.

cheers
  simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]