Launchpad has imported 5 comments from the remote bug at https://bugs.freedesktop.org/show_bug.cgi?id=40607.
If you reply to an imported comment from within Launchpad, your comment will be sent to the remote bug automatically. Read more about Launchpad's inter-bugtracker facilities at https://help.launchpad.net/InterBugTracking. ------------------------------------------------------------------------ On 2011-09-03T18:13:44+00:00 Tristan Schmelcher wrote: 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 http://ldn.linuxfoundation.org/blog- entry/delayed-allocation-and-zero-length-file-problem and http://www.linuxfoundation.org/news-media/blogs/browse/2009/03/don%E2%80 %99t-fear-fsync. 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 https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/817326 You can see evidence of more users encountering this at: http://ubuntuforums.org/showthread.php?p=11215058 http://user.services.openoffice.org/en/forum/viewtopic.php?f=6&t=39666 Reply at: https://bugs.launchpad.net/df- libreoffice/+bug/817326/comments/4 ------------------------------------------------------------------------ On 2011-09-08T10:15:54+00:00 Davian818 wrote: Since when filesystem issues are application concern? Reply at: https://bugs.launchpad.net/df- libreoffice/+bug/817326/comments/5 ------------------------------------------------------------------------ On 2011-09-08T15:47:54+00:00 Tristan Schmelcher wrote: This is not a filesystem issue, the filesystem is behaving correctly. In order to persist data to disk (on _any_ filesystem), the application must call fsync(). This is part of the POSIX spec. By not calling fsync(), LibreOffice is basically _telling_ the filesystem that it is not important to retain this file in the event of a power outage. Reply at: https://bugs.launchpad.net/df- libreoffice/+bug/817326/comments/6 ------------------------------------------------------------------------ On 2011-09-23T09:42:37+00:00 Tristan Schmelcher wrote: Here's a decent example of how to fsync() from Java: http://android- developers.blogspot.com/2010/12/saving-data-safely.html. Note that if using buffered I/O then you also need to flush the data before the sync(). Reply at: https://bugs.launchpad.net/df- libreoffice/+bug/817326/comments/9 ------------------------------------------------------------------------ On 2011-10-27T11:32:32+00:00 John-iglar wrote: I'm adding a "me too" here. Our school is using Ubuntu and LibreOffice and we have had many students lose work due to this bug. Repeat Tristan's comment - not a filesystem issue, but application. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/317781/comments/45 Reply at: https://bugs.launchpad.net/df- libreoffice/+bug/817326/comments/10 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/817326 Title: [Upstream] Previously-saved LibreOffice document lost by power outage (became 0 bytes long) - LibreOffice should call fsync To manage notifications about this bug go to: https://bugs.launchpad.net/df-libreoffice/+bug/817326/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs