couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Wallace (JIRA)" <>
Subject [jira] [Created] (COUCHDB-2425) Exceptions in couch_proc_manager:new_proc/1 leave dangling couch_query_servers
Date Fri, 31 Oct 2014 19:34:34 GMT
Mike Wallace created COUCHDB-2425:

             Summary: Exceptions in couch_proc_manager:new_proc/1 leave dangling couch_query_servers
                 Key: COUCHDB-2425
             Project: CouchDB
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: Database Core
            Reporter: Mike Wallace

If an exception is thrown in the try blocks in either of the couch_proc_manager:new_proc/1
clauses [1] [2] then a spawn_error is returned which is handled by a specific handle_info
clause [3] which does not reply to the calling process. When the caller is couch_query_servers:get_os_process/1
[4] there is an infinite timeout so that process will hang around until either the node reboots
or someone intervenes.

The user-facing symptom is an entry in _active_tasks that makes no progress and never goes

The easiest way to reproduce this is to create a new view and then patch the code to force
an exception in the appropriate place, e.g.: (assuming a live dev/run instance): 

 1. Create DB, add a ddoc and a doc:
$ curl -X PUT http://localhost:15984/kitteh
$ curl -X POST http://localhost:15984/kitteh -d '{"_id":"_design/view", "views": {"test":
{"map": "function(doc) { emit(, 1); }"}}}' -H 'Content-Type: application/json'
$ curl -X PUT http://localhost:15984/kitteh/ohai -d '{}'

 2. Apply then re-run make and

 3. Attempt to query the view:
$ curl -X GET http://localhost:15984/kitteh/_design/view/_view/test
{"error":"timeout","reason":"The request could not be processed in a reasonable amount of

 4. Observe index build tasks which never go away:
$ curl -X GET http://localhost:15986/_active_tasks





This message was sent by Atlassian JIRA

View raw message