Ubuntu

[Upstream] Hard lock in opening files from a remote NFS volume

Reported by FernanAguero on 2010-05-07
68
This bug affects 10 people
Affects Status Importance Assigned to Milestone
LibreOffice Productivity Suite
Confirmed
High
OpenOffice
New
Unknown
libreoffice (Ubuntu)
Undecided
Unassigned
openoffice.org (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: openoffice.org

I recently updated to Lucid, and noticed that Openoffice would lock with opening certain files. First I thought the problem was a corrupt file, now I can reproducibly hard lock OO.org when trying to open ANY file (.xls, .doc, .odt) that is present in a remote NFS volume (locally mounted).

Any file on the local hard disk can be opened without problems.
Any file on the mounted NFS directory causes a hard lock, requiring a force-quit.

Other applications don't show this behaviour (e.g. gedit, command line programs).

Filesystem Size Used Avail Use% Mounted on
/dev/md0 70G 17G 50G 26% /
192.168.10.72:/home/fernan 243G 182G 42G 82% /home/fernan/gama-remote

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: openoffice.org 1:3.2.0-7ubuntu4
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Fri May 7 11:48:21 2010
EcryptfsInUse: Yes
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: openoffice.org

FernanAguero (fernan-ciudad) wrote :
Changed in openoffice.org (Ubuntu):
status: New → Confirmed
Nathan Adams (nadams) wrote :

Is this related to Bug #147464 ?

PascalCavy (p92) wrote :

To comment #2: i dont think so this is not a system freeze just an application freeze.

Chris Cheney (ccheney) wrote :

I can't reproduce this problem saving to nfs on a Ubuntu 10.04 LTS client connected to a nfs server running Ubuntu 10.04 LTS.

What operating system is running on the nfs server? What is the export line from the server for the filesystem you are getting the lockup on? Also what is the mount options on the client? The output from running 'mount' for the nfs share would be useful to see as well.

Thanks,

Chris

Changed in openoffice.org (Ubuntu):
status: Confirmed → Incomplete
PascalCavy (p92) wrote :

The problem is on open, not on save which obviously I cannot do !

Openoffice.org in karmic did not worked well either but no hard lock was observed. It was unable to open nfs files R/W because it was always reported nfs files are locked by 'unknown' (another known bug of ooo on NFS).

No other application have this problem on NFS.

nfs server is synology ds207+ :
export: /volume1/shared 192.168.0.1(rw,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)
OS: Linux synology 2.6.15 #1141 Sat Mar 13 15:44:39 CST 2010 armv5tejl unknown

Kubuntu:
mount: synology:/volume1/shared on /mnt/shared type nfs (rw,addr=192.168.0.49)

fstab: synology:/volume1/shared /mnt/shared nfs netdev,nouser,auto,rw,dev,exec,suid

Chris Cheney (ccheney) on 2010-05-24
Changed in openoffice.org (Ubuntu):
status: Incomplete → Confirmed
McPeter (mcpeter) wrote :

Before :
Server NFS : Karmic Koala 9.10

Desktop Client :
 - Hardy Heron 8.04 & Karmic Koala 9.10
 - OOo 3.1 with ppa

any problem

Now :
Server NFS : migration 9.10 to 10.04

Desktop Client : migration :
 - 8.04 to 10.04
 - 9.10 to 10.04
 - OOo 3.2 (in official repository)

I can't open any file ott/odt/ots/ods on NFS share
OOo 3.2 freeze ... i must kill it

Gnome

export : /home/ae 192.168.1.2(rw,sync,all_squash,anonuid=1003,anongid=1003,subtree_check)
fstab : 192.168.1.3:/home/ae /media/AE nfs rw 0 0

Only solution for the moment :
 move ott/odt/ots/ods file in my /home
 edit with OOo 3.2 from my /home

it's the same : https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/580992

FernanAguero (fernan-ciudad) wrote :

In my case the NFS server is a FreeBSD-6.4 box (i386). More details below:

[fernan@gama] uname -a
FreeBSD gama.iib.unsam.edu.ar 6.4-RELEASE-p8 FreeBSD 6.4-RELEASE-p8 #0: Mon Dec 21 21:05:35 ART 2009 <email address hidden>:/usr/obj/freebsd/freebsd-6.4/src/sys/GAMA i386

[fernan@gama] cat /etc/exports | grep 'home'
/home -alldirs -maproot=root sigma

Now, in Ubuntu 10.04:
[fernan@sigma] uname -a
Linux sigma 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010 i686 GNU/Linux

[fernan@sigma] hostname
sigma

Rafael Luque (rluque-uco) wrote :

My case:
NFS Server solaris 10 zfs.
Client: Linux rectorado-desktop 2.6.32-22-generic #35-Ubuntu SMP Tue Jun 1 14:17:36 UTC 2010 i686 GNU/Linux
nfs: nfs-common 1:1.2.0-4ubuntu4

With nfs3 work.
With nfs4 not work. Scenary:
  1.- Create a new document openoffice work.
  2.- Open document: work
  3.- Save changes in open document: not work. Error Saving the document prueba: Error during shared access to /Sistemas/prueba.odt

In Ubuntu hardy 8.04 any problem.

Rafa

Rafael Luque (rluque-uco) wrote :

Other test:

Debian 6 work fine.
Ubuntu 10.04 + openoffice.org donwload from http://www.openoffice.org the same behavior: not work with nfs4.

Rafa

Adam E. Hampton (ahambone) wrote :

I am also seeing this issue on two clients, same server. Both clients are 10.04 LTS:

  Linux myhostname 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux

Server is also 10.04 LTS, exporting via NFS v4:

   Linux fileserver 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux

Opening files locally works fine. Opening any file over the NFS causes a failure - soffice.bin hangs and needs to be killed with a kill statement.

PascalCavy (p92) wrote :

just for information, opening files on an iSCSI share is working, so the problem is really tight to NFS

PascalCavy (p92) wrote :

Could you confirm that opening nfs files directly with the command
/usr/lib/openoffice/program/oosplash.bin -writer "<path to file on nfs share>"
is working ? As I reported on upstream bug report.

Changed in openoffice:
status: Unknown → New
164747 (jacquet-david) wrote :

@ #12
I can confirm on my Ubuntu 10.04 64bit ooo3.2.0 build:9483
A) your method /usr/lib/openoffice/program/oosplash.bin -writer <path> ==> works great
B) normal graphical "open file" inside OO fails ==> OO hangs

