LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   2.6.8.1 --> EXTREMLY SLOW /etc/rc.d/rc.hotplug start (http://www.linuxquestions.org/questions/slackware-14/2-6-8-1-extremly-slow-etc-rc-d-rc-hotplug-start-237104/)

carboncopy 09-30-2004 10:57 AM

2.6.8.1 --> EXTREMLY SLOW /etc/rc.d/rc.hotplug start
 
I have posted a thread sometime ago about 2.6.8.1 hang at /etc/rc.d/rc.hotplug while boot-up

In actually case it didn't hang. It just seems to hang. It takes EXTREMLY LONG TIME to get pass the /etc/rc.d/rc.hotplug. I discovered this because there was a blackout which outlast my UPS. After I return to my comp after a few days. It manage to boot-up successfully.

A comparison with 2.6.7, 2.6.8.1 is eternity.

I used the same config file from 2.6.7 to compile 2.6.8.1. And also reconfigure it from scratch with the same results.


Any tips that can help me:Pengy:

folkenfanel 09-30-2004 12:15 PM

hi
 
Hi

This worked for me.

Edit /etc/rc.d/rc.M . There must be a line that says something like

. /etc/rc.d/rc.hotplug start

Found it? Add a "&" to this line. Like this:

. /etc/rc.d/rc.hotplug start &

That's it! Now it shouldn't be slow.

carboncopy 09-30-2004 12:29 PM

Thanks
will try that out.

carboncopy 09-30-2004 12:46 PM

Ok I tried & rc.hotplug
and also fc-cache

but it is still stuck.
Now I know something more.

I ssh into the machine from my Mac Os X.2
and ps aux it.

and this is the results of ps aux:

Code:

root@mmedia:~# ps aux
USER      PID %CPU %MEM  VSZ  RSS TTY      STAT START  TIME COMMAND
root        1  0.1  0.0  480  240 ?        S    01:40  0:00 init [3]   
root        2  0.0  0.0    0    0 ?        SN  01:40  0:00 [ksoftirqd/0]
root        3  0.0  0.0    0    0 ?        S<  01:40  0:00 [events/0]
root        4  0.0  0.0    0    0 ?        S<  01:40  0:00 [khelper]
root        5  0.0  0.0    0    0 ?        S<  01:40  0:00 [kblockd/0]
root        6  0.0  0.0    0    0 ?        D    01:40  0:00 [khubd]
root        37  0.0  0.0    0    0 ?        S    01:40  0:00 [kapmd]
root        39  0.0  0.0    0    0 ?        S    01:40  0:00 [pdflush]
root        40  0.0  0.0    0    0 ?        S    01:40  0:00 [pdflush]
root        42  0.0  0.0    0    0 ?        S<  01:40  0:00 [aio/0]
root        41  0.0  0.0    0    0 ?        S    01:40  0:00 [kswapd0]
root        43  0.0  0.0    0    0 ?        S    01:40  0:00 [jfsIO]
root        44  0.0  0.0    0    0 ?        S    01:40  0:00 [jfsCommit]
root        45  0.0  0.0    0    0 ?        S    01:40  0:00 [jfsSync]
root        46  0.0  0.0    0    0 ?        S<  01:40  0:00 [xfslogd/0]
root        47  0.0  0.0    0    0 ?        S<  01:40  0:00 [xfsdatad/0]
root        48  0.0  0.0    0    0 ?        S    01:40  0:00 [xfsbufd]
root      190  0.0  0.0    0    0 ?        S    01:40  0:00 [kseriod]
root      200  0.0  0.0    0    0 ?        S    01:40  0:00 [kjournald]
root      371  0.0  0.0  1344  372 ?        S<s  01:40  0:00 udevd
root      631  0.0  0.0    0    0 ?        S    01:40  0:00 [kjournald]
root      632  0.0  0.0    0    0 ?        S    01:40  0:00 [kjournald]
root      633  0.0  0.0    0    0 ?        S    01:40  0:00 [kjournald]
root      634  0.0  0.0    0    0 ?        S    01:40  0:00 [kjournald]
root      786  0.0  0.1  2236 1208 ?        Ss  01:40  0:00 /bin/sh /etc/rc.d/rc.M
root      823  0.0  0.0  1412  600 ?        Ss  01:40  0:00 /usr/sbin/syslogd
root      826  0.0  0.0  1344  456 ?        Ss  01:40  0:00 /usr/sbin/klogd -c 3 -x
root      846  0.0  0.0  1372  512 ?        Ss  01:40  0:00 /sbin/dhcpcd -d -t 10 eth0
root      857  0.0  0.0  1372  512 ?        Ss  01:40  0:00 /sbin/dhcpcd -d -t 10 eth1
root      871  0.0  0.1  2236 1208 ?        S    01:40  0:00 /bin/sh /etc/rc.d/rc.M
root      911  0.0  0.0  1380  528 ?        Ss  01:40  0:00 /usr/sbin/inetd
root      932  0.0  0.1  3140 1412 ?        Ss  01:40  0:00 /usr/sbin/sshd
root      1883  0.0  0.1  2228 1176 ?        S    01:40  0:00 /bin/sh /etc/hotplug/usb.rc start
root      1897  0.0  0.1  2236 1184 ?        S    01:40  0:00 /bin/bash /etc/hotplug/usb.agent
root      2023  0.0  0.0  1416  528 ?        D    01:41  0:00 /sbin/usbmodules --mapfile /lib/modules/2.6.8.1/modules.usbmap --device /proc/bus/usb/001/001
root      2025  0.0  0.1  2148 1072 ?        S    01:41  0:00 /bin/sh /etc/rc.d/rc.cups start
root      2032  0.0  0.0  3240  732 ?        S    01:41  0:00 /usr/sbin/cupsd
root      2033  0.0  0.1  4712 1504 ?        Ss  01:41  0:00 /usr/sbin/cupsd
root      2043  0.0  0.0  3644  884 ?        D    01:41  0:00 /usr/lib/cups/backend/epson
root      2044  0.0  0.1  5752 1676 ?        Rs  01:41  0:00 sshd: root@pts/0
root      2046  0.0  0.2  3480 2408 pts/0    Rs  01:41  0:00 -bash
root      2081  0.0  0.0  2280  812 pts/0    R+  01:46  0:00 ps aux

It seems to be very busy at usb portion (rc.hotplug)
And also why does the rc.cupsd start don't go away?

gbonvehi 09-30-2004 12:56 PM

You could avoid starting hotplug and load the necessary modules yourself (ie: uncomment them in rc.modules). It isn't necesarry to run fc-cache on every start, just if/when you install a new font.

carboncopy 09-30-2004 12:59 PM

What does this line actually do?
Code:

/sbin/usbmodules --mapfile /lib/modules/2.6.8.1/modules.usbmap --device /proc/bus/usb/001/001
How can I avoid it?

gbonvehi 09-30-2004 01:01 PM

From: man usbmodules
"List kernel driver modules available for a plugged in USB device"

Read that man page it explains what it does, and I guess it can be avoided but never tried.

carboncopy 09-30-2004 01:02 PM

This is what ps aux looks like in 2.6.7 kernel with no problem

Code:

root@mmedia:~# ps aux
USER      PID %CPU %MEM  VSZ  RSS TTY      STAT START  TIME COMMAND
root        1  0.9  0.0  480  240 ?        S    02:01  0:00 init [3]   
root        2  0.0  0.0    0    0 ?        SN  02:01  0:00 [ksoftirqd/0]
root        3  0.0  0.0    0    0 ?        S<  02:01  0:00 [events/0]
root        4  0.0  0.0    0    0 ?        S<  02:01  0:00 [khelper]
root        5  0.0  0.0    0    0 ?        S<  02:01  0:00 [kblockd/0]
root        6  0.3  0.0    0    0 ?        S    02:01  0:00 [khubd]
root        35  0.0  0.0    0    0 ?        S    02:01  0:00 [kapmd]
root        37  0.0  0.0    0    0 ?        S    02:01  0:00 [pdflush]
root        38  0.0  0.0    0    0 ?        S    02:01  0:00 [pdflush]
root        40  0.0  0.0    0    0 ?        S<  02:01  0:00 [aio/0]
root        39  0.0  0.0    0    0 ?        S    02:01  0:00 [kswapd0]
root      182  0.0  0.0    0    0 ?        S    02:01  0:00 [kseriod]
root      183  0.0  0.0    0    0 ?        S    02:01  0:00 [i2oevtd]
root      193  0.0  0.0    0    0 ?        S    02:01  0:00 [kjournald]
root      358  0.0  0.0  1344  372 ?        S<s  02:01  0:00 udevd
root      630  0.0  0.0    0    0 ?        S    02:01  0:00 [kjournald]
root      631  0.0  0.0    0    0 ?        S    02:01  0:00 [kjournald]
root      632  0.0  0.0    0    0 ?        S    02:01  0:00 [kjournald]
root      633  0.0  0.0    0    0 ?        S    02:01  0:00 [kjournald]
root      822  0.0  0.0  1412  600 ?        Ss  02:01  0:00 /usr/sbin/syslogd
root      825  0.0  0.0  1344  456 ?        Ss  02:01  0:00 /usr/sbin/klogd -c 3 -x
root      845  0.0  0.0  1372  512 ?        Ss  02:01  0:00 /sbin/dhcpcd -d -t 10 eth0
root      856  0.0  0.0  1372  512 ?        Ss  02:01  0:00 /sbin/dhcpcd -d -t 10 eth1
root      899  0.0  0.0  1380  528 ?        Ss  02:01  0:00 /usr/sbin/inetd
root      931  0.2  0.1  3140 1412 ?        Ss  02:01  0:00 /usr/sbin/sshd
root      2046  0.2  0.2  5236 2308 ?        Ss  02:01  0:00 /usr/sbin/cupsd
root      2087  0.0  0.1  5752 1672 ?        Rs  02:02  0:00 sshd: root@pts/0
root      2219  0.0  0.0  1460  536 ?        S    02:02  0:00 /usr/sbin/crond -l10
daemon    2221  0.0  0.0  1468  632 ?        Ss  02:02  0:00 /usr/sbin/atd -b 15 -l 1
root      2225  0.0  0.0  1336  508 ?        Ss  02:02  0:00 /usr/sbin/apmd
root      2233  0.0  0.1  3672 1716 ?        Ss  02:02  0:00 /usr/sbin/httpd
root      2235  0.0  0.0  1392  520 ?        Ss  02:02  0:00 /usr/sbin/gpm -m /dev/mouse -t imps2
root      2237  0.0  0.0  1336  480 tty1    Ss+  02:02  0:00 /sbin/agetty 38400 tty1 linux
root      2238  0.0  0.0  1336  480 tty2    Ss+  02:02  0:00 /sbin/agetty 38400 tty2 linux
root      2239  0.0  0.0  1336  480 tty3    Ss+  02:02  0:00 /sbin/agetty 38400 tty3 linux
root      2240  0.0  0.0  1336  480 tty4    Ss+  02:02  0:00 /sbin/agetty 38400 tty4 linux
root      2241  0.0  0.0  1336  480 tty5    Ss+  02:02  0:00 /sbin/agetty 38400 tty5 linux
root      2242  0.0  0.0  1336  480 tty6    Ss+  02:02  0:00 /sbin/agetty 38400 tty6 linux
nobody    2327  0.0  0.1  3696 1724 ?        S    02:02  0:00 /usr/sbin/httpd
nobody    2328  0.0  0.1  3696 1724 ?        S    02:02  0:00 /usr/sbin/httpd
nobody    2329  0.0  0.1  3696 1724 ?        S    02:02  0:00 /usr/sbin/httpd
nobody    2330  0.0  0.1  3696 1724 ?        S    02:02  0:00 /usr/sbin/httpd
nobody    2331  0.0  0.1  3696 1724 ?        S    02:02  0:00 /usr/sbin/httpd
root      2354  4.6  0.2  3476 2404 pts/0    Rs  02:02  0:00 -bash
root      2392  0.0  0.0  2280  812 pts/0    R+  02:02  0:00 ps aux


gbonvehi 09-30-2004 01:06 PM

It seems to be some trouble with a usb device on 2.6.8.1 that's taking too long to be probed. Try unpluggin usb devices you have.

carboncopy 09-30-2004 01:39 PM

Could it be that my PCI-USB 2.0 card (VIA chip) is causing the problem?
Nothing it plug in there while boot-up.

I do have an USB-keyboard and mouse plug in to the mobo USB ports

Will try rebooting in the morning. I can hardly open my eyes now. Yawn...

worldwiderob 09-30-2004 03:40 PM

I agree with gbonvehi about loading modules in rc.modules.

Compile your kernel with hotplugging support on (but not PCI hotplugging - unless you know for sure you can hot swap PCI cards ;) ). It also very useful to compile your USB controller and the HID driver directly into your kernel, because you always want to be able to use your USB keyboard and mouse to talk to your machine. Not so important if you have PS/2 ports and devices available as well.

Maybe I'm wrong but I think hotplug is a misnomer for rc.hotplug and /etc/hotplug. At the least it is wrong that the /etc/hotplug/*.rc scripts refer to recovering "hotplug" events that couldn't be handled earlier in the boot process. Now, detecting a PCI device that was inserted before power on is not hotplugging! PCI is not hot pluggable on 99.9999% of computers -- it requires specialist equipment. You can't just insert a device into an ordinary PCI slot on a running machine :)

I think the main job of the rc.hotplug is to pick up on lost plug and play (not hotplug) events during boot up, which couldn't be handled previously in the boot process. USB hotplugging (connecting and disconnecting devices on a running machine) works without this script, at least as long as the drivers are already running.

So isn't rc.hotplug just automatic hardware detection that gets your system up and running, but can be discarded if you optimise your kernel and startup scripts? Like Gentoo (genkern vs manual kernel compile)? Or does it do something else which carboncopy and myself should keep in mind?


All times are GMT -5. The time now is 09:30 PM.