Skip to contentSkip to conversation

/sbin/hotplug exec'd lots of times during boot

DISCUSSION Jacob Gorm Hansen 2 participants 4 messages Apr 7, 2005

lore
Share & tools
lore
#0 lore raw

hi,

I just added a printk to do_execve() in xenolinux0, and noticed that /sbin/hotplug is being exec'ed more than a hundred times during boot, and that this happens before /sbin/init is exec'ed.

This is with a version of xen-unstable less than one month old. It is probably a Linux issue, I was just wondering if anyone else had seen the same behaviour, and if this is supposed to happen (these days you never know)? Could it be the USB subsystem is acting weird?

thanks,
Jacob

#1 lore raw
Quoted 3 lines · * Jacob Gorm Hansen ([email protected]) wrote:

I just added a printk to do_execve() in xenolinux0, and noticed that /sbin/hotplug is being exec'ed more than a hundred times during boot, and that this happens before /sbin/init is exec'ed.

This sounds pretty normal for Linux. Each kobject_add can generate a hotplug event, and execve("/sbin/init") happens quite late during bootup.

thanks,
-chris

#2 lore raw
Quoted 7 lines · Chris Wright
Quoted 1 line · * Jacob Gorm Hansen ([email protected]) wrote:

I just added a printk to do_execve() in xenolinux0, and noticed that /sbin/hotplug is being exec'ed more than a hundred times during boot, and that this happens before /sbin/init is exec'ed.

This sounds pretty normal for Linux. Each kobject_add can generate a hotplug event, and execve("/sbin/init") happens quite late during bootup.

No wonder it is slow to boot then ;-) ... How can one be sure that the /sbin/hotplugs are no longer running when /sbin/init runs, i.e. that init has pid==1? Are there no forks allowed in /sbin/hotplug?

thanks,
Jacob

#3 lore raw
Quoted 8 lines · * Jacob Gorm Hansen ([email protected]) wrote:
Quoted 7 lines · Chris Wright
Quoted 3 lines · * Jacob Gorm Hansen ([email protected]) wrote:

I just added a printk to do_execve() in xenolinux0, and noticed that /sbin/hotplug is being exec'ed more than a hundred times during boot, and that this happens before /sbin/init is exec'ed.

Quoted 6 lines
Quoted 2 lines

This sounds pretty normal for Linux. Each kobject_add can generate a hotplug event, and execve("/sbin/init") happens quite late during bootup.

No wonder it is slow to boot then ;-) ... How can one be sure that the /sbin/hotplugs are no longer running when /sbin/init runs, i.e. that init has pid==1? Are there no forks allowed in /sbin/hotplug?

pid == 1 starts long before is execs itself into /sbin/init.

thanks,
-chris