McPeter (mcpeter) wrote :

I confirm too
it's work with full path

McPeter (mcpeter) wrote :

cat /usr/bin/oocalc
#!/bin/sh
/usr/lib/openoffice/program/soffice -calc "$@"

if i use
  /usr/lib/openoffice/program/soffice -calc <file on NFS>
not work

if i use
  oosplash.bin -calc <file on NFS>
it return : oosplash.bin: command not found

oosplash.bin is called at end soffice

at this time i use /usr/lib/openoffice/program/oosplash.bin -calc in property open document and it's work

FernanAguero (fernan-ciudad) wrote :

@ #12

I can confirm the same on my Ubuntu 10.04 i386 ooo3.2.0m12 build:9483, against a FreeBSD-6.4 NFS Server.

/usr/lib/openoffice/program/oosplash.bin -writer <path>

works. Once open this way, OO allows you to open other files on the NFS volume by navigating through the UI (File->Open), and saving files under a new name in the NFS volume. So far everything works fine.

Also, even if I use '-writer' on the initial command, I can open other filetypes (.xls, .ppt) without problems as well.

Brad Richards (bradley-kri) wrote :

Confirmed using a QNAP NAS for data storage.

- Initial message from Ubuntu is the that file is locked by "Unknown User".

- If I open a copy of the document and attempt to save it, I receive the message "Error saving the document ... Error during shared access"

As the original author notes, there are no issues when accessing a file on the local disk.

Also as noted, a workaround is opening nfs files directly with the command
/usr/lib/openoffice/program/oosplash.bin -writer "<path to file on nfs share>"
Files opened this way can also be saved under a new name.

Alvin (alvind) wrote :

I'm seeing a lot of corrupted openoffice files.
- Open file on NFS4 share
- Let computer go to sleep (let it sleep for a while)
- Next time you try to open the file from any location, it'll be corrupt.

Rafael Luque (rluque-uco) wrote :

The error fro saving the document in nfs4 is solved in openoffice 3.2.1 installed through lucid-proposed repository.

I'm currently using 3.2.1 and still experience this problem?

OpenOffice.org 3.2.1
OOO320m19 (Build:9505)
ooo-build 3.2.1.4, Debian package 1:3.2.1-4

Tyler Gates (tgates81) wrote :

