Bug 193964 - F_WRLCK flock on samba mount disallows reads from other fds
F_WRLCK flock on samba mount disallows reads from other fds
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: samba (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Simo Sorce
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-03 09:50 EDT by Bertrand
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-03-14 11:01:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
essai1 file (6.80 KB, application/vnd.oasis.opendocument.spreadsheet)
2006-06-03 13:07 EDT, Bertrand
no flags Details
essai2 file (6.63 KB, application/vnd.oasis.opendocument.spreadsheet)
2006-06-03 13:08 EDT, Bertrand
no flags Details
simple lock test (772 bytes, text/x-csrc)
2006-07-06 10:55 EDT, Caolan McNamara
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
OpenOffice.org 67081 None None None Never

  None (edit)
Description Bertrand 2006-06-03 09:50:29 EDT
Description of problem:
I have FC5 running on a laptop & a server with samba running. When I try to
create a link between 2 calc files on the server, it does not work (it use to
work without problem on FC3)

Version-Release number of selected component (if applicable):
Lastest rpm package updated thru YUM.
Group        : Applications/Productivity
Source       : openoffice.org-2.0.2-5.12.2.src.rpm
Build Time   : Tue May 23 20:40:29 2006
Install Time : Tue May 30 12:42:32 2006
License      : LGPL

How reproducible: ALWAYS

Steps to Reproduce:
1. create on the laptop 2 spreadsheets: essai1.ods & essai2.ods
2. save them to the server thru the samba drive
3. keep both docs opened and from essai1 try to link to a cell on essai2
4. the result is '#NOM ?' (i have a french version, in English it must be #NAME ?)
-> the link is not created
If the files are located on the laptop, the link is created.
  
Actual results:


Expected results:


Additional info:
Comment 1 Caolan McNamara 2006-06-03 10:30:34 EDT
What is the text of the formula that gives "#NOM ?", i.e. click on it and copy
and paste the text that appears in the formula editor e.g. is it something like

='file:///home/caolan/Documents/test.ods'#$Sheet1.A9
or something like
='smb:///home/caolan/Documents/test.ods'#$Sheet1.A9
Comment 2 Bertrand 2006-06-03 13:05:55 EDT
Here is the text :
='file:///mnt/serveur/aaa/essai2.ods'#feuille1.b5

I will also attach my 2 files essai1 & essai2
Comment 3 Bertrand 2006-06-03 13:07:35 EDT
Created attachment 130451 [details]
essai1 file
Comment 4 Bertrand 2006-06-03 13:08:22 EDT
Created attachment 130452 [details]
essai2 file
Comment 5 Bertrand 2006-06-03 13:28:03 EDT
I have done other tests and it might be linked to capital letters. My folder
"/mnt/serveur/aaa" is in fact "/mnt/serveur/AAA" and it might be the reason why
he cannot create the link.
If i save a new set of essai1 & 2 files into a new folder called
"/mnt/serveur/bbb" (no capital letter) the problem disappear.
Comment 6 Bertrand 2006-06-19 03:37:38 EDT
This issue is very annoying. Can I do anything to help you to solve it ?
Comment 7 Caolan McNamara 2006-06-26 05:36:12 EDT
I wasn't able to reproduce this, but what are the details of the samba server,
is it windows or samba itself. and when you type "mount" on the client, what is
the line for /mnt/serveur, perhaps some casemapping option is being used, or not
being used.
Comment 8 Bertrand 2006-06-26 06:51:06 EDT
The samba server works on a FC5 server. His config file is :
************* /etc/smb.conf
# Samba config file created using SWAT
[global]
	workgroup = MYGROUP
	netbios name = SAMBA
	server string = Samba Server
	log file = /var/log/samba/%m.log
	max log size = 1000
	ldap ssl = no
	hosts allow = 127.0.0.1, 192.168.0.
	hosts deny = all

[homes]
	comment = Home Directories
	read only = No
****************
On the laptop (running also FC5) I mount the server thru /etc/fstab with the
following line :
//192.168.0.4/bg  /mnt/serveur  cifs  rw,uid=bgirin,username=xx,password=xx	0 0
where 192.168.0.4 is the ip address of the server.
Comment 9 Caolan McNamara 2006-07-06 04:36:50 EDT
I can reproduce now, will get onto it
Comment 10 Bertrand 2006-07-06 08:46:26 EDT
Great !
Comment 11 Caolan McNamara 2006-07-06 10:27:55 EDT
Please try this for me...

as root edit the script
/usr/lib/openoffice.org2.0/program/soffice
and change

# file locking now enabled by default
SAL_ENABLE_FILE_LOCKING=1
export SAL_ENABLE_FILE_LOCKING

to be instead

# file locking now enabled by default
#SAL_ENABLE_FILE_LOCKING=1
#export SAL_ENABLE_FILE_LOCKING

i.e. comment those two lines out

and tell me if that "fixes" it

Comment 12 Caolan McNamara 2006-07-06 10:55:54 EDT
Created attachment 132003 [details]
simple lock test

e.g.
./a.out /mnt/serveur/AAA/essai1.ods lock
./a.out /mnt/serveur/AAA/essai1.ods unlock
Comment 13 Caolan McNamara 2006-07-06 11:15:53 EDT
The "case mapping" led me astray, calc makes the text of a failed operation into
lowercase, the problem is simply that once the document has been opened with a
read-write lock over cifs, then it cannot be opened simultaneously and read from.

e.g. 
> oocalc /mnt/serveur/AAA/essai1.ods &
...
> cp /mnt/serveur/AAA/essai1.ods /tmp
Permission denied

Once the cock-up has occured, OOo lowercases the failed text so that's what's
there on save. Presumably if you then close the referred doc, and move it to a
location which is equal to the new wrong string it'll find it again, but that's
neither here nor there.
Comment 14 Caolan McNamara 2006-07-06 11:19:19 EDT
caolanm->fenlason: Is this strict locking a feature or bug ?
Comment 15 Bertrand 2006-07-06 12:30:49 EDT
Coalan,
I have followed your instruction i.e. commenting the 2 lines in
/usr/lib/openoffice.org2.0/program/soffice and that has fixed the bug for me. I
have tried several tests, with different files and all are working now. Thank
you very much for solving this issue !
Comment 16 Simo Sorce 2007-03-14 11:01:27 EDT
This is working as expected, if OpenOffice.org fails to deal properly with
locking I'd say it is an OpenOffice.org bug.

Please Reopen if you have more info that lead to think it is a samba bug instead.

Note You need to log in before you can comment on or make changes to this bug.