Created attachment 55932 gdb trace of all the calls to close(2) when saving a document
Seems reasonable. I used gdb to find all the stacks that call close when saving a file (in 3.4.4, since I didn't have time to build my own package with symbols). There's a lot of calls (27), but most are very similar. Transfer_Impl indeed appears in several, and SfxMedium in almost all of them. I noticed that some of the calls are for backing up stuff. Ideally the backup(s) should be fsync'ed too so that a usable backup will be present even if a power outage occurs in the middle of saving the real file, since copying is not atomic like rename is. -- 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