Summary: | plymouthd startup returns before plymouthd is ready to handle requests | ||
---|---|---|---|
Product: | plymouth | Reporter: | Chris Bainbridge <chris.bainbridge> |
Component: | general | Assignee: | Ray Strode [halfline] <rstrode> |
Status: | RESOLVED NOTOURBUG | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | rstrode |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Chris Bainbridge
2015-03-09 13:02:15 UTC
So this bug report doesn't seem right to me. The code doesn't call ply_detach_daemon (which exits the parent) until after ply_boot_server_listen. Are you sure you've pegged the problem right? If so, can you explain the race to me in more detail? Upstart doesn't wait for the call to plymouthd to exit, it just waits for it to fork. The upstart script is like: expect fork exec /sbin/plymouthd --mode=shutdown post-start exec /bin/plymouth show-splash afaics upstart starts plymouthd, and when plymouthd forks, upstart then immediately executes "plymouth show-splash". At this point plymouthd isn't ready - race condition - which causes the splash screen to fail. "The daemon should ensure that when it completes the (second) fork that it is fully initialized, since Upstart uses the fork count to determine service readiness" http://upstart.ubuntu.com/cookbook/#daemon-behaviour This is probably more the fault of the upstart script than of plymouthd. It seems like it will be easier to just fix the script. main.c forks before opening the listening port (calls ply_create_daemon before start_boot_server). Is this intentional? Would you consider it a bug in plymouthd? Hi, (In reply to Chris Bainbridge from comment #3) > main.c forks before opening the listening port (calls ply_create_daemon > before start_boot_server). Is this intentional? Yes. > Would you consider it a bug in plymouthd? No. Upstart should wait until the parent exits. We exit the parent when plymouthd is ready. It must have a way of coping with this situation, since it's not a novel or exotic way to daemonize. Thanks for clarifying. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.