sugarlabs / sugar

Sugar GTK shell
GNU General Public License v3.0
252 stars 240 forks source link

User data not saved on forced shutdown #903

Closed srevinsaju closed 3 years ago

srevinsaju commented 4 years ago

User data of a new user is not saved by sugar on a forced shutdown (possibly, power button) and it can have potential data loss in other components too

STEPS TO REPRODUCE:

You will notice sugar asks for Name, Grade again

quozl commented 4 years ago

Yes, and this is unavoidable without slowing down Sugar by adding a wait for data to be written to media. On OLPC OS on the XO laptop, the jffs2 filesystem and powerd daemon took care of this for us; touching the power button caused a filesystem synchronisation before power was lost. On conventional operating systems such as Debian, data loss will always occur if the virtual machine is terminated before the Linux kernel completes a write-back of dirty filesystem pages. This will happen with Debian independently of Sugar, so my argument is that this is a Linux problem, not a Sugar problem. My preference is not to fix it, instead concentrating on performance over data safety. Power loss or forced close of a VM is not a normal scenario to control for.

rabbitholecomputing commented 4 years ago

Agreed, this is definitively not a Sugar-specific problem. The same thing can and does happen under Windows, and MacOS.

srevinsaju commented 3 years ago

Makes sense. Closing this :smile: