Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 76298 invoked from network); 20 Apr 2009 23:52:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Apr 2009 23:52:09 -0000 Received: (qmail 24478 invoked by uid 500); 20 Apr 2009 23:52:08 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 24381 invoked by uid 500); 20 Apr 2009 23:52:08 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 24371 invoked by uid 99); 20 Apr 2009 23:52:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Apr 2009 23:52:08 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Apr 2009 23:52:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 83449234C004 for ; Mon, 20 Apr 2009 16:51:47 -0700 (PDT) Message-ID: <192107677.1240271507522.JavaMail.jira@brutus> Date: Mon, 20 Apr 2009 16:51:47 -0700 (PDT) From: "alisdair sullivan (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (COUCHDB-326) Occasional {"error":"error","reason":"eacces"} errors deleting a database on Windows In-Reply-To: <1862935181.1240034354935.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700990#action_12700990 ] alisdair sullivan commented on COUCHDB-326: ------------------------------------------- exit(Pid, kill), receive {'EXIT', Pid, close} -> ok end, To achieve a clean shutdown of the db and it's child processes, you need to send it a signal other than kill and give it a chance to shutdown and cleanup it's processes. The receive here doesn't do anything as a killed process sends the 'EXIT' msg immediately upon being killed. > Occasional {"error":"error","reason":"eacces"} errors deleting a database on Windows > ------------------------------------------------------------------------------------ > > Key: COUCHDB-326 > URL: https://issues.apache.org/jira/browse/COUCHDB-326 > Project: CouchDB > Issue Type: Bug > Affects Versions: 0.9 > Environment: Windows, couch 0.9, erlang R12B 5.6.5 > Reporter: Mark Hammond > > On Windows, occasionally you will see errors attempting to delete a database. This manifests itself by 10-30% of the test suite failing on Windows. If you retry the tests that failed, they will usually pass on subsequent attempts. Running the tests individually causes them to fail roughly 10% of the time. > The log output shown is: > [debug] [<0.18650.6>] httpd 500 error response: > {"error":"error","reason":"eacces"} > [info] [<0.18650.6>] 127.0.0.1 - - 'DELETE' /test_suite_db/ 500 > A slightly snipped transcript from IRC: > (2:58:32 PM) markh: I see a number of INFO logs "Shutting down view group server, monitored db is closing." directly before the error. I was guessing the file may be unlink'd before one of those workers actually closes its handle? > (2:58:54 PM) alisdair: yeah, it's probably a race condition > (2:59:13 PM) alisdair: where the delete is tried before the fd is let go > (2:59:26 PM) alisdair: the reader fd that is > (2:59:32 PM) markh: yeah > ... > (3:11:47 PM) alisdair: i can't find an obvious deadlock > (3:12:18 PM) alisdair: couch_server:delete explicitly waits for the db process to exit > (3:12:23 PM) alisdair: before deleting it > (3:15:15 PM) alisdair: i think i found the problem > (3:15:23 PM) alisdair: but i need a windows machine to confirm > (3:15:30 PM) alisdair: i'll look into it tomorrow -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.