You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/11/11 14:56:23 UTC

[GitHub] [couchdb] af-silva opened a new issue #2307: Strange behabior in Views and listing all documents, possible error -> mfa: fabric_rpc:all_docs/3 error:invalid_compression

af-silva opened a new issue #2307: Strange behabior in Views and listing all documents, possible error ->  mfa: fabric_rpc:all_docs/3 error:invalid_compression
URL: https://github.com/apache/couchdb/issues/2307
 
 
   ## Description
   
   I will try to explain the best I can the behavior couch is displaying right now. I have a database with 111455 documents. In this database we have a 34 views configured, and it was in working conditions until a few days ago, now we have been experience some problems accessing some of the views and trying listing all the documents (one thing to have in mind is that some of the views work...)
   
   Here is the log from the couch server:
   
   ```
   [error] 2019-11-11T10:54:55.185501Z couchdb@127.0.0.1 <0.30219.528> -------- 
   gen_server <0.30219.528> terminated with reason: no match of right hand value eof at couch_file:read_raw_iolist_int/3(line:627) <= couch_file:handle_call/3(line:449) <= gen_server:try_handle_call/4(line:615) <= gen_server:handle_msg/5(line:647) <= proc_lib:init_p_do_apply/3(line:247)
     last msg: {pread_iolist,169636056}
        state: [{data,[{"State",{file,{file_descriptor,prim_file,{#Port<0.148544>,758}},false,169976024,#Ref<0.0.71565313.2171>,infinity}},{"InitialFilePath","./data/shards/60000000-7fffffff/pt_2018_reports.1553264630.couch"}]}]
       extra: []
   
   
   [error] 2019-11-11T10:54:55.185727Z couchdb@127.0.0.1 <0.30219.528> -------- CRASH REPORT Process  (<0.30219.528>) with 1 neighbors exited with reason: no match of right hand value eof at couch_file:read_raw_iolist_int/3(line:627) <= couch_file:handle_call/3(line:449) <= gen_server:try_handle_call/4(line:615) <= gen_server:handle_msg/5(line:647) <= proc_lib:init_p_do_apply/3(line:247) at gen_server:terminate/7(line:812) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {couch_file,init,['Argument__1']}, ancestors: [<0.24437.529>,<0.20258.529>], messages: [], links: [<0.24437.529>], dictionary: [{couch_file_fd,{{file_descriptor,prim_file,{#Port<0.148544>,758}},"./..."}},...], trap_exit: false, status: running, heap_size: 987, stack_size: 27, reductions: 64488
   
   [error] 2019-11-11T10:54:55.186036Z couchdb@127.0.0.1 emulator -------- Error in process <0.2091.531> on node 'couchdb@127.0.0.1' with exit value:
   {{badmatch,{'EXIT',{{badmatch,eof},[{couch_file,read_raw_iolist_int,3,[{file,"src/couch_file.erl"},{line,627}]},{couch_file,handle_call,3,[{file,"src/couch_file.erl"},{line,449}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,615}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,647}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}}},[{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_bt_engine,read_doc_body,2,[{file,"src/couch_bt_engine.erl"},{line,343}]},{couch_db,make_doc,5,[{file,"src/couch_db.erl"},{line,1699}]},{couch_db,open_doc_int,3,[{file,"src/couch_db.erl"},{line,1630}]},{couch_index_updater,'-update/3-fun-2-',5,[{file,"src/couch_index_updater.erl"},{line,170}]},{couch_index_updater,'-update/3-fun-3-',7,[{file,"src/couch_index_updater.erl"},{line,180}]},{couch_bt_engine,drop_reductions,4,[{file,"src/couch_bt_engine.erl"},{line,1081}]}]}
   
   
   [error] 2019-11-11T10:54:55.186352Z couchdb@127.0.0.1 <0.13911.531> 437a055316 rexi_server: from: couchdb@127.0.0.1(<0.25557.530>) mfa: fabric_rpc:map_view/5 throw:{{badmatch,{'EXIT',{{badmatch,eof},[{couch_file,read_raw_iolist_int,3,[{file,"src/couch_file.erl"},{line,627}]},{couch_file,handle_call,3,[{file,"src/couch_file.erl"},{line,449}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,615}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,647}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}}},[{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_bt_engine,read_doc_body,2,[{file,"src/couch_bt_engine.erl"},{line,343}]},{couch_db,make_doc,5,[{file,"src/couch_db.erl"},{line,1699}]},{couch_db,open_doc_int,3,[{file,"src/couch_db.erl"},{line,1630}]},{couch_index_updater,'-update/3-fun-2-',5,[{file,"src/couch_index_updater.erl"},{line,170}]},{couch_index_updater,'-update/3-fun-3-',7,[{file,"src/couch_index_updater.erl"},{line,180}]},{couch_bt_engine,drop_reductions,4,[{file,"src/couch_bt_engine.erl"},{line,1081}]}]} [{couch_mrview_util,get_view_index_state,5,[{file,"src/couch_mrview_util.erl"},{line,137}]},{couch_mrview_util,get_view,4,[{file,"src/couch_mrview_util.erl"},{line,81}]},{couch_mrview,query_view,6,[{file,"src/couch_mrview.erl"},{line,247}]},{rexi_server,init_p,3,[{file,"src/rexi_server.erl"},{line,140}]}]
   
   [error] 2019-11-11T10:54:55.187343Z couchdb@127.0.0.1 <0.25557.530> 437a055316 req_err(4089041121) {badmatch,{'EXIT',{{badmatch,eof},
                      [{couch_file,read_raw_iolist_int,3,
                                   [{file,"src/couch_file.erl"},{line,627}]},
                       {couch_file,handle_call,3,
                                   [{file,"src/couch_file.erl"},{line,449}]},
                       {gen_server,try_handle_call,4,
                                   [{file,"gen_server.erl"},{line,615}]},
                       {gen_server,handle_msg,5,
                                   [{file,"gen_server.erl"},{line,647}]},
                       {proc_lib,init_p_do_apply,3,
                                 [{file,"proc_lib.erl"},{line,247}]}]}}} : [{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_bt_engine,read_doc_body,2,
                     [{file,"src/couch_bt_engine.erl"},{line,343}]},
    {couch_db,make_doc,5,[{file,"src/couch_db.erl"},{line,1699}]},
    {couch_db,open_doc_int,3,[{file,"src/couch_db.erl"},{line,1630}]},
    {couch_index_updater,'-update/3-fun-2-',5,
                         [{file,"src/couch_index_updater.erl"},{line,170}]},
    {couch_index_updater,'-update/3-fun-3-',7,
                         [{file,"src/couch_index_updater.erl"},{line,180}]},
    {couch_bt_engine,drop_reductions,4,
                     [{file,"src/couch_bt_engine.erl"},{line,1081}]}]
       [<<"couch_mrview_util:get_view_index_state/5 L137">>,<<"couch_mrview_util:get_view/4 L81">>,<<"couch_mrview:query_view/6 L247">>,<<"rexi_server:init_p/3 L140">>]
   
   [info] 2019-11-11T10:54:55.187624Z couchdb@127.0.0.1 <0.218.0> -------- db shards/60000000-7fffffff/pt_2018_reports.1553264630 died with reason {{badmatch,eof},[{couch_file,read_raw_iolist_int,3,[{file,"src/couch_file.erl"},{line,627}]},{couch_file,handle_call,3,[{file,"src/couch_file.erl"},{line,449}]},{gen_server,try_handle_call,4,[{file,"gen_server.erl"},{line,615}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,647}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]} 
   ```
   I have removed the [notice] tags for brevity.
    
   Some things that caught my eye were: 
   
   1st: `CRASH REPORT Process  (<0.30219.528>) with 1 neighbors exited with reason: no match of right hand value eof at couch_file:read_raw_iolist_int/3(line:627)` 
   
   2nd: `rexi_server: from: couchdb@127.0.0.1(<0.25557.530>) mfa: fabric_rpc:map_view/5 throw:{{badmatch,{'EXIT',{{badmatch,eof} ...`
   
   3rd: When executing the <server address>/<database>/_all_docs I receive `SyntaxError: JSON.parse: end of data when ',' or ']' was expected at line 2367 column 97 of the JSON data` and when looking at the couch logs I found this:
   ```
   [error] 2019-11-11T12:39:26.521064Z couchdb@127.0.0.1 <0.16819.1> d0dd1f1c8f rexi_server: from: couchdb@127.0.0.1(<0.7780.1>) mfa: fabric_rpc:all_docs/3 error:invalid_compression [{couch_compress,decompress,1,
   [{file,"src/couch_compress.erl"},{line,71}]},{couch_file,pread_term,2,[{file,"src/couch_file.erl"},{line,158}]},{couch_btree,get_node,2,[{file,"src/couch_btree.erl"},{line,434}]},{couch_btree,stream_node,7,
   [{file,"src/couch_btree.erl"},{line,761}]},{couch_btree,stream_kp_node,7,[{file,"src/couch_btree.erl"},{line,775}]},{couch_btree,stream_kp_node,8,[{file,"src/couch_btree.erl"},{line,819}]},{couch_btree,fold,4,
   [{file,"src/couch_btree.erl"},{line,222}]},{couch_bt_engine,fold_docs_int,5,[{file,"src/couch_bt_engine.erl"},{line,1045}]}]
   ``` 
   here I notice tha `mfa: fabric_rpc:all_docs/3 error:invalid_compression`. 
   
   From the above information my thoughts are that something is not right with the  **fabric_rpc** call, but I have no clue at what is happening to originate this behavior. Some help would be appreciated if possible. 
   
   
   ## Steps to Reproduce
   
   When trying to access 
   ` https://<server address>/<database>/_all_docs` I receive -> `SyntaxError: JSON.parse: end of data when ',' or ']' was expected at line 2367 column 97 of the JSON data`
   
   and 
   
   `https://<server address>/<database>/_design/<design document>/_view/<view>` I receive -> `{"error":"unknown_error","reason":"shutdown","ref":4089041121}`
   
   The above commands are related to the description above.
   
   ## Expected Behaviour
   
   What I was expecting was the correct execution of the query, obtaining the requested data (aka documents)
   
   ## Your Environment
   
   Server: Ubuntu 16.04
   Couchdb: 2.3.1
   Browser used for tests: Firefox 71.0b8 (64-bit)
   
   ```
   {"couchdb":"Welcome","version":"2.3.1","git_sha":"c298091a4","uuid":"7909e5447fbc83e0699155a53b776bf9","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services