devfs
[Top] [All Lists]

devfsd hangs on restart - is_devfsd_or_child() problem

To: devfs@xxxxxxxxxxx
Subject: devfsd hangs on restart - is_devfsd_or_child() problem
From: Andrey Borzenkov <arvidjaar@xxxxxxx>
Date: Fri, 11 Jul 2003 22:47:12 +0400
Cc: linux-kernel@xxxxxxxxxxxxxxx, Thierry Vignaud <tvignaud@xxxxxxxxxxxxxxxx>
Sender: devfs-bounce@xxxxxxxxxxx
User-agent: KMail/1.5
I cannot believe it is so fragile ...

is_devfsd_or_child() simplemindedly checks for pgrp:

static int is_devfsd_or_child (struct fs_info *fs_info)
{
    if (current == fs_info->devfsd_task) return (TRUE);
    if (current->pgrp == fs_info->devfsd_pgrp) return (TRUE);
    return (FALSE);
}   /*  End Function is_devfsd_or_child  */

unfortunately, bash (I do not know if it does it always or not) resets pgrp on 
startup. I.e. if your action is using shell it is no more considered devfsd 
descendant ... and it will attempt in turn start devfsd action while devfsd 
is waiting for it ot finish.

Thierry, i refer mostly to dynamics scripts currently. Every time I update 
devfsd it hangs in one of them. And actually it is enough to do service 
devfsd restart to trigger this. It may be 2.5 specific again in that it is 
not as easily seen under 2.4.

I have no idea what can be done. Is there any way in kernel to find out if one 
task is descendant of other task? Even rewriting devfsd to use non-blocking 
calls and request queue does not help as it apprently just results in endless 
loop (action triggering action triggering action ...)

-andrey

<Prev in Thread] Current Thread [Next in Thread>