You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Robert Newson (JIRA)" <ji...@apache.org> on 2012/06/05 12:39:23 UTC
[jira] [Commented] (COUCHDB-1491) view cleanup can kill the
viewserver handling process
[ 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