On Wed, 2017-01-11 at 16:20 +0100, Vincent Lefevre wrote: > On 2017-01-11 15:09:49 +0000, Ben Hutchings wrote: > > Unless you can show that some data had been written *and flushed* to > > disk by the application, but was not readable afterward - this does not > > count. Writes are buffered, and user space has to deal with that. > > If I understand the journalctl log correctly, the system does > a power off without a clean shutdown: Sorry, I didn't understand what you were trying to point out in the system log. I had thought that pressing the power button was causing an immediate power-off, but you're showing me that it results in a resume immediately followed by a software-controlled shutdown. Right? It seems like there are two separate bugs: 1. Power button resumes and also generates a power-off input event (kernel bug) 2. Some writes not flushed to disk during shutdown (probably a kernel bug, but systemd could potentially break this) > [...] > Dec 23 10:51:01 zira systemd-logind[803]: Powering Off... > Dec 23 10:51:01 zira systemd-logind[803]: System is powering down. > Dec 23 10:51:01 zira systemd[1]: Stopping Manage, Install and Generate Color Pro > > then nothing after that!!! This is were the problem is, not in the > application, which cannot know when the machine will power off. That is why applications should flush writes before considering them complete. But in case of a software-controlled shutdown, all writes sent to the kernel should get flushed even if applications don't explicitly do so. Ben. -- Ben Hutchings The generation of random numbers is too important to be left to chance. - Robert Coveyou
Attachment:
signature.asc
Description: This is a digitally signed message part