Bug Hunting Session
Bug 55004 - backup copy fails when using share / samba
Summary: backup copy fails when using share / samba
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 62556 67827 80539 (view as bug list)
Depends on:
Blocks: AutoSave-AutoRecovery-Backup Network
  Show dependency treegraph
 
Reported: 2012-09-17 10:07 UTC by marting
Modified: 2019-08-30 09:44 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description marting 2012-09-17 10:07:10 UTC
Hi! 

I think I found a bug:

Working with a file from samba and option "Always create backup copy" (tools -> options -> Load/Save -> General) always leads to the error: 

Error saving the document <file>: 
Error creating object.
Could not create backup copy.

the backup file _is_ created but zero bytes:

ls -l ~/.config/libreoffice/3/user/backup/

-rw-r----- 1 <user> <group> 0 Sep 17 12:02 <file>.bak


Option disbled: works
local file instead of samba file: works


thanks!

 greets,

 Martin
Comment 1 Thomas Hackert 2013-06-28 13:22:15 UTC
Hello Martin, *,
have you tried a newer version of LO than 3.6.0.4? Does your problem occurs there, too? I have no samba here to test, so this is only a little reminder ... ;)

If you error still occur:
1. Could you give us some more details like with distro on what archtecture are you using?
2. How do you connect your samba client to the server? And which samba version on the client and server are you using?
3. Which OS do you want to use via samba?
4. Would you be so kind to start LO from commandline to see, if there is any error message, please? And maybe with "soffice --backtrace" and attach the backtrace log to this bug?

Sorry for the inconvenience
Thomas.
Comment 2 marting 2013-06-28 14:50:46 UTC
(In reply to comment #1)
> Hello Martin, *,
> have you tried a newer version of LO than 3.6.0.4? Does your problem occurs
> there, too? I have no samba here to test, so this is only a little reminder
> ... ;)

Same error using Version 3.6.6.2 (Build ID: 3.6.6.2-9.fc18)

> 
> If you error still occur:
> 1. Could you give us some more details like with distro on what archtecture
> are you using?

Ubuntu when I reported the bug, fc18 now.

> 2. How do you connect your samba client to the server? And which samba
> version on the client and server are you using?

cifs mount (replaced some private parts with '*'):

//samba.*****.de/home on /samba type cifs (rw,nosuid,nodev,noexec,relatime,vers=1.0,sec=ntlmssp,cache=strict,unc=\\samba.***domain****\home,username=****,domain=****,uid=1000,forceuid,gid=0,noforcegid,addr=***IP***,file_mode=0644,dir_mode=0755,nounix,rsize=61440,wsize=65536,actimeo=1)

> 3. Which OS do you want to use via samba?
? Don't get it: client is Linux fc18, server is Red Hat Enterprise Linux Server release 6.1 (Santiago)
samba-3.5.6-86.el6_1.4.x86_64

> 4. Would you be so kind to start LO from commandline to see, if there is any
> error message, please? And maybe with "soffice --backtrace" and attach the
> backtrace log to this bug?

soffice --backtrace
GNU gdb (GDB) Fedora (7.5.1-38.fc18)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/lib64/libreoffice/program/soffice.bin...Reading symbols from /usr/lib/debug/usr/lib64/libreoffice/program/soffice.bin.debug...done.
done.
log will be saved as gdbtrace.log, this will take some time, patience...
(gdb) 