Using openoffice 3.2.0-7ubuntu4.1 in Lucid I experience this problem only in NFSv4. If I unset the SAL_ENABLE_FILE_LOCKING (setting to 1 or 0 does not work) variable file locking for NFSv3 and NFSv4 continue to work fine and I no longer get the 'Error saving to shared file' messages in NFSv4.
Not sure why this is..

Tronde (tronde) wrote :

Hi@all.

I have the same problem with my openoffice files, as described in this bug. I have it since I updated my NFS-server from Hardy to Lucid. With NFS on Hardy and OpenOffice on my Lucid-Client everything worked fine.

My workaround is to mount the nfs share with the "nolock" option on my client.

Xeelee (alex-gaponline) wrote :

The removing of the following lines in /usr/lib/openoffice/program/soffice will prevent a deadlock. I know that isn't a permanent solution...

--- soffice-orig 2010-06-03 06:37:49.000000000 +0200
+++ soffice 2011-01-26 14:50:23.000000000 +0100
@@ -90,42 +90,6 @@

 # adjust environment

-if [ -z "$SAL_ENABLE_FILE_LOCKING" ]; then
- case "$FILE_LOCKING" in
- auto)
- home_on_nfs "$@"
- if [ $? = 0 ]; then
- STAR_PROFILE_LOCKING_DISABLED=1
- export STAR_PROFILE_LOCKING_DISABLED
- fi
- file_on_nfs "$@"
- if [ $? = 0 ]; then
- SAL_ENABLE_FILE_LOCKING=0
- export SAL_ENABLE_FILE_LOCKING
- # for safety
- STAR_ENABLE_FILE_LOCKING=0
- export STAR_ENABLE_FILE_LOCKING
- else
- # file locking now enabled by default
- SAL_ENABLE_FILE_LOCKING=1
- export SAL_ENABLE_FILE_LOCKING
- fi
- ;;
- yes)
- SAL_ENABLE_FILE_LOCKING=1
- export SAL_ENABLE_FILE_LOCKING
- ;;
- no)
- SAL_ENABLE_FILE_LOCKING=0
- export SAL_ENABLE_FILE_LOCKING
- # for safety
- STAR_ENABLE_FILE_LOCKING=0
- export STAR_ENABLE_FILE_LOCKING
- STAR_PROFILE_LOCKING_DISABLED=1
- export STAR_PROFILE_LOCKING_DISABLED
- esac
-fi
-
 if [ -z "$SAL_NOOPENGL" ]; then
     case "$OPENGL_SUPPORT" in
  auto)

HenningMalzahn (malzahn) wrote :

Hi all,

same here. Temporary fix in comment #23 fixes the issue.

Server, Virtual machine, 64Bit:
- Ubuntu 10.04, Fully patched (Installed all patches available up to 2011-02-21)
- Kernel: linux-image-2.6.32-28-server
- nfs-kernel-server:
  Installed: 1:1.2.0-4ubuntu4.1
- nfs-common:
   Installed: 1:1.2.0-4ubuntu4.1

Client, Physical machine, 64Bit:
- Ubuntu 10.04, Fully patched (Installed all patches available up to 2011-02-21)
- Kernel: linux-image-2.6.32-28-generic
- nfs-common:
  Installed: 1:1.2.0-4ubuntu4.1
- openoffice.org:
  Installed: 1:3.2.0-7ubuntu4.2

NFS share mounted via fstab with the options
fileserver.mydom.local:/share /mnt/net/local nfs user,_netdev,auto,acl,hard,nointr,timeo=120,retrans=2,rsize=32768,wsize=32768 0 0

The problem is on opening a file on an NFS volume, not on save.

