Bug Hunting Session
Bug 101409 - FILEOPEN lock status being incorrectly (and dangerously) reported
Summary: FILEOPEN lock status being incorrectly (and dangerously) reported
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Network
  Show dependency treegraph
Reported: 2016-08-09 11:35 UTC by Nigel Arnot
Modified: 2018-02-03 03:32 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Screenshot of the document-locked dialog (25.33 KB, image/png)
2016-08-09 11:35 UTC, Nigel Arnot
Document in Use (LibO (13.95 KB, image/jpeg)
2016-10-01 16:23 UTC, Eugene Kin
Document in Use (LibO (15.78 KB, image/jpeg)
2016-10-01 16:25 UTC, Eugene Kin

Note You need to log in before you can comment on or make changes to this bug.
Description Nigel Arnot 2016-08-09 11:35:37 UTC
Created attachment 126690 [details]
Screenshot of the document-locked dialog

A document test.ods is present in an NFS v3 shared directory. User carmen on client system apollo.silson.com opens the file for editing. The lock file is created and contains the following text:

$ cat /silson/allshare2/SilsonR\&D/.~lock.test.ods# 
,carmen,apollo.silson.com,09.08.2016 11:33,file:///home/carmen/.config/libreoffice/4;

(which also confirms that user nigel has read access to the lock file)

Now user nigel on atlas.silson.com attempts to open the (locked) file. The lock is detected, but the dialog incorrectly reports the problem as follows (my enphasis with **text**) (see attachment for a screenshot of the dialog)


Document file 'test.ods' is locked for editing **by yourself** on a **different system** since 09.08.2016 11:33

Open document read-only, or ignore own file locking and open the document for editing.

Buttons:Open Read-only    Button:Open   Button:Cancel


From the contents of the lock file it is clear that LibreOffice ought to be able to correctly report "... is locked for editing by **user carmen** **on host apollo.silson.com **  ..." On our organisation this lets us find or phone the user who has the file open and ask them whether they can close it. 

Further, in this situation the option to ignore the lock and open the file (not read-only) is extremely dangerous, leading to data loss if/when a naive user takes this choice.

This is a regression. It worked correctly using Libreoffice 4 (not sure which version: the one which came with Fedora 20 which is now eol.

A similar problem occurs when the file is opened via Samba/CIFS from an instance of LibreOffice running on a Windows PC.

The same bug is present in Libreoffice release 

Further information on file ownership / protection, if relevant. Both nigel and carmen are members of group silson. Collaboration takes place using shared group write access. There are no acls affecting nigel or carmen. 

[atlas: ~]$ ls -l /silson/allshare2/SilsonR\&D/.~lock.test.ods# 
-rw-rw-r--+ 1 carmen silson 85 Aug  9 11:33 '/silson/allshare2/SilsonR&D/.~lock.test.ods#'
[atlas: ~]$ ls -l /silson/allshare2/SilsonR\&D/test.ods 
-rwxrwxr--+ 1 nigel silson 22899 Aug  8 13:30 '/silson/allshare2/SilsonR&D/test.ods'
Comment 1 Eugene Kin 2016-10-01 16:23:43 UTC
Created attachment 127764 [details]
Document in Use (LibO
Comment 2 Eugene Kin 2016-10-01 16:25:01 UTC
Created attachment 127765 [details]
Document in Use (LibO
Comment 3 Eugene Kin 2016-10-01 16:28:47 UTC
Can confirm this on Windows 7/Server 2008 R2.
But only for LibO 5.2 branch since
Comment 4 Robert Großkopf 2016-10-19 13:56:57 UTC
I have set this to component "LibreOffice", because it isn't a special Calc-problem. Other users in German reported the same problem with Writer.

Tested a little bit with Linux. 
Created as one user a document.
Let this document open.
Switch to another user.
Try to open the document here, too.
Message appears, that the first user has opens the document.

I couldn't confirm the bug for this situation. It's a special network-bug.

My system: OpenSUSE 42.1 64bit rpm Linux, LO
Comment 5 Eugene Kin 2016-10-20 17:00:20 UTC
Disagree about network bug.

Steps to reproduce in multi-session Windows 7/Server 2008 R2 environment:

1. Login as User1, open document on local disk
2. Change user/Login as User2, try to open
3. With pre-5.2 versions you get correct dialog (locked by User1)
4. With 5.2 version you get buggy "locked by yourself"

As mentioned in comment 1 content of lock file is the same in all versions.
Comment 6 Eugene Kin 2016-10-21 12:58:57 UTC
LibO dialog shows correct information.
So, in my case problem reproducible with LibO 5.2 only.
Comment 7 Eugene Kin 2016-10-28 08:09:00 UTC
Seems to be problem solved in LibO
Comment 8 Nigel Arnot 2017-02-02 15:09:13 UTC
Mostly fixed (and

The dangerous bit is mercifully gone.

What isn't fixed: only the username locking the file is displayed in the dialog, and not the hostname on which the file is locked. The hostname is there in the lockfile, and it should be presented to the user. The username may not be helpful if the user in question has gone home or on holiday, whereas the hostname lets one find the system which is causing the problem and deal with it without contacting the user.
Comment 9 QA Administrators 2018-02-03 03:32:28 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team