Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7837CF8D for ; Tue, 5 Jun 2012 10:39:26 +0000 (UTC) Received: (qmail 18482 invoked by uid 500); 5 Jun 2012 10:39:26 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 18063 invoked by uid 500); 5 Jun 2012 10:39:25 -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 18008 invoked by uid 99); 5 Jun 2012 10:39:23 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2012 10:39:23 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 7CF4A140BEF for ; Tue, 5 Jun 2012 10:39:23 +0000 (UTC) Date: Tue, 5 Jun 2012 10:39:23 +0000 (UTC) From: "Robert Newson (JIRA)" To: dev@couchdb.apache.org Message-ID: <54163280.38980.1338892763514.JavaMail.jiratomcat@issues-vm> In-Reply-To: <420614750.36201.1338843983220.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (COUCHDB-1491) view cleanup can kill the viewserver handling process MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13289322#comment-13289322 ] Robert Newson commented on COUCHDB-1491: ---------------------------------------- Reproduced on master (and ronny reports it for 1.2.0), the issue is pretty clear from the log. Deleting the ddoc causes the view group process to exit, but get_index/1 reads a public ets table directly which still contains the old pid. It seems we try to avoid the overhead of the gen_server call if we get back a valid pid; case ets:lookup(?BY_SIG, {DbName, Sig}) of [{_, Pid}] when is_pid(Pid) -> {ok, Pid}; _ -> Args = {Module, IdxState, DbName, Sig}, gen_server:call(?MODULE, {get_index, Args}, infinity) but the pid in this case is probably exiting after the is_pid call but before the subsequent link call. Relevant log output; [info] [<0.133.0>] 127.0.0.1 - - DELETE /test_viewserver_fail/_design/test?rev=1-490d7535c94dda36a8ff75a78faecd6d 200 [info] [<0.179.0>] Closing index for db: test_viewserver_fail idx: _design/test sig: "3c74ba64baa80fe929c51adb42c511ad" reason: normal [info] [<0.133.0>] 127.0.0.1 - - POST /test_viewserver_fail/_view_cleanup 202 [info] [<0.134.0>] 127.0.0.1 - - PUT /test_viewserver_fail/_design/test 201 [error] [<0.134.0>] Uncaught error in HTTP request: {exit, {noproc, {gen_server,call, [<0.179.0>, {get_state,23}, infinity]}}} [info] [<0.134.0>] Stacktrace: [{gen_server,call,3}, {couch_mrview_util,get_view,4}, {couch_mrview,query_view,6}, {couch_httpd,etag_maybe,2}, {couch_mrview_http,design_doc_view,5}, {couch_httpd_db,do_db_req,2}, {couch_httpd,handle_request_int,5}, {mochiweb_http,headers,5}] > view cleanup can kill the viewserver handling process > ----------------------------------------------------- > > Key: COUCHDB-1491 > URL: https://issues.apache.org/jira/browse/COUCHDB-1491 > Project: CouchDB > Issue Type: Bug > Components: View Server Support > Reporter: Ronny Pfannschmidt > Attachments: testcase.py > > > basic steps to create the issue on a empty db > 1. save a few docs > 2. create a ddoc, triger view update > 3. delete the ddoc > 4. view cleanup > 6. push ddoc again > 7. view update -> {"error":"noproc","reason":"{gen_server,call,[<0.485.0>,{get_state,200003},infinity]}"} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira