Comment 7 for bug 1349566

Revision history for this message
Steve Langasek (vorlon) wrote :

Yes, per IRC, this is more or less the expected behavior of both systemd (logind) and upstart (poweroff). It's only the emergent behavior combined with a buggy kernel/hardware button behavior that's surprising.

As noted on IRC, there are three possible solutions:
 1) get the kernel fixed to not produce rapid-fire 'power button' events
 2) adjust logind to not process further poweroff events while one is still running (which requires special knowledge to know this is the case, since 'poweroff' returns immediately)
 3) change 'poweroff' itself to not behave this way when called by logind

I understand you've opted for option 1), which is what I recommended.

I am not closing this bug report as invalid, because while the trigger condition here is a kernel/hardware bug, it's still unexpected behavior that someone hitting the power button twice in quick succession on a server would cause an unclean shutdown, and we should ultimately also fix this via 2) or 3) as well.