find stuck in state "clock"

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Sun Aug 28 18:00:57 PDT 2005


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   / \




More information about the Bugs mailing list