Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83903 - Parallel startup hangs in busy wait (kernel dependent)
Summary: Parallel startup hangs in busy wait (kernel dependent)
Status: RESOLVED DUPLICATE of bug 69854
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-02 17:28 UTC by Ed Catmur
Modified: 2005-06-28 12:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2005-03-02 17:28:02 UTC
Parallel startup hangs at various points. (At least, if it doesn't hang, it's stalling for over 10 minutes.)

Investigation shows it is hanging in a busy wait at /lib/rcscripts/sh/rc-services.sh +622:

				# Wait until we have only one service running
				while [ "${count}" -gt 1 ]
				do
					count="$(jobs | tee /dev/stderr | grep -c "Running")"
				done

This does happen only on certain kernels; in my case the nitro series 2.6.11 release candidates. I imagine this is preemption related, or other desktop performance features. I am using the CFQ scheduler, if that's relevant.

Regardless, this busy wait is not good; even if it does not hang a system it is slowing down startup.

Would a "sleep 0.1" be acceptable?
Comment 1 Ed Catmur 2005-03-02 18:24:49 UTC
Hmm, the wait builtin is too sparse-featured to be useful here.

How about this hack:

        sleep 60 &
        trap "kill $!" SIGCHLD
        fg
        trap "" SIGCHLD
Comment 2 Ed Catmur 2005-03-02 19:30:13 UTC
Sorry, that should be

        sleep 60 &
        trap "kill $!" SIGCHLD
        fg
        trap - SIGCHLD
Comment 3 Ed Catmur 2005-06-28 12:49:42 UTC

*** This bug has been marked as a duplicate of 69854 ***