Skip to contentSkip to conversation

2.6.12 initrd module loading seems parallel on bootup

DISCUSSION Martin Wilck 1 participant 1 message Jun 27, 2005 3 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 5 lines · Pozsár Balázs
Quoted 2 lines

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