Skip to content

eunit couchdb_views_tests errors with 500: {'EXIT',noproc} #589

@wohali

Description

@wohali

Current & Expected Behaviour

The couchdb_views_tests eunit test suite should always pass. Occasionally, it fails with a 500 error.

Environment: Jenkins, master, Ubuntu 16.04 with Erlang 18.3

Makefile output:

module 'couchdb_views_tests'
  View indexes cleanup
    couchdb_views_tests:214: should_have_two_indexes_alive_before_deletion...ok
    couchdb_views_tests:219: should_cleanup_index_file_after_ddoc_deletion...ok
    couchdb_views_tests:225: should_cleanup_all_index_files...ok
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
    [done in 0.242 s]
  View group db leaks
    couchdb_views_tests:228: couchdb_1138...[0.237 s] ok
    couchdb_views_tests:266: couchdb_1309...[0.037 s] ok
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
    [done in 0.339 s]
  View group shutdown
    couchdb_views_tests:315: couchdb_1283...[0.158 s] ok
[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
    [done in 0.161 s]
  Upgrade and bugs related tests
    couchdb_views_tests:159: should_not_remember_docs_in_index_after_backup_restore...*failed*
in function couchdb_views_tests:'-query_view/4-fun-0-'/2 (test/couchdb_views_tests.erl, line 527)
in call from couchdb_views_tests:query_view/4 (test/couchdb_views_tests.erl, line 527)
in call from couchdb_views_tests:'-should_not_remember_docs_in_index_after_backup_restore/1-fun-8-'/1 (test/couchdb_views_tests.erl, line 173)
**error:{assertEqual,[{module,couchdb_views_tests},
              {line,527},
              {expression,"Code"},
              {expected,200},
              {value,500}]}
  output:<<"">>

[os_mon] memory supervisor port (memsup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
    [done in 0.071 s]

couch.log output:

[info] 2017-06-08T18:34:25.819709Z nonode@nohost <0.24082.0> -------- Opening index for db: eunit-test-db-1496946865766965 idx: _design/foo sig: "5398c9ad12cad56d2228cc89a2770ddf"
[info] 2017-06-08T18:34:25.820150Z nonode@nohost <0.24085.0> -------- Starting index update for db: eunit-test-db-1496946865766965 idx: _design/foo
[info] 2017-06-08T18:34:25.825651Z nonode@nohost <0.24085.0> -------- Index update finished for db: eunit-test-db-1496946865766965 idx: _design/foo
[notice] 2017-06-08T18:34:25.826205Z nonode@nohost <0.24032.0> -------- 127.0.0.1 - - GET /eunit-test-db-1496946865766965/_design/foo/_view/bar 200
[info] 2017-06-08T18:34:25.826998Z nonode@nohost <0.24018.0> -------- db eunit-test-db-1496946865766965 died with reason shutdown
[info] 2017-06-08T18:34:25.827066Z nonode@nohost <0.24082.0> -------- Index shutdown by monitor notice for db: eunit-test-db-1496946865766965 idx: _design/foo
[error] 2017-06-08T18:34:25.831129Z nonode@nohost <0.24033.0> -------- Uncaught error in HTTP request: {error,{badmatch,{'EXIT',noproc}}}
[info] 2017-06-08T18:34:25.831593Z nonode@nohost <0.24082.0> -------- Closing index for db: eunit-test-db-1496946865766965 idx: _design/foo sig: "5398c9ad12cad56d2228cc89a2770ddf" because normal
[info] 2017-06-08T18:34:25.831969Z nonode@nohost <0.24033.0> -------- Stacktrace: [{couch_file,pread_binary,2,[{file,"src/couch_file.erl"},{line,169}]},{couch_file,pread_term,2,[{file,"src/couch_file.erl"},{line,157}]},{couch_btree,get_node,2,[{file,"src/couch_btree.erl"},{line,434}]},{couch_btree,lookup,3,[{file,"src/couch_btree.erl"},{line,284}]},{couch_btree,lookup,2,[{file,"src/couch_btree.erl"},{line,274}]},{couch_db,get_full_doc_info,2,[{file,"src/couch_db.erl"},{line,286}]},{couch_db,open_doc_int,3,[{file,"src/couch_db.erl"},{line,1366}]},{couch_db,open_doc,3,[{file,"src/couch_db.erl"},{line,189}]}]
[notice] 2017-06-08T18:34:25.832259Z nonode@nohost <0.24033.0> -------- 127.0.0.1 - - GET /eunit-test-db-1496946865766965/_design/foo/_view/bar 500
[error] 2017-06-08T18:34:25.832512Z nonode@nohost <0.24033.0> -------- httpd 500 error response:
 {"error":"badmatch","reason":"{'EXIT',noproc}"}
[info] 2017-06-08T18:34:25.842468Z nonode@nohost <0.7.0> -------- Application couch exited with reason: stopped

Possible Solution

Is this another case where the monitor shuts down too early?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions