Bug 168672 - Closing webdav documents is extremly slow
Summary: Closing webdav documents is extremly slow
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: WebDAV
  Show dependency treegraph
 
Reported: 2025-10-03 05:26 UTC by David Carliez
Modified: 2025-10-22 15:04 UTC (History)
7 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 David Carliez 2025-10-03 05:26:28 UTC
Closing a webdav document is extremly slow (works fine with previous releases). Same problem with version 25.8.2
Comment 1 David Carliez 2025-10-03 05:27:48 UTC
Closing webdav documents is really slow (works fine with previous versions). Same issue with version 28.5.2
Comment 2 oss 2025-10-09 12:52:37 UTC
Are all components (eg. Impress, Writer, Calc) affected?
Comment 3 David Carliez 2025-10-10 05:34:08 UTC
I have only tested it with writer.
Comment 4 raal 2025-10-11 13:37:37 UTC
(In reply to David Carliez from comment #3)
> I have only tested it with writer.

As I have not any webdav server, it's hard to test the problem. Would now be nice to get a bibisect of the bug - https://wiki.documentfoundation.org/QA/HowToBibisect
Please could you do it?
If you need help - feel free to jump into the QA Chat: http://webchat.freenode.net/?channels=libreoffice-qa
Comment 5 David Carliez 2025-10-13 05:54:52 UTC
A simple way to test it, is to start a webdav server with docker

Eg: 

mkdir -p /tmp/dav/data
cp <any odt> /tmp/dav/data
sudo chown -R 82:82 /tmp/dav
docker run --rm -d -v /tmp/dav:/var/lib/dav -e AUTH_TYPE=Digest -e USERNAME=alice -e PASSWORD=secret1234 --publish 80:80 -d bytemark/webdav

Open writer.

Open the file "http://localhost/<any odt>
Comment 6 David Carliez 2025-10-13 05:56:16 UTC
To open the file a login/password is required. Use alice:secret1234
Comment 7 Gabor Kelemen (Collabora) 2025-10-22 14:53:15 UTC
Managed to reproduce this in linux 25.8, with the steps in comment #5.

Bibisect shows this commit as starting point:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=96a4272a84a33b939411bb99d1024cbb2bdaf046

commit 96a4272a84a33b939411bb99d1024cbb2bdaf046
Author: Caolán McNamara <caolan.mcnamara@collabora.com>
Date:   Tue Feb 18 08:35:27 2025 +0000

    cid#1642989 Double lock
    
    since:
    
    commit 867d380b0b8e2c59689eb42665c75aad34733bbc
    Commit:     Michael Stahl <michael.stahl@allotropia.de>
    
        tdf#161168 Improve constant repetitive loop thread

Before this commit opening the file was causing a loop at the first try. Then a /tmp/dav/DavLock.pag file was created and for a second time, it opened and closed fine. Somehow this lock file makes a lot of difference while investigating this issue, when I did not remove it like:

sudo rm /tmp/dav/DavLock.pag ; instdir/program/swriter http://localhost/lorem.odt

bibisect brougt nonsense results.

After this commit opening the file does not cause a loop, but closing with Ctrl-W does.

In 26.2 master however, it seems like the previous behavior is back, since:

commit 7aab3f08de24bb4cbd95aedce981eeb62314baa7
Author: Caolán McNamara <caolan.mcnamara@collabora.com>
Date:   Mon Aug 18 11:59:53 2025 +0100

    cid#1662039 Data race condition

So it is differently bad.