httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 50237] New: webdav LOCK access with multiple threads to same folder causes UNLOCK failures
Date Mon, 08 Nov 2010 18:33:22 GMT

           Summary: webdav LOCK access with multiple threads to same
                    folder causes UNLOCK failures
           Product: Apache httpd-2
           Version: 2.3-HEAD
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_dav

If multiple processes or threads are writing to unique files in the same folder
on a webdav server using LOCKS, intermittent webdav errors will occur during
the UNLOCK request.

Server configuration: Centos 5.5. Tested with Apache/2.2.3, Apache/2.2.17 and

I have a custom application that uses libcurl to upload files to a webdav
server. However, I have reproduced the same problem using cadaver, a simple
script and a locally hosted Apache webdav server.

The error occurs during an UNLOCK. A 400 (bad request) is returned. Once this
failure occurs, the file remains locked. I used several methods over several
days to ensure the LOCK/PUT/UNLOCK sequences being issued are valid and contain
the correct lock token (wireshark, added custom logging to dav, etc.).

I used a patched version of cadaver that adds scripting ability so I could
automate the test.

Here is what the test does:

One shell script is repeatedly running this:

1. LOCK webdav/test/a.bin 2. PUT a.bin webdav/test/a.bin 3. UNLOCK

At the same time, a second shell script is repeatedly running this (same webdav
folder, but accessing a different file):

1. LOCK webdav/test/b.bin 2. PUT b.bin webdav/test/b.bin 3. UNLOCK

The test repeats anywhere from a few times to several hundred times before the
failure occurs. Below is the output from cadaver at the failure point:

Locking `webdav/test/a.bin': succeeded. Lock token
<opaquelocktoken:7ca6e55d-1bf6-4ce0-a8a4-7d97117db8af>: Depth infinity on
`http://localhost:81/webdav/test/a.bin' Scope: exclusive Type: write Timeout:
infinite Owner: Uploading a.bin to `/webdav/test/a.bin': [.......... succeeded.
Unlocking `webdav/test/a.bin': failed: 400 Bad Request

At the failure point, this message is in the Apache error_log:

(11)Resource temporarily unavailable: The locktoken specified in the
"Lock-Token:" header is invalid because this resource has no outstanding locks.
[400, #0]

I tried adding additional debug messages to dav, but have not been able to
track down why the lock is not valid. I also tried to make a debug build of
Apache so I could use gdb to help debug at least one of the scripts to better
understand the flow of the lock data, but was unable to get debug symbols in
the binary (I used the --enable-maintainer-mode configure option).

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message