Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 64207 invoked from network); 22 Mar 2007 02:15:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Mar 2007 02:15:49 -0000 Received: (qmail 68945 invoked by uid 500); 22 Mar 2007 02:15:54 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 68891 invoked by uid 500); 22 Mar 2007 02:15:53 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 68880 invoked by uid 99); 22 Mar 2007 02:15:53 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2007 19:15:53 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of bojan@rexursive.com designates 203.171.74.242 as permitted sender) Received: from [203.171.74.242] (HELO beauty.rexursive.com) (203.171.74.242) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2007 19:15:44 -0700 Received: from [172.27.0.24] (shrek.rexursive.com [172.27.0.24]) by beauty.rexursive.com (Postfix) with ESMTP id 3EBBF2544D0 for ; Thu, 22 Mar 2007 13:15:22 +1100 (EST) Subject: apr_file_gets()/apr_file_read() locking problem From: Bojan Smojver To: APR Development List Content-Type: text/plain Date: Thu, 22 Mar 2007 13:15:21 +1100 Message-Id: <1174529721.3130.20.camel@shrek.rexursive.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-1.fc6) Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I just bumped into this today with 1.2.x, but the code is more or less the same in trunk. I opened a temporary file with apr_file_mktemp(), which in turn opened an APR file with a mutex (not sure why, but that's what happened on FC6 ). So far, so good. If apr_file_gets() is called on that file, mutex is locked (line 340 in trunk of readwrite.c) in this function. However, this function then calls apr_file_read(), which attempts to lock the same mutex again (line 45 in trunk of readwrite.c), which hangs the program. Did anyone see this? -- Bojan