[Libreoffice-bugs] [Bug 40607] New: Previously-saved LibreOffice document lost by power outage (became 0 bytes long) - LibreOffice should call fsync

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Sep 3 11:13:44 PDT 2011


           Summary: Previously-saved LibreOffice document lost by power
                    outage (became 0 bytes long) - LibreOffice should call
           Product: LibreOffice
           Version: LibO 3.3.3 release
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Libreoffice
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: tristan_schmelcher at alumni.uwaterloo.ca

I am using LibreOffice 3.3.3 on Ubuntu 11.04 amd64 (distro-provided packages).
Recently I was working on a document in LibreOffice 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
He strongly recommends to call fsync in this situation.

Please update LibreOffice to fsync() saved files so that other users do not
lose their data like I did.

Forwarding upstream from Ubuntu bug at

You can see evidence of more users encountering this at:

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the Libreoffice-bugs mailing list