Re: 2.6.12 initrd module loading seems parallel on bootup

Martin Wilck
2005-06-27T06:27:06Z

Pozsár Balázs wrote:

>>I'd like to know what changed in the kernel to make nash's behaviour
>>change. Martin, did you work that out?
>
>
> See http://lkml.org/lkml/2005/1/17/132

I am not sure if it was the culprit. The problem was that nash is
running as init() with PID 1 and therefore all processes are its child
processes. Thus a fairly normal code such as

if (fork())
wait4(-1...)

that would work under normal circumstances (there are no other real
children) can fail here. The terminating "children" that were
interfering here were all udev processes as far as I observed. I suppose
that inserting a module triggers udev which spawns a process which may
under certain circumstances terminate earlier than the insmod itself.

nash could also have solved the problem simply by fork()ing itself once
before doing any real work, so that it wouldn't run with pid 1.

Regards
Martin