less gdbtrace.log 
warning: Currently logging to gdbtrace.log.  Turn the logging off and on to make the new setting effective.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: "/usr/lib/debug/usr/lib64/libicudata.so.49.1.1.debug": separate debug info file has no debug info
[New Thread 0x7ffff7fa3700 (LWP 6496)]
[New Thread 0x7fffedb44700 (LWP 6497)]
[New Thread 0x7fffed343700 (LWP 6498)]
[New Thread 0x7fffe6c56700 (LWP 6501)]
[New Thread 0x7fffe5ad9700 (LWP 6502)]
[New Thread 0x7fffe5217700 (LWP 6503)]
Detaching after fork from child process 6504.
[New Thread 0x7fffd3fff700 (LWP 6506)]
[Thread 0x7fffd3fff700 (LWP 6506) exited]
[Thread 0x7fffedb44700 (LWP 6497) exited]
[New Thread 0x7fffedb44700 (LWP 6525)]
[New Thread 0x7fffd3fff700 (LWP 6526)]
[New Thread 0x7fffd1483700 (LWP 6527)]
[Thread 0x7fffd3fff700 (LWP 6526) exited]
[Thread 0x7fffd1483700 (LWP 6527) exited]
[New Thread 0x7fffd1483700 (LWP 6528)]
[New Thread 0x7fffd3fff700 (LWP 6529)]
[Thread 0x7fffd1483700 (LWP 6528) exited]
[New Thread 0x7fffd1483700 (LWP 6538)]
[Thread 0x7fffd3fff700 (LWP 6529) exited]
[Thread 0x7fffd1483700 (LWP 6538) exited]
[New Thread 0x7fffd1483700 (LWP 6539)]
[New Thread 0x7fffd3fff700 (LWP 6540)]
[Thread 0x7fffd3fff700 (LWP 6540) exited]
[New Thread 0x7fffd3fff700 (LWP 6541)]
[Thread 0x7fffd3fff700 (LWP 6541) exited]
[Thread 0x7fffd1483700 (LWP 6539) exited]
[New Thread 0x7fffd1483700 (LWP 6542)]
[Thread 0x7fffd1483700 (LWP 6542) exited]
[New Thread 0x7fffd1483700 (LWP 6545)]
[New Thread 0x7fffd3fff700 (LWP 6546)]
[Thread 0x7fffd3fff700 (LWP 6546) exited]
[Thread 0x7fffd1483700 (LWP 6545) exited]
[New Thread 0x7fffd1483700 (LWP 6547)]
[Thread 0x7fffd1483700 (LWP 6547) exited]
[Thread 0x7fffe6c56700 (LWP 6501) exited]
[New Thread 0x7fffe6c56700 (LWP 6548)]
[Thread 0x7fffe6c56700 (LWP 6548) exited]
[New Thread 0x7fffe6c56700 (LWP 6549)]
[Thread 0x7fffe6c56700 (LWP 6549) exited]
[Thread 0x7fffed343700 (LWP 6498) exited]
[Thread 0x7fffe5217700 (LWP 6503) exited]
[Thread 0x7ffff7fa3700 (LWP 6496) exited]
[Thread 0x7fffe5ad9700 (LWP 6502) exited]
[Thread 0x7ffff7fb4980 (LWP 6492) exited]
[Inferior 1 (process 6492) exited normally]
/usr/lib64/libreoffice/program/gdbtrace:8: Error in sourced command file:
No stack.
Missing separate debuginfos, use: debuginfo-install gtk2-2.24.18-1.fc18.x86_64
quit

unfortunately this seems to be not available:

~>sudo debuginfo-install gtk2-2.24.18-1.fc18.x86_64
[...]
No debuginfo packages available to install
Comment 3 Thomas Hackert 2013-07-03 16:06:55 UTC
Hello Martin, *,
(In reply to comment #2)
> (In reply to comment #1)
> > have you tried a newer version of LO than 3.6.0.4? Does your problem occurs
> > there, too? I have no samba here to test, so this is only a little reminder
> > ... ;)
> 
> Same error using Version 3.6.6.2 (Build ID: 3.6.6.2-9.fc18)

have you tried one of the 4.x builds (either the stable 4.0.4 or the dev build 4.1.0.1RC)?

> > If you error still occur:
> > 1. Could you give us some more details like with distro on what archtecture
> > are you using?
> 
> Ubuntu when I reported the bug, fc18 now.

Thanks for your info :)

> > 2. How do you connect your samba client to the server? And which samba
> > version on the client and server are you using?
> 
> cifs mount (replaced some private parts with '*'):

OK

> //samba.*****.de/home on /samba type cifs
> (rw,nosuid,nodev,noexec,relatime,vers=1.0,sec=ntlmssp,cache=strict,
> unc=\\samba.***domain****\home,username=****,domain=****,uid=1000,forceuid,
> gid=0,noforcegid,addr=***IP***,file_mode=0644,dir_mode=0755,nounix,
> rsize=61440,wsize=65536,actimeo=1)

As I have not the knowledge about samba, I let this to comment from one of the devs ... ;)

> > 3. Which OS do you want to use via samba?
> ? Don't get it: client is Linux fc18, server is Red Hat Enterprise Linux
> Server release 6.1 (Santiago)
> samba-3.5.6-86.el6_1.4.x86_64

That's the info, I wanted to get ... ;) Thanks :)

