devfsd hangs on restart - is_devfsd_or_child() problem

Andrey Borzenkov (arvidjaar@mail.ru)
Fri, 11 Jul 2003 22:47:12 +0400


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/