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 2018/03/03 01:57:29 UTC

[GitHub] vitaly-goot commented on issue #1010: Compaction of a heavily updated view - file descriptor leak (known as ".deleted" issue)

vitaly-goot commented on issue #1010: Compaction of a heavily updated view - file descriptor leak (known as ".deleted" issue)
URL: https://github.com/apache/couchdb/issues/1010#issuecomment-370106652
 
 
   Having a similar issue on CouchDB-1.6.x 
   Here are some additional debugging info, if that could help:
   
   `lsof` in my case show leak on file descriptor #23.
   ```beam.smp 2471 root   23u      REG    253,0     2355299   95256735 /ghostcache/edgedata/data/.delete/0d697973b6cd6b71c0d726878c1ffaed (deleted)```
   
   Here is a backtrace reported by process_info on erlang PID that holds that descriptor:
   ```
   [{current_function,{gen_server,loop,6}},
    {initial_call,{proc_lib,init_p,5}},
    {status,waiting},
    {message_queue_len,0},
    {messages,[]},
    {links,[#Port<1941.3912>,<1941.244.0>]},
    {dictionary,[{'$ancestors',[<1941.241.0>]},
                 {'$initial_call',{couch_file,init,1}}]},
    {trap_exit,true},
    {error_handler,error_handler},
    {priority,normal},
    {group_leader,<1941.111.0>},
    {total_heap_size,1597},
    {heap_size,987},
    {stack_size,9},
    {reductions,1749931},
    {garbage_collection,[{min_bin_vheap_size,46368},
                         {min_heap_size,233},
                         {fullsweep_after,65535},
                         {minor_gcs,987}]},
    {suspending,[]}]
   
   
    {<1941.242.0>,^M
     {backtrace,<<"Program counter: 0x00007f5924aeed40 (gen_server:loop/6 + 264)\nCP: 0x0000000000000000 (invalid)\narity = 0\n\n0x00007f592b3e5fe0 Return addr 0x00007f5924ae72b0 (proc_lib:init_p_do_apply/3 + 56)\ny(0)     []\ny(1)     infinity\ny(2)     couch_file\ny(3)     {file,{file_descriptor,prim_file,{#Port<0.3912>,23}},true,2445427,<0.244.0>}\ny(4)     <0.242.0>\ny(5)     <0.241.0>\n\n0x00007f592b3e6018 Return addr 0x00000000008a6278 (<terminate process normally>)\ny(0)     Catch 0x00007f5924ae72d0 (proc_lib:init_p_do_apply/3 + 88)\n">>}},^M
   ```
   
   And here is a backtrace reported by process info of linked process`{links,[#Port<1941.3912>,<1941.244.0>]}` 
   
   ```
   {backtrace,<<"Program counter: 0x00000000008a6270 (unknown function)\nCP: 0x00000000008a6278 (<terminate process normally>)\narity = 3\n   proc_lib\n   wake_up\n   [gen_server,wake_hib,[<0.241.0>,<0.244.0>,{db,<0.244.0>,nil,<<16 bytes>>,<0.3382.2688>,#Ref<0.0.3410.8669>,{db_header,6,15,0,{125165,{6,0,115324},2264},{116902,6,1558},{140103,[],5187},0,nil,nil,1000},15,{btree,<0.3382.2688>,{125165,{6,0,115324},2264},#Fun<couch_db_updater.btree_by_id_split.1>,#Fun<couch_db_updater.btree_by_id_join.2>,undefined,#Fun<couch_db_updater.btree_by_id_reduce.2>,snappy},{btree,<0.3382.2688>,{116902,6,1558},#Fun<couch_db_updater.btree_by_seq_split.1>,#Fun<couch_db_updater.btree_by_seq_join.2>,undefined,#Fun<couch_db_updater.btree_by_seq_reduce.2>,snappy},{btree,<0.3382.2688>,{140103,[],5187},undefined,undefined,undefined,nil,snappy},15,<<3 bytes>>,\"/ghostcache/edgedata/data/dbs.couch\",[],[],nil,{user_ctx,null,[<<6 bytes>>],undefined,write},nil,nil,1000,[before_header,after_header,on_file_open],[sys_db,{user_ctx,{user_ctx,null,[<<6 bytes>>],undefined,write}}],snappy,nil,nil},couch_db_updater,[]]]\n">>}
   ok
   ```
   
   In that particular case it's related to `dbs.couch`.  
   I've seen similar issues related to `nodes.couch`  as well as data and view files.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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