Skip to contentSkip to conversation

Hotplug *seems* to hang during boot]

DISCUSSION Richard Wild 3 participants 5 messages Oct 4, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,

please note the emphasis on *seems*. I am not claiming there is a problem with hotplug. I think it's just that I have some problem, and it manifests itself when hotplug starts up. Also, none of my usual channels for getting help have yielded any useful advice, and I have run out of places to turn. To get to the point, what happens is: when the kernel boots up, it gets as far as:

Starting PCMCIA services:
<Probing for PCIC: edit /etc/rc.d/rc.pcmcia>
cardmgr[953]: no sockets found!
Activating hardware detection: /etc/rc.d/rc.hotplug start

and that's all she writes. The computer just remains hung, apparently starting up hotplug. This is with a 2.6.7 kernel from my Slackware 10 installation. If I use the default 2.4.26 kernel then it starts up OK.

I haven't been able to get any help with this problem anywhere else, so I am fervently hoping that someone here will be able to give me some advice on what things to try/investigate.

Some other information noticed: it seems (to me) quite likely that the message "cardmgr[953]: no sockets found!" is related to the problem, because when I boot the 2.4 kernel is says instead "cardmgr[80]: no pcmcia driver in /proc/devices". (This seems reasonable since it's a desktop PC).

Another thing is, I can boot the 2.6 kernel if I give it the option "nohotplug", however, if I do this then the network controller is inoperative. (According to lspci it is an NVidia NForce2 ethernet controller). This is not an acceptable workaround.

Please let me know if there's any other information I should supply, and also thanks very much for your time.

Richard.

P.S. I sent this message twice because the first time it did not seem to make it to the list. Perhaps I sent it too soon after subscribing. If I have erred please accept my apologies.

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 4 lines · Richard Wild

Some other information noticed: it seems (to me) quite likely that the message "cardmgr[953]: no sockets found!" is related to the problem, because when I boot the 2.4 kernel is says instead "cardmgr[80]: no pcmcia driver in /proc/devices".

cardmgr is a bit strange in how it accesses devices. Here's a quick explanation in case it's relevant to the problem.

"no pcmcia driver in /proc/devices":

That means just what it says. cardmgr wants the major device number for the pcmcia driver, so it reads through /proc/devices looking for it. This error message indicates that it did not find a "pcmcia" line, presumably because no driver was loaded.

"no sockets found!":

This indicates that it _did_ find "pcmcia" listed in /proc/devices, and it tried to access the driver. Here's where things get a bit unusual. After obtaining the major device number from /proc/devices, cardmgr uses mknod(2) to create device files of its own. It starts with minor device 0 and continues in a one-up loop until it fails. For each minor number, it creates a device file with a name of the form "cm-PID-COUNTER", opens the file, and then immediately unlinks the file while holding it open. There are a number of directories where it might try to do this, usually in this order:

/var/lib/pcmcia, /var/run, /dev, /tmp

The "no sockets found" message indicates that it managed to do the mknod for minor device 0, but got an ENODEV when it then tried to open the resulting file.

So what this seems to be saying is that:

- your 2.4 kernel has no PCMCIA stuff loaded at all.

- your 2.6 kernel has at least the "ds" driver, which creates the "pcmcia" /proc/devices entry, but it has no card sockets.

I don't know if this is part of your problem or not, but since cardmgr does do some device file manipulation, it might be worth investigating.

-Dave Dodge

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Richard Wild

Hi Dave,

thanks for your reply. Reading it made me think that the first thing to try should be to recompile the 2.6.7 kernel with no PCMCIA support at all. This is duly did, and when I attempted to boot the kernel cardmgr reported that there was no pcmcia driver in /proc/devices as your message suggested.

Unfortunately, hotplug still did not start. Whatever the problem is, that wasn't it.

Interestingly, I tried booting the 2.6 kernel with "nohotplug" as an option; this enabled it to boot as I said earlier (but with no NIC function). I then decided to run "/etc/rc.d/rc.hotplug start" to see what would happen. It did not merely block as I expected but completely locked up the system: mouse, keyboard, no interrupts working at all as far as I could see.

I hate to be a luser but I am quite stuck here. I'll do whatever investigation is necessary but I could really use some advice on where to start.

Thanks,
Rich.

Quoted 52 lines · Dave Dodge
Quoted 6 lines · Richard Wild

Some other information noticed: it seems (to me) quite likely that the message "cardmgr[953]: no sockets found!" is related to the problem, because when I boot the 2.4 kernel is says instead "cardmgr[80]: no pcmcia driver in /proc/devices".

cardmgr is a bit strange in how it accesses devices. Here's a quick explanation in case it's relevant to the problem.

"no pcmcia driver in /proc/devices":

That means just what it says. cardmgr wants the major device number for the pcmcia driver, so it reads through /proc/devices looking for it. This error message indicates that it did not find a "pcmcia" line, presumably because no driver was loaded.

"no sockets found!":

This indicates that it _did_ find "pcmcia" listed in /proc/devices, and it tried to access the driver. Here's where things get a bit unusual. After obtaining the major device number from /proc/devices, cardmgr uses mknod(2) to create device files of its own. It starts with minor device 0 and continues in a one-up loop until it fails. For each minor number, it creates a device file with a name of the form "cm-PID-COUNTER", opens the file, and then immediately unlinks the file while holding it open. There are a number of directories where it might try to do this, usually in this order:

/var/lib/pcmcia, /var/run, /dev, /tmp

The "no sockets found" message indicates that it managed to do the mknod for minor device 0, but got an ENODEV when it then tried to open the resulting file.

So what this seems to be saying is that:

- your 2.4 kernel has no PCMCIA stuff loaded at all.

- your 2.6 kernel has at least the "ds" driver, which creates the "pcmcia" /proc/devices entry, but it has no card sockets.

I don't know if this is part of your problem or not, but since cardmgr does do some device file manipulation, it might be worth investigating.

-Dave Dodge

Quoted 12 lines

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Richard Wild
Quoted 18 lines · Richard Wild

Hi Dave,

thanks for your reply. Reading it made me think that the first thing to try should be to recompile the 2.6.7 kernel with no PCMCIA support at all. This is duly did, and when I attempted to boot the kernel cardmgr reported that there was no pcmcia driver in /proc/devices as your message suggested.

Unfortunately, hotplug still did not start. Whatever the problem is, that wasn't it.

Interestingly, I tried booting the 2.6 kernel with "nohotplug" as an option; this enabled it to boot as I said earlier (but with no NIC function). I then decided to run "/etc/rc.d/rc.hotplug start" to see what would happen. It did not merely block as I expected but completely locked up the system: mouse, keyboard, no interrupts working at all as far as I could see.

Quoted 6 lines

I hate to be a luser but I am quite stuck here. I'll do whatever investigation is necessary but I could really use some advice on where to start.

Thanks,
Rich.

You can try editing the /etc/hotplug/hotplug.functions and uncomment the line # DEBUG=yes; export DEBUG

so you can at least see in which part or on which module it's blocking. and if it's a kernel problem.

P.S. I don't use slackware from a lot of time, but I thing that you can look if you are using the latest hotplug (20040923) or install it.
If this don't work you can also try to apply the patches that you can find in debian (I hope to have time to dig in them and send them splitted to this list, so also the gentoo's and other distro users can use them).

Bye!

Signature · 3 lines
Simone Gotti
<[email protected]>
http://kde-bluetooth.sf.net
#4 lore raw
In reply to Richard Wild

Hi,

I had that thought myself immediately after posting. I went through the various scripts putting echo statements in and eventually arrived at /etc/hotplug/pci.agent with the line:

load_drivers pci $MAP_CURRENT "$LABEL"

which expands to:

load_drivers pci /lib/modules/2.6.7/modules.pcimap PCI slot

That's where it seems to go off the trolley. I will post more if and when I find it.

Thanks,
Rich.

Quoted 8 lines · Simone Gotti

You can try editing the /etc/hotplug/hotplug.functions and uncomment the line

# DEBUG=yes; export DEBUG

so you can at least see in which part or on which module it's blocking. and if it's a kernel problem.

Quoted 9 lines

P.S. I don't use slackware from a lot of time, but I thing that you can look if you are using the latest hotplug (20040923) or install it.
If this don't work you can also try to apply the patches that you can find in debian (I hope to have time to dig in them and send them splitted to this list, so also the gentoo's and other distro users can use them).

Bye!

-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel