Summary: | sys-apps/openrc: Patch to measure time required for starting daemons (was: delay to sys-auth/consolekit init script) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Fabio Rossi <rossi.f> |
Component: | Current packages | Assignee: | OpenRC Team <openrc> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | paul |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=487592 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
consolekit-0.1.rc
consolekit-0.1.rc openrc-measure-delay.diff |
Description
Fabio Rossi
2011-06-02 15:06:11 UTC
Created attachment 275621 [details]
consolekit-0.1.rc
I have added a delay of 500ms to correct the problem. I have also removed the -q option not recognized by start-stop-daemon
Created attachment 275645 [details]
consolekit-0.1.rc
I'm sorry, it has to be 600ms
Thanks for submitting your init script updates, assigning to maintainers Created attachment 276109 [details]
openrc-measure-delay.diff
I have written the simple attached patch to (roughly) estimate the delay needed for the init script (using openrc). In the previous post I have put 600ms but it doesn't seem to be enough. On my system I got 840ms during last reboot. Adding some margin, I guess 1000ms should be enough. I'll keep an eye on the number after each (re)boot to have better statistics.
After more than one month of analysis, the maximum delay measured with the patch openrc-measure-delay.diff is 1320ms but I bet this number is sensible to system speed, load during init of parallel scripts, etc. So I'm thinking to an alternative to the --wait option for start-stop-daemon. Do you think it makes sense the introduction of another option, --wait-until-timeout? In this case start-stop-daemon is given with the maximum time limit it should wait. Moving to openrc@ since Comment #4 is a patch to OpenRC code. And since nobody else has reported anything like this against ConsoleKit, I'm reclutant in adding any delays to it's init script. It appears to me the problem is a circular dependency between dbus and consolekit. If a put dbus in my default run level. The dbus-daemon automatically starts console-kit-daemon. console-kit-daemon then creates the pid file at /var/run/Consolekit/pid. Now if the consolekit script is run. Because it needs the dbus. Dbus starts console-kit-daemon which creates the pid. The consolekit script errors out not because it can't create the pid file but because it has already been created by dbus running console-kit-daemon. Hope that makes sense. We discussed this on #openrc and William wants to take a look at it. |