Summary: | Wallet lost when disk full | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | Wouter Coekaerts <wouter> |
Component: | kwallet | Assignee: | Michael Leupold <lemma> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 4.1 | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Wouter Coekaerts
2009-01-17 10:11:26 UTC
Usually kwalletd saves the wallet to disk on closing it or on changes. Do you know which of those two conditions lead to the empty wallet? Could you please also tell me which filesystem your HOME is using? I'm trying hard to reproduce this condition on an ext2 loop partition (since I don't plan to fill my whole harddrive) but unfortunately haven't managed to make it empty the file. The wallet closes automatically after some time of not being used, right? In that case it's probably because it got closed. (I wasn't there when the disk got full, so it wasn't on changes.) The filesystem is ext3. Testing this on a filesystem you really use would indeed be a very bad idea. Kwallet wasn't the only KDE program to lose data or settings. Btw, not only was the file system full, there was also a process (lftp) waiting for space to become available and immediately fill it again (continue downloading). So (depending on timing) if a file would be deleted, even writing a file of the same size right after that might fail. Thanks for the feedback. KWallet closes wallets automatically if you configured it to do so. Else wallets might stay open (or close immediately). Now, let me try to get this right. You assume: 1) The disk got full (while the wallet was closed) 2) You opened the wallet 3) The wallet closed again at some point (disk still full) Is that right? Or rather 2), 1), 3) ? I was thinking more 2,1,3. The wallet was open when the disk got full. Looking at its settings, it's configured to close the wallet after being unused for 180min. Alright, with some additional pointers I found the cause for this. kwalletd indeed never catered for full disks and I guess it's a miracle noone stumbled onto this before. As this is important I'll try to squeeze the fix into 4.2. SVN commit 912695 by mleupold: On saving the wallet, open the file unbuffered and check every single write operation for success. This seems to be the sanest way to avoid wallet corruption in extreme conditions (eg. full disk). BUG:181059 M +19 -6 kwalletbackend.cc WebSVN link: http://websvn.kde.org/?view=rev&revision=912695 Looks good. Thanks! SVN commit 913650 by mleupold: Backport of r912695 to 4.2: On saving the wallet, open the file unbuffered and check every single write operation for success. This seems to be the sanest way to avoid wallet corruption in extreme conditions (eg. full disk). CCBUG:181059 M +19 -6 kwalletbackend.cc WebSVN link: http://websvn.kde.org/?view=rev&revision=913650 |