> > 4. Would you be so kind to start LO from commandline to see, if there is any
> > error message, please? And maybe with "soffice --backtrace" and attach the
> > backtrace log to this bug?
<snip>
I snip the backtrace part, but hopefully one of the devs find something useful in it ... ;)

> [Inferior 1 (process 6492) exited normally]
> /usr/lib64/libreoffice/program/gdbtrace:8: Error in sourced command file:
> No stack.
> Missing separate debuginfos, use: debuginfo-install
> gtk2-2.24.18-1.fc18.x86_64
> quit
> 
> unfortunately this seems to be not available:
> 
> ~>sudo debuginfo-install gtk2-2.24.18-1.fc18.x86_64
> [...]
> No debuginfo packages available to install

But maybe there is one gtk2-2.24.18-1.fc18.dbg (debug) package in the repository, which is missing ... ;)
Sorry for the inconvenience
Thomas.
Comment 4 marting 2013-07-04 11:35:34 UTC
> have you tried one of the 4.x builds (either the stable 4.0.4 or the dev
> build 4.1.0.1RC)?

Just installed fc19 on different machine:

libreoffice-core-4.1.0.1-3.fc19.x86_64

same error:
Samba + "Always create backup copy" does not work.

greets,

 Martin
Comment 5 Jacques Guilleron 2013-07-04 12:59:59 UTC
Hi marting,

We met same issue on Windows, but this has been fixed recenntly. Directory for backup was mssing. Please see:
Bug 65501 - FILESAVE Can not save a modified document with backups enabled

Thank you,

Jacques
Comment 6 Uwe Dippel 2013-08-06 13:00:05 UTC
It is a bit of a disappointment, that this bug has been creeping around since 2006. </rant>

I can confirm this. And I fail to have a good workaround. And I can confirm that the backup directory exists. And I can add some remarks:
1. It always works when I save to a new file name on the folder (mounted cifs)
2. It never works when I 'save' to the then existing file name. The .bak is actually created, on the local drive, but with a size of 0. Then it fails to update the file on the shared folder.
3. The best of the worse workarounds: I create two almost identical files on the drive, and 'toggle' to which I store; because if I have file1 open and work on it, I can always save as file2, and when I have file2 open, I can always save as file1. But having file1 open, I cannot save to file1 without the error message coming up; same with file2. Conclusion: it only fails if one wants to store to the same, open, file.
Comment 7 Maxim Monastirsky 2013-08-13 05:11:01 UTC
*** Bug 62556 has been marked as a duplicate of this bug. ***
Comment 8 Maxim Monastirsky 2013-08-13 05:11:40 UTC
*** Bug 67827 has been marked as a duplicate of this bug. ***
Comment 9 Maxim Monastirsky 2013-08-13 05:13:11 UTC
Changed version to oldest known (from bug 62556)
Comment 10 HansPL 2013-10-07 11:58:03 UTC
CONFIRMED here with LO 4.0.3 and LO 4.1.2.3 on Linux Mint Debian Ed.,  also on Win7.  Didn't really notice it with LO 3.x before,  but now it is permanent:  

Editing and saving a writer or calc file on a local ext4 or NTFS disk works;  the backup file on a local NTFS disk is correctly created.  All fine so far.

Editing and saving a writer or calc file on a CIFS mount (our common file server) fails with "Backup could not be created" while the backup file is created with a size of 0 (regardless whether it existed before or not).  Saving with backup disabled works.  

Moving my ~H:/config/libreoffice/4 and /3 away (thus forcing LO to create a  new blank profile) does not help.  

I regard this as a rather severe bug since it effectively blocks the use of the backup feature!  Because of this bug I just upgraded to 4.1.2.3,  but to no avail.  

Hans
Comment 11 HansPL 2013-10-07 12:09:20 UTC
FWIW:  our CIFS server is openSUSE 12.1, Samba version 3.6.3-34.11.1-2788-SUSE-SL12.1-x86_64 with unix extensions = no
Comment 12 ign_christian 2014-06-26 03:46:57 UTC
*** Bug 80539 has been marked as a duplicate of this bug. ***
Comment 13 HansPL 2014-09-16 07:12:01 UTC
Two years now and no response…? 

I'd like to raise Importance to Major, since this bug effectively blocks LO from using backup files in a company environment!  

