You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Ronny Pfannschmidt (JIRA)" <ji...@apache.org> on 2012/06/04 23:06:23 UTC
[jira] [Created] (COUCHDB-1491) view cleanup can kill the
viewserver handling process
Ronny Pfannschmidt created COUCHDB-1491:
-------------------------------------------
Summary: 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
[jira] [Commented] (COUCHDB-1491) view cleanup can kill the
viewserver handling process
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Updated] (COUCHDB-1491) view cleanup can kill the
viewserver handling process
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson updated COUCHDB-1491:
-----------------------------------
Priority: Blocker (was: Major)
Fix Version/s: 1.3
Seems to only affect master (72ea7e382b2207) and not 1.2.0 or 1.2.x (5f93f041411a) but this is a blocking for the next release as it's a regression.
> 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
> Priority: Blocker
> Fix For: 1.3
>
> 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
[jira] [Updated] (COUCHDB-1491) view cleanup can kill the
viewserver handling process
Posted by "Ronny Pfannschmidt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ronny Pfannschmidt updated COUCHDB-1491:
----------------------------------------
Attachment: testcase.py
python script to replicate the issue
> 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
[jira] [Assigned] (COUCHDB-1491) view cleanup can kill the
viewserver handling process
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson reassigned COUCHDB-1491:
--------------------------------------
Assignee: Robert Newson (was: Paul Joseph Davis)
> 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
> Assignee: Robert Newson
> Priority: Blocker
> Fix For: 1.3
>
> 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
[jira] [Resolved] (COUCHDB-1491) view cleanup can kill the
viewserver handling process
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson resolved COUCHDB-1491.
------------------------------------
Resolution: Fixed
It was a simple bad pattern match;
case ets:lookup(?BY_PID, Pid) of
- [{Pid, DbName, Sig}] ->
+ [{Pid, {DbName, Sig}}] ->
> 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
> Assignee: Robert Newson
> Priority: Blocker
> Fix For: 1.3
>
> 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
[jira] [Assigned] (COUCHDB-1491) view cleanup can kill the
viewserver handling process
Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Newson reassigned COUCHDB-1491:
--------------------------------------
Assignee: Paul Joseph Davis
could you take a look at this?
> 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
> Assignee: Paul Joseph Davis
> Priority: Blocker
> Fix For: 1.3
>
> 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