You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Dave Cottlehuber (Created) (JIRA)" <ji...@apache.org> on 2011/11/23 23:18:40 UTC
[jira] [Created] (COUCHDB-1346) CouchDB hangs during start of view
indexing
CouchDB hangs during start of view indexing
-------------------------------------------
Key: COUCHDB-1346
URL: https://issues.apache.org/jira/browse/COUCHDB-1346
Project: CouchDB
Issue Type: Bug
Components: View Server Support
Affects Versions: 1.3
Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
Erlang R14B03 + crypto patches.
Mozilla Javascript 1.8.5
Reporter: Dave Cottlehuber
Priority: Blocker
Fix For: 1.3
[info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
[info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
[info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
[info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
[info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
[info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
[info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
[info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
[info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
[error] [<0.20050.0>] ** Generic server couch_index_server terminating
** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
** When Server state == {st,"../var/lib/couchdb"}
** Reason for termination ==
** {{case_clause,{error,eacces}},
[{couch_file,'-nuke_dir/2-fun-0-',3},
{lists,foreach,2},
{couch_file,nuke_dir,2},
{couch_index_server,handle_cast,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}
=ERROR REPORT==== 23-Nov-2011::21:17:14 ===
** Generic server couch_index_server terminating
** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
** When Server state == {st,"../var/lib/couchdb"}
** Reason for termination ==
** {{case_clause,{error,eacces}},
[{couch_file,'-nuke_dir/2-fun-0-',3},
{lists,foreach,2},
{couch_file,nuke_dir,2},
{couch_index_server,handle_cast,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}
[error] [<0.20050.0>] {error_report,<0.19957.0>,
{<0.20050.0>,crash_report,
[[{initial_call,
{couch_index_server,init,['Argument__1']}},
{pid,<0.20050.0>},
{registered_name,couch_index_server},
{error_info,
{exit,
{{case_clause,{error,eacces}},
[{couch_file,'-nuke_dir/2-fun-0-',3},
{lists,foreach,2},
{couch_file,nuke_dir,2},
{couch_index_server,handle_cast,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]},
[{gen_server,terminate,6},
{proc_lib,init_p_do_apply,3}]}},
{ancestors,
[couch_secondary_services,couch_server_sup,
<0.19958.0>]},
{messages,
[{'$gen_cast',
{reset_indexes,<<"test_suite_db_a">>}}]},
{links,[<0.20051.0>,<0.20026.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,1597},
{stack_size,24},
{reductions,12211}],
[{neighbour,
[{pid,<0.20051.0>},
{registered_name,[]},
{initial_call,
{couch_event_sup,init,['Argument__1']}},
{current_function,{gen_server,loop,6}},
{ancestors,
[couch_index_server,
couch_secondary_services,
couch_server_sup,<0.19958.0>]},
{messages,[]},
{links,[<0.20050.0>,<0.20018.0>]},
{dictionary,[]},
{trap_exit,false},
{status,waiting},
{heap_size,233},
{stack_size,9},
{reductions,32}]}]]}}
=CRASH REPORT==== 23-Nov-2011::21:17:14 ===
crasher:
initial call: couch_index_server:init/1
pid: <0.20050.0>
registered_name: couch_index_server
exception exit: {{case_clause,{error,eacces}},
[{couch_file,'-nuke_dir/2-fun-0-',3},
{lists,foreach,2},
{couch_file,nuke_dir,2},
{couch_index_server,handle_cast,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}
in function gen_server:terminate/6
ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
links: [<0.20051.0>,<0.20026.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 1597
stack_size: 24
reductions: 12211
neighbours:
neighbour: [{pid,<0.20051.0>},
{registered_name,[]},
{initial_call,{couch_event_sup,init,['Argument__1']}},
{current_function,{gen_server,loop,6}},
{ancestors,[couch_index_server,couch_secondary_services,
couch_server_sup,<0.19958.0>]},
{messages,[]},
{links,[<0.20050.0>,<0.20018.0>]},
{dictionary,[]},
{trap_exit,false},
{status,waiting},
{heap_size,233},
{stack_size,9},
{reductions,32}]
[error] [<0.20026.0>] {error_report,<0.19957.0>,
{<0.20026.0>,supervisor_report,
[{supervisor,{local,couch_secondary_services}},
{errorContext,child_terminated},
{reason,
{{case_clause,{error,eacces}},
[{couch_file,'-nuke_dir/2-fun-0-',3},
{lists,foreach,2},
{couch_file,nuke_dir,2},
{couch_index_server,handle_cast,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}},
{offender,
[{pid,<0.20050.0>},
{name,index_server},
{mfargs,{couch_index_server,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]}]}}
OS process tree at this time is:
Process information for SENDAI:
Name Pid Pri Thd Hnd VM WS Priv
Idle 0 0 2 0 0 24 0
System 4 8 79 477 3380 304 108
explorer 1984 8 21 664 213732 46340 21540
cmd 2104 8 1 25 48132 3304 2144
pslist 2776 13 1 133 63584 4976 2000
cmd 2504 8 1 26 44980 3512 3012
werl 2680 8 16 390 196232 40064 28628
win32sysinfo 1152 8 1 21 12624 2124 640
couchspawnkillable 1444 8 1 30 12992 2284 688
couchjs 1468 8 1 39 55900 6572 4056
couchspawnkillable 2740 8 1 30 12992 2280 684
couchjs 2756 8 1 39 55900 7108 4444
Erlang resumes running CouchDB when couchjs procs are terminated with extreme
prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
commit. This could be a race condition during invalidation of the views, and
subsequent deletion of the related ddoc view directory prior to reindexing.
On Windows a filesystem object cannot be deleted if there are open handles
remaining.
--
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-1346) CouchDB hangs during start of
view indexing
Posted by "Benoit Chesneau (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13490283#comment-13490283 ]
Benoit Chesneau commented on COUCHDB-1346:
------------------------------------------
@davisp since couch_index know who is waiting for the index couldn't we use that information for such purpose?
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Dave Cottlehuber
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510933#comment-13510933 ]
Jan Lehnardt commented on COUCHDB-1346:
---------------------------------------
This may or may not be of service: http://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Windows
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510055#comment-13510055 ]
Adam Kocoloski commented on COUCHDB-1346:
-----------------------------------------
[~janl] I was running it from Chrome installed locally on the Windows EC2 instance.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (COUCHDB-1346) CouchDB hangs during start of view
indexing
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Kocoloski reassigned COUCHDB-1346:
---------------------------------------
Assignee: Adam Kocoloski (was: Dave Cottlehuber)
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Dave Cottlehuber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508198#comment-13508198 ]
Dave Cottlehuber commented on COUCHDB-1346:
-------------------------------------------
Thanks Adam for your help on this. The most important point above is that the VM is hanging. It's possible that the IO during debug logging is too fast for the VM to keep up with, and that we end up blocking other IO. I will re-do these tests with +A 4 (which is what the Windows daemon & also unix uses also) and see if this helps. I am +1 on moving ahead with this patch & the release, and to see if the OTP team have any suggestions on troubleshooting the VM hang. I should make some good progress on this today also.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Dave Cottlehuber (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156348#comment-13156348 ]
Dave Cottlehuber commented on COUCHDB-1346:
-------------------------------------------
Likely this issue was introduced in COUCHDB-1270 when nuke_dir appeared, git commit c66ebaab.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
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-1346) CouchDB hangs during start of
view indexing
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509825#comment-13509825 ]
Jan Lehnardt commented on COUCHDB-1346:
---------------------------------------
Adam, how are you running the `design_options` tests?
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510928#comment-13510928 ]
Paul Joseph Davis commented on COUCHDB-1346:
--------------------------------------------
@dch - And if you can do that, getting a backtrace for all threads in the Erlang VM before you kill couchjs as well might help.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Dave Cottlehuber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13488350#comment-13488350 ]
Dave Cottlehuber commented on COUCHDB-1346:
-------------------------------------------
@davisp advises we should be using a refcounter on open view files, and switching when these expire. Going to need some help on this!
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Dave Cottlehuber
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Volker Mische (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509935#comment-13509935 ]
Volker Mische commented on COUCHDB-1346:
----------------------------------------
This issue sounds similar to one we had at Couchbase.
The Couchbase ticket: http://www.couchbase.com/issues/browse/MB-6957
Which lead to Filipe's OTP patch: https://github.com/erlang/otp/commit/7c9ed2ed55e297dd78e7434851fa20063aa365f2
And to a patch for the Couchbase-couchdb fork (which is still needed even when the OTP fix is in, see the ticket for more information): http://review.couchbase.org/22042
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510927#comment-13510927 ]
Paul Joseph Davis commented on COUCHDB-1346:
--------------------------------------------
Reviewed Adam's patch and I'm +1 on applying it.
@dch - The fact that you can kill couchjs to free up the VM is quite intriguing. Is it possible to get a stack trace on Windows like you can with gdb on linux? If you can, having a stack trace of a couchjs that you then kill to free the VM could possibly be the key to figuring that out.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Joan Touzet (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13156908#comment-13156908 ]
Joan Touzet commented on COUCHDB-1346:
--------------------------------------
As discussed with rnewson on IRC, this is the classic Windows vs. Unix file removal issue - not an attempt to remote a directory using file:delete/1.
UNIX allows you to delete a file that is still in use. The directory entry is removed, but the inode is still marked as in use until the last file handle is closed, at which time the disk space is freed. Windows doesn't allow removal of a file with open file handles until they are all closed, returning EACCES upon delete request instead.
A quick fix would be to progressively back off and retry the delete a few times, if this is just timing-related. If not, more care is going to have to be taken to avoid the race/etc.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
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-1346) CouchDB hangs during start of
view indexing
Posted by "Dave Cottlehuber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510884#comment-13510884 ]
Dave Cottlehuber commented on COUCHDB-1346:
-------------------------------------------
What are we testing off?
A fresh 1.3.x https://www.dropbox.com/sh/jeifcxpbtpo78ak/Jw-fm6LJrR/snapshots/20121202/setup-couchdb-1.3.0a-f1b2304-git_otp_R15B01.exe and a new .beam file with Adam's patch here https://www.dropbox.com/sh/jeifcxpbtpo78ak/L_6G_6HeeT/snapshots/20121202/couch_index_server.beam also that needs to be dropped into place.
What are we seeing?
The VM isn't actually completely hung, just blocking on IO and the console is part of that. This seems not to change based on +A x settings. The VM is waiting on input from couchjs processes, and when these are killed, couch springs back into life. Reducing [os_query_servers] os_process_limit = 1 still sees a hang, although as a bonus you can still talk to the VM now.
Swapping in couchjs.exe from 1.2.0 shows no discernable difference, both hang.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (COUCHDB-1346) CouchDB hangs during start of view
indexing
Posted by "Dave Cottlehuber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Cottlehuber reassigned COUCHDB-1346:
-----------------------------------------
Assignee: Dave Cottlehuber
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Dave Cottlehuber
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
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-1346) CouchDB hangs during start of
view indexing
Posted by "Dave Cottlehuber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472598#comment-13472598 ]
Dave Cottlehuber commented on COUCHDB-1346:
-------------------------------------------
Refer to pull request https://github.com/apache/couchdb/pull/33 from Adam Lofts.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Dave Cottlehuber
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508146#comment-13508146 ]
Adam Kocoloski commented on COUCHDB-1346:
-----------------------------------------
I took a closer look at this ticket today and came up with the patch below to ensure that view index files are closed before we attempt to nuke the directory when executing a reset_indexes call. [~dch] helped me load the patch on a test Windows instance at EC2, and we confirmed that the patch allows the "basics" entry in the test suite to run to completion when it hadn't before. So, yay for that.
Unfortunately, we're noticing frequent hangs in other portions of the test suite, including but not limited to the "design_options" test. My observations from an evening running tests:
* The design_options test always passes with the log level set to "debug".
* When the level is set to "info" the test often hangs, and the Erlang VM seems to hang as well.
* The hang often occurs on the second invocation of the test.
* The hang occurs with _and_ without my patch.
That last point is rather crucial. [~dch] indicated that the test had been passing, but I can't seem to make that happen even with a stock build of the HEAD of 1.3.x. My current recommendation is to review and apply this patch as it only improves matters during my testing. That being said, I'd love to understand the root cause of these hangs when debug logging is disabled.
{code:diff}
diff --git a/src/couch_index/src/couch_index_server.erl b/src/couch_index/src/couch_index_server.erl
index 48fa8e4..bc1fce7 100644
--- a/src/couch_index/src/couch_index_server.erl
+++ b/src/couch_index/src/couch_index_server.erl
@@ -160,7 +160,9 @@ reset_indexes(DbName, Root) ->
% shutdown all the updaters and clear the files, the db got changed
Fun = fun({_, {DDocId, Sig}}) ->
[{_, Pid}] = ets:lookup(?BY_SIG, {DbName, Sig}),
- couch_util:shutdown_sync(Pid),
+ MRef = erlang:monitor(process, Pid),
+ gen_server:cast(Pid, delete),
+ receive {'DOWN', MRef, _, _, _} -> ok end,
rem_from_ets(DbName, Sig, DDocId, Pid)
end,
lists:foreach(Fun, ets:lookup(?BY_DB, DbName)),
{code}
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13508271#comment-13508271 ]
Adam Kocoloski commented on COUCHDB-1346:
-----------------------------------------
I did some more reading and log-based debugging this morning. We're doing something rather screwy. It turns out the the individual view index processes are *already* monitoring their parent DB; when we delete the DB, the index is automatically closed:
https://github.com/apache/couchdb/blob/bde29b/src/couch_index/src/couch_index.erl#L80
https://github.com/apache/couchdb/blob/bde29b/src/couch_index/src/couch_index.erl#L296-L300
The handler for that 'DOWN' message will invoke the gen_server's terminate function, which closes the file descriptor cleanly. So that's A Good Thing. Unfortunately, we don't always let that cleanup run to completion, because we've got this separate DB update notification listener:
https://github.com/apache/couchdb/blob/bde29b/src/couch_index/src/couch_index_server.erl#L159-L168
The couch_index processes do not trap exits, so when the reset_indexes function calls shutdown_sync it terminates the couch_index process immediately, bypassing any additional cleanup that we wanted to do. The patch I wrote allows for the termination to finish cleanly.
It seems to me that even with the existing shutdown_sync invocation we'd eventually close all the file descriptors because of exit signal propagation, but at that point we may be racing the process that tries to delete them (and when we lose, we hang). The clean shutdown avoids that race.
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Adam Kocoloski
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (COUCHDB-1346) CouchDB hangs during start of
view indexing
Posted by "Dave Cottlehuber (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13292498#comment-13292498 ]
Dave Cottlehuber commented on COUCHDB-1346:
-------------------------------------------
Sorry, lost this ticket by not assigning it to myself.
Atomic moves of filenames are allowed within the same filesystem
on Windows, even if the file is open.
Modifying nuke_dir to relocate all files into .delete & then remove
looks like a reasonable approach to resolving this cross-platform,
that is crash-safe and can use a backoff to clean up if reqd on
Window when view files are still held open.
Erlang R15B01 (erts-5.9.1) [source] [smp:2:2] [async-threads:0]
Eshell V5.9.1 (abort with ^G)
1> pwd(),
1> file:make_dir("nested"),
1> file:make_dir(".delete"),
1> {ok, File} = file:open("nested/file", [append]),
1> file:write(File, <<"fill me up!">>).
C:/tmp
ok
%% can't move a directory that has open handles
2> file:rename("nested", ".delete\\nested").
{error,einval}
3> file:rename("nested", ".delete/nested").
{error,einval}
%% but we can move files that have open handles
4> file:rename("nested/file", ".delete/file").
ok
5> file:write(File, <<"Moar Data">>).
ok
6>
> CouchDB hangs during start of view indexing
> -------------------------------------------
>
> Key: COUCHDB-1346
> URL: https://issues.apache.org/jira/browse/COUCHDB-1346
> Project: CouchDB
> Issue Type: Bug
> Components: View Server Support
> Affects Versions: 1.3
> Environment: Windows 7 Enterprise only, not able to replicate on Mac OS X.
> Erlang R14B03 + crypto patches.
> Mozilla Javascript 1.8.5
> Reporter: Dave Cottlehuber
> Assignee: Dave Cottlehuber
> Priority: Blocker
> Labels: Windows
> Fix For: 1.3
>
>
> [info] [<0.20499.0>] Opening index for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc sig: "d5c87ad33242b181f86be2139cbccd96"
> [info] [<0.20504.0>] Starting index update for db: test_suite_db idx: f4421bf4e9c9bf2acb3db91bca9e9adc
> [info] [<0.20334.0>] 172.16.40.1 - - POST /test_suite_db/_temp_view 500
> [info] [<0.20513.0>] 172.16.40.1 - - GET /_utils/couch_tests.html?script/couch_tests.js 200
> [info] [<0.20514.0>] 172.16.40.1 - - GET /_utils/index.html 200
> [info] [<0.20060.0>] 172.16.40.1 - - DELETE /test_suite_db_a/ 200
> [info] [<0.20407.0>] 172.16.40.1 - - GET /test_suite_reports/ 404
> [info] [<0.20058.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20071.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20069.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20484.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20364.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20062.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20388.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20345.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20072.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20059.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20061.0>] 172.16.40.1 - - DELETE /test_suite_db/ 404
> [info] [<0.20472.0>] 172.16.40.1 - - DELETE /test_suite_db/ 200
> [error] [<0.20050.0>] ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> =ERROR REPORT==== 23-Nov-2011::21:17:14 ===
> ** Generic server couch_index_server terminating
> ** Last message in was {'$gen_cast',{reset_indexes,<<"test_suite_db">>}}
> ** When Server state == {st,"../var/lib/couchdb"}
> ** Reason for termination ==
> ** {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> [error] [<0.20050.0>] {error_report,<0.19957.0>,
> {<0.20050.0>,crash_report,
> [[{initial_call,
> {couch_index_server,init,['Argument__1']}},
> {pid,<0.20050.0>},
> {registered_name,couch_index_server},
> {error_info,
> {exit,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]},
> [{gen_server,terminate,6},
> {proc_lib,init_p_do_apply,3}]}},
> {ancestors,
> [couch_secondary_services,couch_server_sup,
> <0.19958.0>]},
> {messages,
> [{'$gen_cast',
> {reset_indexes,<<"test_suite_db_a">>}}]},
> {links,[<0.20051.0>,<0.20026.0>]},
> {dictionary,[]},
> {trap_exit,true},
> {status,running},
> {heap_size,1597},
> {stack_size,24},
> {reductions,12211}],
> [{neighbour,
> [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,
> {couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,
> [couch_index_server,
> couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]}]]}}
> =CRASH REPORT==== 23-Nov-2011::21:17:14 ===
> crasher:
> initial call: couch_index_server:init/1
> pid: <0.20050.0>
> registered_name: couch_index_server
> exception exit: {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}
> in function gen_server:terminate/6
> ancestors: [couch_secondary_services,couch_server_sup,<0.19958.0>]
> messages: [{'$gen_cast',{reset_indexes,<<"test_suite_db_a">>}}]
> links: [<0.20051.0>,<0.20026.0>]
> dictionary: []
> trap_exit: true
> status: running
> heap_size: 1597
> stack_size: 24
> reductions: 12211
> neighbours:
> neighbour: [{pid,<0.20051.0>},
> {registered_name,[]},
> {initial_call,{couch_event_sup,init,['Argument__1']}},
> {current_function,{gen_server,loop,6}},
> {ancestors,[couch_index_server,couch_secondary_services,
> couch_server_sup,<0.19958.0>]},
> {messages,[]},
> {links,[<0.20050.0>,<0.20018.0>]},
> {dictionary,[]},
> {trap_exit,false},
> {status,waiting},
> {heap_size,233},
> {stack_size,9},
> {reductions,32}]
> [error] [<0.20026.0>] {error_report,<0.19957.0>,
> {<0.20026.0>,supervisor_report,
> [{supervisor,{local,couch_secondary_services}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,{error,eacces}},
> [{couch_file,'-nuke_dir/2-fun-0-',3},
> {lists,foreach,2},
> {couch_file,nuke_dir,2},
> {couch_index_server,handle_cast,2},
> {gen_server,handle_msg,5},
> {proc_lib,init_p_do_apply,3}]}},
> {offender,
> [{pid,<0.20050.0>},
> {name,index_server},
> {mfargs,{couch_index_server,start_link,[]}},
> {restart_type,permanent},
> {shutdown,brutal_kill},
> {child_type,worker}]}]}}
> OS process tree at this time is:
> Process information for SENDAI:
> Name Pid Pri Thd Hnd VM WS Priv
> Idle 0 0 2 0 0 24 0
> System 4 8 79 477 3380 304 108
> explorer 1984 8 21 664 213732 46340 21540
> cmd 2104 8 1 25 48132 3304 2144
> pslist 2776 13 1 133 63584 4976 2000
> cmd 2504 8 1 26 44980 3512 3012
> werl 2680 8 16 390 196232 40064 28628
> win32sysinfo 1152 8 1 21 12624 2124 640
> couchspawnkillable 1444 8 1 30 12992 2284 688
> couchjs 1468 8 1 39 55900 6572 4056
> couchspawnkillable 2740 8 1 30 12992 2280 684
> couchjs 2756 8 1 39 55900 7108 4444
> Erlang resumes running CouchDB when couchjs procs are terminated with extreme
> prejudice. The hang still occurs after reverting fdmanana's COUCHDB-1334
> commit. This could be a race condition during invalidation of the views, and
> subsequent deletion of the related ddoc view directory prior to reindexing.
> On Windows a filesystem object cannot be deleted if there are open handles
> remaining.
--
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