Return-Path: Delivered-To: apmail-apr-bugs-archive@www.apache.org Received: (qmail 21325 invoked from network); 8 Oct 2010 11:25:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Oct 2010 11:25:40 -0000 Received: (qmail 95681 invoked by uid 500); 8 Oct 2010 11:25:40 -0000 Delivered-To: apmail-apr-bugs-archive@apr.apache.org Received: (qmail 95647 invoked by uid 500); 8 Oct 2010 11:25:40 -0000 Mailing-List: contact bugs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apr.apache.org Delivered-To: mailing list bugs@apr.apache.org Received: (qmail 95639 invoked by uid 99); 8 Oct 2010 11:25:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Oct 2010 11:25:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Oct 2010 11:25:37 +0000 Received: from thor.apache.org (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o98BPFbP019033 for ; Fri, 8 Oct 2010 11:25:15 GMT Received: (from daemon@localhost) by thor.apache.org (8.13.8+Sun/8.13.8/Submit) id o98BPFdA019032; Fri, 8 Oct 2010 07:25:15 -0400 (EDT) Date: Fri, 8 Oct 2010 07:25:15 -0400 (EDT) From: bugzilla@apache.org To: bugs@apr.apache.org Subject: DO NOT REPLY [Bug 50058] New: Deadlock with apr_file_open(APR_FOPEN_APPEND) and apr_file_lock() under Windows X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: APR X-Bugzilla-Component: APR X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: sr@myarm.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: bugs@apr.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=50058 Summary: Deadlock with apr_file_open(APR_FOPEN_APPEND) and apr_file_lock() under Windows Product: APR Version: HEAD Platform: PC OS/Version: Windows XP Status: NEW Severity: major Priority: P2 Component: APR AssignedTo: bugs@apr.apache.org ReportedBy: sr@myarm.com Created an attachment (id=26137) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26137) Example code to reproduce behavior under Windows I ran into the following problem. I use the apr_file_lock() function in conjunction with the APR_FOPEN_APPEND flag under Windwos and Linux. Under Linux everything is fine. Under Windows any attempt to write to the opened and locked file I get a deadlock. This is due the fact that apr_file_write() creates an own lock with apr_file_lock() if the file was opened with the APR_FOPEN_APPEND flag. IMHO this is inconsistent through different operating systems Unix does not lock, Windows does lock the file in append mode. However, I think the locking in the Windows implementation is wrong. The user has to choose if he wants to lock the file or not! To reproduce the behavior please compile and test the attached example! -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org For additional commands, e-mail: bugs-help@apr.apache.org