Saved logins/passwords missing after Firefox killed by power loss
Categories
(Toolkit :: Password Manager, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox79 | --- | fixed |
People
(Reporter: mbrubeck, Unassigned)
Details
(Keywords: dataloss)
I have one old laptop with a faulty power supply that sometimes causes it to power off unexpectedly, without shutting down properly. This laptop is running Firefox Nightly on Linux.
Three times now, when the machine lost power with Firefox running, all saved logins and passwords were missing from the profile on the next startup. They are not visible in about:logins, and are not auto-filled on web sites. Even after choosing "Sync Now" from the Firefox Account menu, the logins are still missing (though they are still present on other profiles connected to the same Firefox Account). I was only able to fix this by restoring the entire profile directory from backup, or by deleting it and syncing data to a fresh profile.
I didn't file a bug the first time this happened, because I know it's not possible to make any guarantees about data persistence in this situation. But, since it seems to consistently lose my logins even while all other profile data stays intact, perhaps there is something that should be fixed to make it more resilient.
I'm a former Mozilla employee, and would be happy to share (privately) the contents of an affected profile, if it helps. Or I can do some local debugging or patching, if someone can tell me where to start.
Comment 1•4 years ago
|
||
Hi Matt :) the saved logins are persisted to a logins.json in your profile directory. It would be useful to confirm if that file exists and is valid/parseable JSON after powering back up (but before starting nightly)
Reporter | ||
Comment 2•4 years ago
|
||
Okay. I didn't manage to save the profile contents before starting Nightly, but I'll make sure to do so next time. The file after starting Nightly contains valid JSON, but without any of the previous entries in the logins
array.
Comment 3•4 years ago
|
||
Hi Matt, sorry to hear this. I suspect there is an issue with OS.File.writeAtomic
so if you want to debug that the JS caller is at https://searchfox.org/mozilla-central/rev/fac90408bcf52ca88a3dcd2ef30a379b68ab24e2/toolkit/modules/JSONFile.jsm#337
This is probably a duplicate of bug 1597358 or similar and the good news is that coincidentally we have started on a mitigation for this issue by saving a backup file that we will automatically restore from when we detect the file system issue or corruption. It would still be awesome to solve the root issue as writeAtomic is used by other consumers too but I'm not sure it's easy to reproduce. IIRC someone wasn't able to reproduce the problem with kill -9
in the past.
Reporter | ||
Comment 4•4 years ago
|
||
Yes, this looks the same as bug 1597358. I'll close this as a duplicate and put any further info over there.
Updated•4 years ago
|
Description
•