Hans
Comment 14 Eugene 2014-09-17 08:51:28 UTC
+1
It's huge inconvenience in a corporative environment/
Comment 15 Cor Nouws 2014-09-17 11:30:30 UTC
(In reply to comment #14)
> It's huge inconvenience in a corporative environment/

Indeed. There are ways to solve this for those that do not want to wait for ..

Question: did this work before version  3.6.5.2 ?

thanks,
Cor
Comment 16 HansPL 2014-09-17 11:35:35 UTC
(In reply to comment #15)
> Indeed. There are ways to solve this for those that do not want to wait for

Ehm… which ways?  (Please don't say MS Office)

> 
> Question: did this work before version  3.6.5.2 ?

Yes, we did use it with some Version 3 — don't know exactly which one, probably 3.3.  

Hans
Comment 17 Cor Nouws 2014-09-17 12:21:21 UTC
Hi Hans,

(In reply to comment #16)
> > Indeed. There are ways to solve this for those that do not want to wait for
> 
> Ehm… which ways?  (Please don't say MS Office)

Ha - of course not. But some larger organisations maybe could afford to hire a certified dev for this, or take a 3rd level support contract entitling for buxfixing.
  http://www.libreoffice.org/get-help/professional-support/
I'm not suggestion that this is the only way for bugs to get solved, nor that it should be that way.
But it is a clear route, supporting paid development.

And of course, anyone knowing/being a developer that has feeling with this area..

> > Question: did this work before version  3.6.5.2 ?
> 
> Yes, we did use it with some Version 3 — don't know exactly which one,
> probably 3.3.

Some version 3... But LibreOffice or our predecessor?

Thanks,
Cor
Comment 18 Eugene 2014-09-17 16:12:40 UTC
As I remember this bug was already in 2011 year. I did ask advice on it from one of my friends in e-mail. What version was I don't remember.

Eugene
Comment 19 HansPL 2014-09-17 18:10:09 UTC
(In reply to comment #17)
> Some version 3... But LibreOffice or our predecessor?

Oh — right, that must have still been OOo then.  

Hans
Comment 20 Eugene 2014-09-18 08:30:15 UTC
> Some version 3... But LibreOffice or our predecessor?

I just found in my notes that I reported this bug for OOo-2.x

WBR 
Eugene
Comment 21 Cor Nouws 2014-09-19 17:39:53 UTC
(In reply to comment #20)

> I just found in my notes that I reported this bug for OOo-2.x

Thanks Eugene
Comment 22 QA Administrators 2015-10-14 19:57:24 UTC Comment hidden (obsolete)
Comment 23 marting 2015-11-06 08:43:48 UTC
Bug still the same on Fedora 23:

libreoffice-*-5.0.3.1-1.fc23.x86_64

backupfile: ~/.config/libreoffice/4/user/backup

though I wonder "4" is still used. I expected "5".

Error message and a zero byte backupfile are still the same.

I tried a different samba server (NAS), mounted:
type cifs (rw,relatime,vers=1.0,sec=ntlm,cache=strict,username=<****>,uid=1000,forceuid,gid=1003,forcegid,addr=<IP>,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=61440,wsize=65536,actimeo=1)
Comment 24 Eugene Saenko 2016-02-11 11:46:19 UTC
Version: 5.0.4.2
Build ID: 5.0.4.2-3.fc23
Locale: ru-RU (ru_RU.UTF-8)
Fedora-23.i686
[ses@ses-comp ~]$ mount | grep cifs
//dz250/ses on /home/ses/samba/DZ250/ses type cifs (rw,relatime,vers=1.0,cache=strict,username=ses,domain=dzer,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.1.250,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=61440,wsize=65536,actimeo=1)
"Always create backup copy."

Error message and no backup copy.
Comment 25 Eugene Saenko 2016-02-11 12:20:09 UTC
Correction.

Backup file created, but length=0:
[ses@ses-comp backup]$ pwd
/home/ses/.config/libreoffice/4/user/backup
[ses@ses-comp backup]$ ls -l
total 0
-rwxr-xr-x 1 ses ses 0 Feb 11 14:33 qq.bak

Fnd I don't understand why version subdirectory is "4" not "5".
Comment 26 HansPL 2016-05-17 12:09:31 UTC
Still defunct in 5.1.2.2.0+ / Linux!  

I would really wish that the LO team would spend time on fixing all those annoying year-old known bugs instead of just ignoring them and instead unnecessarily adding gimmicks or changing the UI…  

It's four years now and this bug still is a major hindrance in a company environment. 

If you really want LO not to be laughed at by all those MS Office users, please do give care and attention to the details.  I'm a strong advocate for FOSS, but I've ceased recommending LO to people using MS Office.
Comment 27 Carlos Le Mare 2016-11-30 20:46:42 UTC
To us happened the same. Tjhe problem start yesterday when we got a power failure and some files opened over the samba network got size 0, and when we start libreoffice again it didn't ask to restore the file. So we went to the directory where the backups are stored (locally in the PC), but there are no bak files.

Server Ubuntu 14.04.2 LTS
samba [2:4.3.9+dfsg-0ubuntu0.14.04.3]

Client Ubuntu 16.04 LTS
LibreOffice 1:5.1.4-0ubuntu1 (Id. de compilación)
Comment 28 Alex Thurgood 2016-12-01 11:45:58 UTC
I encountered this problem years ago when using OpenOffice.org 2.X saving to a SMB server share on a Linux server at the time with a support contract. It was unsolvable then, and the only workaround was to turn off LibreOffice automatic backups.
Comment 29 HansPL 2016-12-01 13:01:22 UTC
Does any dev at all watch this bug thread?  
It is confirmed, there are three other duplicates, and it is a really major bug in company usage — is it really so complicated to fix? 
Or is it really more important to fiddle with the UI introducing annoying changes without any benefit?  

Changed Hardware from Linux to All since it also affects our Win machines.
Comment 30 Cor Nouws 2016-12-02 13:58:13 UTC
Hi Hans,

(In reply to HansPL from comment #29)
> Does any dev at all watch this bug thread?  

Devs are constantly busy with all kind of bugs and necessary improvement or modernizing stuff.
There is always the options (easier of course for companies) to hire developers for fixing/improving a specific issue, to get it resolved faster.
Comment 31 Uwe Dippel 2017-02-14 15:15:04 UTC
"Devs are constantly busy with all kind of bugs and necessary improvement or modernizing stuff."

Who defines necessary improvements and the relevance of 'modernizing stuff'?

To me it sounds like doctors leaving a heart patient on the side in order to operate an ingrowing toe nail. 

My frustration might come from me evangelizing FOSS for the last 20 years, using it throughout. This bug has been creeping around for the last around 9 years now, prevents from backups in cases of shared drives, and gets no attendance. 
Though time is on hand, plenty, to implement a ribbon interface.
Comment 32 Cor Nouws 2017-02-14 15:45:35 UTC
(In reply to Uwe Dippel from comment #31)

> Who defines necessary improvements and the relevance of 'modernizing stuff'?

People working on it. Either voluntary, or because they get paid.

> Though time is on hand, plenty, to implement a ribbon interface.

... and in addition: probably people with different skills and interest.
Comment 33 Cor Nouws 2017-02-14 15:47:26 UTC
(In reply to Uwe Dippel from comment #31)

> My frustration might come from me evangelizing FOSS for the last 20 years,
> using it throughout. This bug has been creeping around for the last around 9
> years now, prevents from backups in cases of shared drives, and gets no
> attendance. 

But I understand your feelings, no doubt.
As FOSS enthusiast you may also know how development works?
Comment 34 Uwe Dippel 2017-02-14 16:47:43 UTC
Yes, thanks for the reminder!
Actually I used to be a developer myself, voluntarily and in some small portions paid. 
With both hats I tried to get priorities right: not niceness over function.
No project that values eye candy higher than debugging showstoppers is sustainable.

And I want LibreOffice to be sustainable, and some day before I die usable completely without having to resort to Microsoft WORD.
Comment 35 tomraymondtom 2018-01-18 21:58:15 UTC
Getting same bug on Windows 10.
LIBREOFFICE 5.4.4.2

Saving the document 
Error creating object
could not create backup copy

Received this message after multiple changes and saves of the same document.
Trying to save backup on a DVD drive.
Comment 36 marting 2018-05-02 07:54:16 UTC
still same issue with:

Version: 6.0.3.2
Build-ID: 6.0.3.2-5.fc28
Comment 37 iwi900 2019-08-30 09:44:54 UTC
Still same issue with 6.3.0.4.

However, there is a 9 year old (!) report (http://blog.gresch.de/2010/06/03/openofficesambacifs-probleme-could-not-create-backup-copy/) that suggests adding the "nobrl" option (no byte range lock) to the cifs mount options.

Given that this bug could not be fixed for a decade, but affects many users and this option bypasses it (at least in my case), wouldn't it make sense to add a hint like "(maybe try mount option nobrl?)" to the error message?