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

Re: That darned orphaned socket hang


On Mon, Feb 12, 2001 at 05:34:07PM +0000, Nigel Metheringham wrote:
> OK, I can now reproduce this hang at will, purely by pulling the plug 
> on my desktop when logged in and then rebooting - its a gnome desktop 
> box with few partitions and ext3 on all of them, so I guess its getting 
> a pile of gnome or ssh related sockets kept in /tmp which is on root
> Running e2fsck on it gives, after some other bits,
>  Clearing orphaned inode 666608 (uid=0, gid=0, mode=0100755, 
> size=456328)
>  Clearing orphaned inode 53304 (uid=0, gid=0, mode=0100755, size=552935)
>  Truncating orphaned inode 10456 (uid=100, gid=500, mode=0140755, 
> size=0)

Ahah.  *THAT* is nasty.  It's trying to truncate a socket.  Needless
to say, this is doomed to failure.

The orphan list is used for two things: to list orphans (inodes
deleted but still in use), and to complete large truncates which were
split over multiple transactions, in case the truncate got interrupted
midway.  We can tell the difference by looking at the link count on
the inode: if there are no links to it left then it must be orphaned;
otherwise it must have been a truncate which got interrupted.

So how on *earth* are we seeing a socket here with nlinks != 0?  All
of the places where we create orphans check that the nlink==0 before
adding to the orphan list.

OK, I'll go and poke at this for a bit, and I may end up giving you a
booby-trapped debug build at some point to find out where this inode
is getting onto the orphan list in the first place.


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