You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2006/01/06 00:25:03 UTC

DO NOT REPLY [Bug 38148] New: - One Failed Request Can Possibly Overwrite Another Active Request's PUT

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38148>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38148

           Summary: One Failed Request Can Possibly Overwrite Another Active
                    Request's PUT
           Product: Apache httpd-2
           Version: 2.0.55
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_dav
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: lardcanoe@gmail.com


If a client PUTs a file, and its Timeout is shorter than the server's Timeout,
and the client then PUTs the file again, the first request will fail and the
call to close_stream will delete the file even though the second PUT is
currently writing to it. So the second PUT thinks the file is all there even
though it isn't.

I'm not sure if this is a bug per se, but it is something that I encountered and
fixed myself, and I feel it could go into the mod_dav.c code.

Also, I strongly recommend adding code that explicitly checks to see if the file
really does exist at the end of the PUT and also checks the filesize to see if
it matches the number of bytes written. A simple call to "stat" would be sufficient.

We experience hundreds of thousands of PUTs a night, and a few files generally
just disappear without any errors in the error_log.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38148] - One Failed Request Can Possibly Overwrite Another Active Request's PUT

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38148>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38148





------- Additional Comments From jorton@redhat.com  2006-01-06 10:28 -------
I do agree that the delete-on-failed-PUT behaviour is a bug, at least in the
case of modifying an existing file.  Perhaps it is useful for the case where the
resource did not exist before.

To completely avoid concurrency problems like this mod_dav_fs would also have to
lock the file.  That should be relatively simple to do but needs further analysis.

w.r.t. doing a the stat()-after-PUT; that would not eliminate the race; another
process could still modify the file after the stat() and the returned status
code would be "wrong" again

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 38148] - One Failed Request Can Possibly Overwrite Another Active Request's PUT

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38148>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38148


julian.reschke@gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |julian.reschke@gmx.de




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org