Openoffice.org in karmic did not worked well either but no hard lock was observed. It was unable to open nfs files R/W because it was always complaining that nfs files are locked by 'unknown' (another known bug of ooo on NFS). Since Lucid ooo had the lock problem (bug https://bugs.launchpad.net/openoffice/+bug/577038 on launchpad, bug http://qa.openoffice.org/issues/show_bug.cgi?id=113330 on ooo)

No other application have this problem on NFS.

nfs server is synology ds207+ :

Export :
/volume1/PC 192.168.0.1(rw,sync,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)

OS:
Linux synology 2.6.15 #1354 Sat Oct 23 01:49:30 CST 2010 armv5tejl GNU/Linux synology_88f5281_207+

Kubuntu natty:
mount:
synology:/volume1/PC on /mnt/pc type nfs (rw,addr=192.168.0.49)

fstab:
synology:/volume1/PC /mnt/pc nfs _netdev,nouser,auto,rw,dev,exec,suid 0 0

just for information, opening files on an iSCSI share is working, so the problem is really tight to NFS

Also as noted, a workaround is opening nfs files directly with the command
/usr/lib/libreoffice/program/oosplash.bin -writer "<path to file on nfs share>"

And finally note that the fileselector is sometimes relly sllllloooowwww to discover files on local disks, but when we open start libreoffice with /usr/lib/libreoffice/program/oosplash.bin -writer, then we have no problem to navigate quickly among the file system with the fileselector.

All this seems linked to settings in the libreoffice launch script./usr/lib/libreoffice/program/soffice

Fridrich-> more info? Thanks!

Changed in libreoffice:
importance: Unknown → High
status: Unknown → Confirmed

(In reply to comment #0)

>
> just for information, opening files on an iSCSI share is working, so the
> problem is really tight to NFS
>

FWIW, there is what appears to be an identical problem on AFS mounted shares, see bug 40907

Alex

Changed in openoffice.org (Ubuntu):
status: Confirmed → Won't Fix
PascalCavy (p92) wrote :

can we have an explanation to that dry "won't fix" ?

still no fix for that bug ? It renders libreoffice unusable in a shared environnement

[This is an automated message.]
There are no new official OpenOffice.org releases in Ubuntu packaging anymore => Won't Fix

If the problem persists, please mark this bug as "also affects project Libreoffice" or "also affects distribution Libreoffice (Ubuntu)" if that has not happened already.

Please leave references to upstream OpenOffice.org bugs in place to allow cross pollination.

summary: - [regression] hard lock in openoffice when opening files from a remote
- NFS volume
+ [Upstream] [regression] hard lock in opening files from a remote NFS
+ volume
Changed in df-libreoffice:
importance: Unknown → High
status: Unknown → Confirmed

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
summary: - [Upstream] [regression] hard lock in opening files from a remote NFS
- volume
+ [Upstream] Hard lock in opening files from a remote NFS volume
tags: added: regression-release

This has been a problem for me ever since I started using Libre Office, which is about 2 years, I think. To fix it, I go into the soffice script and comment out everything from "#adjust environment" through the "fi" just before "if [ -z "$SAL_NOOPENGL" ]; then" (do not comment out this last line, I include it only as a reference.)

I use recent versions of Ubuntu, such as 11.04, and Libre Office, as well as OpenOffice (which has the same bug) on various computers, attached to a Synology NAS appliance on which I'm using NFS to share files. The problem is evident on all these computers.

I also use LibreOffice on Windows and don't notice this problem when accessing files from the Samba service on the NAS.

still valid in 3.4.4 !

Pascal, please do not toggle the version. For more on this please see: http://wiki.documentfoundation.org/BugReport_Details#Version

This seams to be related or even a duplicate to Bug 46157. The other ticket has screenshots.

I can confirm this is related to locking - at least on my system:

Loading/saving fails if the share is mounted using the "lock" option, but works
if the share is mounted with "nolock".

See bug 50276 comment 2 for details.

(In reply to comment #0)

> Since Lucid ooo had the lock problem (bug
> https://bugs.launchpad.net/openoffice/+bug/577038 on launchpad, bug

I can confirm: When not setting "SAL_ENABLE_FILE_LOCKING" at all in `soffice`, loading/saving works even if the share is mounted with "lock" enabled.

*** Bug 46157 has been marked as a duplicate of this bug. ***

FernanAguero (fernan-ciudad) wrote :

The fix for me was to mount the NFS volume 'nolock' in /etc/fstab, e.g:

LibreOffice fails to open files in NFS volume:
192.168.1.1:/home/fernan /home/fernan/nfs-mount/ nfs noexec,nosuid,bg 0 1

LibreOffice now successfully reads/writes files from/to NFS volume:
192.168.1.1:/home/fernan /home/fernan/nfs-mount/ nfs noexec,nosuid,nolock,bg 0 1

I can't confirm, however, the workaround proposed by htgoebel. Neither commenting out the following (in /usr/lib/libreoffice/program/soffice):

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

Nor setting SAL_ENABLE_FILE_LOCKING=0

Nor changing the locking configuration in /etc/libreoffice/soffice.sh to FILE_LOCKING=no worked

This is now on Ubuntu 12.04 LTS
My NFS server (FreeBSD) remains at 6.4 (RELENG_6_4) as reported previously.

Hope this helps more people.

*** Bug 50276 has been marked as a duplicate of this bug. ***

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.