Apache OpenOffice (AOO) Bugzilla – Issue 67081
samba locking => cannot reference cell of open spreadsheet
Last modified: 2017-05-20 10:45:09 UTC
Yeah, I know locking is a wonderful topic that everyone is really happy to see, but bear with me, at least to at least be aware of this particular effect. mount a dir exported through samba from a Fedora Core 5 box to another one (or itself), e.g. mount //127.0.0.1/samba /mnt/serveur -t cifs -o user=caolan put some .ods content onto /mnt/serveur take the attached test case code and run it like so... ./a.out /mnt/serveur/essai1.ods unlock ok ./a.out /mnt/serveur/essai1.ods lock Permission denied i.e. you can't read from a fd which points to a file which is opened with a write lock over samba (with the default options anyway, I'm not much of a samba guy) This bites calc like so... open the .ods from the samba mount in calc, open a new empty spreadsheet, and click "=" and then move to the opened doc (which is holding a write lock) and click in a cell. Now back to the empty sheet, the reference to the cell in the first doc is shown, press enter to accept it and to attempt to insert it's content into OOo. Now calc reopens the original document to attempt to parse it to get the content of the selected cell to put into the empty spreadsheet, but it fails. => "#NAME?", because the underlying new fd to the samba mounted calc doc cannot be read from. If instead you close the samba mounted doc and type the reference manually into a cell, then all is ok.
reassign I guess
...but not to me, but rather NN (calc) or HRO (sal locking).
"Attached test case code", you say?
Created attachment 37546 [details] collapsed view of what happens in sal in this case
It is all true and a proposed attachment performs the described "Permission denied". But this has nothing in common with OpenOffice. Is a totaly Samba/CIFS issue. Increasing the debug level of the smbd(1) can give a lot of useful information about the behaviour which causes the problem of concurent access. In short, when someone has put a range lock, using posix symantics, through the cifs, samba can deny access to other read/write attempts. And that's what it does by default. Samba itself tries to resolv locking conflicts and denies access if it finds the conflict. To resolve the problem you can simply modify your smb.conf(5) by setting strict locking = no It is acceptable, as the smb.conf(5) tells us, and nothing breakes the usual behaviour. Setting this parameter to "no" has a good effect on us, and the locked file can be opened in read-only mode. That is the default behaviour of the OpenOffice. It opens locked file in read-only mode. In cases when we can't influence smb.conf(5) we simply can supply additional option to mount.cifs which disables byte range locks at all, though it is not recommended, like that: mount //127.0.0.1/samba /mnt/server -t cifs -o rw,username=myname,nobrl
Created attachment 73884
Comment on attachment 73884 Inappropriate SPAM Attachment
Reset the assignee to the default "issues@openoffice.apache.org".