[Upstream] Previously-saved LibreOffice document lost by power outage (became 0 bytes long) - LibreOffice should call fsync
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
LibreOffice |
Fix Released
|
Wishlist
|
|||
libreoffice (Ubuntu) |
Fix Released
|
Critical
|
Björn Michaelsen |
Bug Description
I was working on a document in LibreOffice today while my battery was low and so I was frequently saving, which I thought would help me if I lost power. However, when I eventually did lose power and later rebooted, the document had become 0 bytes long. LibreOffice was not able to restore the auto-saved copy either. As a result, I have lost a whole week of notes for one of my courses.
After researching online, it seems that this is caused by the application not calling fsync() (or fdatasync()) when saving files. Due to delayed allocation in modern filesystems, there is no guarantee that the new file's data has actually been written to disk unless the application calls fsync. So if an app writes a new file and replaces the old one with it without fsync'ing the new one first then there is a window of opportunity during which a power failure will result in the loss of BOTH versions of the file. In ext4 this window is also much larger than in ext3.
Theodore Tso blogged about this at http://
Please update LibreOffice to fsync() saved files so that other users do not lose their data like I did.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: libreoffice-core 1:3.3.2-1ubuntu5
ProcVersionSign
Uname: Linux 2.6.38-8-generic x86_64
Architecture: amd64
Date: Wed Jul 27 21:37:02 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
LANGUAGE=en_US:en
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: libreoffice
UpgradeStatus: Upgraded to natty on 2011-04-29 (89 days ago)
Changed in libreoffice (Ubuntu): | |
status: | New → Confirmed |
Changed in df-libreoffice: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
summary: |
- Previously-saved LibreOffice document lost by power outage (became 0 - bytes long) - LibreOffice should call fsync + [Upstream] Previously-saved LibreOffice document lost by power outage + (became 0 bytes long) - LibreOffice should call fsync |
Changed in df-libreoffice: | |
importance: | Medium → Critical |
Changed in libreoffice (Ubuntu): | |
importance: | High → Critical |
Changed in df-libreoffice: | |
status: | Confirmed → Incomplete |
Changed in df-libreoffice: | |
importance: | Critical → Wishlist |
Changed in df-libreoffice: | |
status: | Incomplete → Confirmed |
Changed in libreoffice (Ubuntu): | |
assignee: | nobody → DonMick (donmick) |
Changed in df-libreoffice: | |
status: | Confirmed → Fix Released |
Changed in libreoffice (Ubuntu): | |
assignee: | nobody → Björn Michaelsen (bjoern-michaelsen) |
I just lost a report I've been working on for four hours due to this bug. My machine crashed very shortly after saving, and upon reboot LibreOffice asks if I want to recover the file (it always asks this) but fails. The file is now at zero bytes and there is nothing in ~/.libreoffice/ 3/user/ backup
Linux x120e 2.6.38-11-generic x86_64
This is a very serious bug. I might lose my head over this one.