Bug 744932 - plymouthd causes 5 s delay on reboot/shutdown
Summary: plymouthd causes 5 s delay on reboot/shutdown
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: plymouth
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-10 20:51 UTC by Michal Schmidt
Modified: 2013-02-13 21:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 21:46:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Schmidt 2011-10-10 20:51:26 UTC
Description of problem:
I always get a 5 seconds delay between
  Sending SIGTERM to remaining processes...
and
  Sending SIGKILL to remaining processes...
when I reboot my F16 VM.

The 5 s is the maximum time systemd is willing to give the processes to exit cleanly after sending them SIGTERM. It is not expected that this timeout would be reached under normal circumstances, because most processes exit quickly. systemd can detect when no more processes are remaining.

After adding some debug prints into systemd I found that the only process not exiting after SIGTERM is plymouthd. I confirmed this also by masking out plymouth-reboot.service and verifying that the 5 s delay no longer occurred.

This plymouth commit is to blame:
http://cgit.freedesktop.org/plymouth/commit/?id=841068ba125f30fedd52b62490c6a7424b30c768
    Hang around until killed by init at shutdown

    init does two rounds of killing at shutdown: a round of SIGTERMs and
    a round of SIGKILLs. We want to stay alive until the SIGKILL round so
    we ignore the SIGTERM signal. 

This assumes that init does a constant-time sleep between sending SIGTERM and SIGKILL. This is not true with systemd. systemd can detect when there are no more processes to wait for and cut the waiting. By ignoring SIGTERM, plymouthd makes this optimization impossible and forces systemd to always wait the maximum time (5 s).

Please revert the commit.

Version-Release number of selected component (if applicable):
plymouth-0.8.4-0.20110822.2.fc16.x86_64
systemd-36-3.fc16.x86_64

Comment 1 Michal Schmidt 2012-01-19 17:27:44 UTC
From #systemd:
<halfline__> michich: i think reverting the patch makes sense, but we actually need to do more than just revert patch
<michich> halfline__, any way I can help?
<halfline__> michich: the whole reason plymouth needs to stick around is because the kernel will automatically switch back to the fb console when plymouth dies if using drm apis
<halfline__> so what we need to do is
<halfline__> pass the handle to the fb being used by plymouth to systemd
<halfline__> so it doesn't go away when it's automatically unreffed at plymouth exit time
<halfline__> then plymouth can get the splash to a good end frame and leave without worry about the screen blinking back to text
<halfline__> so to fix this right we really need more protocol added and more integration with plymouthd
<halfline__> s/plymouthd/systemd/
<michich> interesting
<halfline__> i'm assuming we could just pass the open fd right over the socket to systemd and systemd could just hold on to it
<halfline__> and things will just work
<halfline__> needs testing though
<halfline__> we definitely don't want systemd linking to the various libdrm libraries, though
<halfline__> so hopefully the fd passing will be enough

Comment 2 Michal Schmidt 2012-02-24 12:51:14 UTC
Thanks for fixing this upstream:
http://cgit.freedesktop.org/plymouth/commit/?id=488a5d65788022c50987d57f3a1e598c2bff6382

Is there going to be a Fedora update?

Comment 3 Fedora End Of Life 2013-01-16 17:16:15 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Fedora End Of Life 2013-02-13 21:46:25 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.