Hello Robert,
Saturday, September 22, 2012, 2:49:16 PM, you wrote:
> Yup, CouchDB starts from the end of the file and looks backwards until
> it finds a valid footer, it can take some time if that's a long way
> from the end. It's not so much that CouchDB is skipping over "random
> binary data", it just doesn't have any pointers to that area of the
> file.
> How long as couchdb been seeking backward for a footer? When you say
> "doesn't recognize it", are you getting an error message?
OK, I left CouchDB 1.2.0 (Windows) running for a good hour on the
incomplete compaction DB. In the process it consumed all available OS
memory (12GB), then crashes with an exception. Excerpt from the log
file (debug priority) attached.
--
Best regards,
Rudi mailto:[email protected]
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.163.0>] {error_report,<0.34.0>,
{<0.163.0>,crash_report,
[[{initial_call,{couch_db,init,['Argument__1']}},
{pid,<0.163.0>},
{registered_name,[]},
{error_info,
{exit,
{{badmatch,{error,snappy_nif_not_loaded}},
[{couch_db,init,1,
[{file,
"d:/relax/couchdb/src/couchdb/couch_db.erl"},
{line,1084}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,297}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]},
[{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,321}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,[<0.160.0>]},
{messages,[]},
{links,[<0.160.0>,<0.164.0>]},
{dictionary,[]},
{trap_exit,false},
{status,running},
{heap_size,610},
{stack_size,24},
{reductions,139}],
[{neighbour,
[{pid,<0.160.0>},
{registered_name,[]},
{initial_call,{erlang,apply,2}},
{current_function,{proc_lib,sync_wait,2}},
{ancestors,[]},
{messages,
[{ack,<0.163.0>,
{error,
{{badmatch,{error,snappy_nif_not_loaded}},
[{couch_db,init,1,
[{file,
"d:/relax/couchdb/src/couchdb/couch_db.erl"},
{line,1084}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,297}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}}}]},
{links,[<0.161.0>,<0.163.0>,<0.93.0>]},
{dictionary,[]},
{trap_exit,false},
{status,runnable},
{heap_size,233},
{stack_size,9},
{reductions,50}]}]]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.164.0>] {error_report,<0.34.0>,
{<0.164.0>,crash_report,
[[{initial_call,{couch_db_updater,init,['Argument__1']}},
{pid,<0.164.0>},
{registered_name,[]},
{error_info,
{exit,snappy_nif_not_loaded,
[{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,321}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,[<0.163.0>,<0.160.0>]},
{messages,[]},
{links,[<0.163.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,610},
{stack_size,24},
{reductions,638}],
[{neighbour,
[{pid,<0.160.0>},
{registered_name,[]},
{initial_call,{erlang,apply,2}},
{current_function,{proc_lib,sync_wait,2}},
{ancestors,[]},
{messages,[]},
{links,[<0.161.0>,<0.163.0>,<0.93.0>]},
{dictionary,[]},
{trap_exit,false},
{status,waiting},
{heap_size,233},
{stack_size,9},
{reductions,50}]}]]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.93.0>] Unexpected message,
restarting couch_server: {'EXIT',
<0.160.0>,
{{badmatch,
{error,
snappy_nif_not_loaded}},
[{couch_db,
init,1,
[{file,
"d:/relax/couchdb/src/couchdb/couch_db.erl"},
{line,
1084}]},
{gen_server,
init_it,6,
[{file,
"gen_server.erl"},
{line,
297}]},
{proc_lib,
init_p_do_apply,
3,
[{file,
"proc_lib.erl"},
{line,
227}]}]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.93.0>] ** Generic server
couch_server terminating
** Last message in was {'EXIT',<0.160.0>,
{{badmatch,{error,snappy_nif_not_loaded}},
[{couch_db,init,1,
[{file,
"d:/relax/couchdb/src/couchdb/couch_db.erl"},
{line,1084}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,297}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}}
** When Server state == {server,"d:\\photos\\",
{re_pattern,0,0,
<<69,82,67,80,116,0,0,0,16,0,0,0,1,0,0,0,0,0,
0,0,0,0,0,0,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,93,0,72,25,77,0,0,0,0,0,0,0,0,0,0,0,0,254,
255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
77,0,0,0,0,16,171,255,3,0,0,0,128,254,255,
255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,26,
84,0,72,0>>},
100,1,"Mon, 24 Sep 2012 11:31:26 GMT"}
** Reason for termination ==
** kill
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.93.0>] {error_report,<0.34.0>,
{<0.93.0>,crash_report,
[[{initial_call,{couch_server,init,['Argument__1']}},
{pid,<0.93.0>},
{registered_name,couch_server},
{error_info,
{exit,kill,
[{gen_server,terminate,6,
[{file,"gen_server.erl"},{line,737}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,
[couch_primary_services,couch_server_sup,<0.35.0>]},
{messages,
[{'$gen_call',
{<0.101.0>,#Ref<0.0.0.37236>},
{open,<<"_users">>,
[{before_doc_update,
#Fun<couch_users_db.before_doc_update.2>},
{after_doc_read,
#Fun<couch_users_db.after_doc_read.2>},
sys_db,
{user_ctx,
{user_ctx,null,[<<"_admin">>],undefined}},
sys_db]}}]},
{links,[<0.90.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,987},
{stack_size,24},
{reductions,3768}],
[]]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.90.0>] {error_report,<0.34.0>,
{<0.90.0>,supervisor_report,
[{supervisor,{local,couch_primary_services}},
{errorContext,child_terminated},
{reason,kill},
{offender,
[{pid,<0.93.0>},
{name,couch_server},
{mfargs,{couch_server,sup_start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]}]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.101.0>] ** Generic server
couch_auth_cache terminating
** Last message in was {'DOWN',#Ref<0.0.0.214>,process,<0.105.0>,shutdown}
** When Server state == {state,50,0,<0.102.0>,#Ref<0.0.0.214>}
** Reason for termination ==
** {kill,
{gen_server,call,
[couch_server,
{open,<<"_users">>,
[{before_doc_update,#Fun<couch_users_db.before_doc_update.2>},
{after_doc_read,#Fun<couch_users_db.after_doc_read.2>},
sys_db,
{user_ctx,{user_ctx,null,[<<"_admin">>],undefined}},
sys_db]},
infinity]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.101.0>] {error_report,<0.34.0>,
{<0.101.0>,crash_report,
[[{initial_call,{couch_auth_cache,init,['Argument__1']}},
{pid,<0.101.0>},
{registered_name,couch_auth_cache},
{error_info,
{exit,
{kill,
{gen_server,call,
[couch_server,
{open,<<"_users">>,
[{before_doc_update,
#Fun<couch_users_db.before_doc_update.2>},
{after_doc_read,
#Fun<couch_users_db.after_doc_read.2>},
sys_db,
{user_ctx,
{user_ctx,null,[<<"_admin">>],undefined}},
sys_db]},
infinity]}},
[{gen_server,terminate,6,
[{file,"gen_server.erl"},{line,737}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,
[couch_secondary_services,couch_server_sup,<0.35.0>]},
{messages,[]},
{links,[<0.99.0>,<0.102.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,1597},
{stack_size,24},
{reductions,919}],
[{neighbour,
[{pid,<0.102.0>},
{registered_name,[]},
{initial_call,
{couch_event_sup,init,['Argument__1']}},
{current_function,{gen_server,loop,6}},
{ancestors,
[couch_auth_cache,couch_secondary_services,
couch_server_sup,<0.35.0>]},
{messages,[{'$gen_cast',stop}]},
{links,[<0.101.0>,<0.94.0>]},
{dictionary,[]},
{trap_exit,false},
{status,runnable},
{heap_size,233},
{stack_size,9},
{reductions,32}]}]]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.99.0>] {error_report,<0.34.0>,
{<0.99.0>,supervisor_report,
[{supervisor,{local,couch_secondary_services}},
{errorContext,child_terminated},
{reason,
{kill,
{gen_server,call,
[couch_server,
{open,<<"_users">>,
[{before_doc_update,
#Fun<couch_users_db.before_doc_update.2>},
{after_doc_read,
#Fun<couch_users_db.after_doc_read.2>},
sys_db,
{user_ctx,
{user_ctx,null,[<<"_admin">>],undefined}},
sys_db]},
infinity]}}},
{offender,
[{pid,<0.101.0>},
{name,auth_cache},
{mfargs,{couch_auth_cache,start_link,[]}},
{restart_type,permanent},
{shutdown,brutal_kill},
{child_type,worker}]}]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.141.0>] Uncaught error in HTTP
request: {exit,
{kill,
{gen_server,call,
[couch_server,
{open,<<"photos">>,
[{user_ctx,
{user_ctx,null,
[<<"_admin">>],
<<"{couch_httpd_auth, default_authentication_handler}">>}}]},
infinity]}}}
[Mon, 24 Sep 2012 12:22:30 GMT] [info] [<0.141.0>] Stacktrace:
[{gen_server,call,3,
[{file,"gen_server.erl"},{line,188}]},
{couch_server,open,2,
[{file,
"d:/relax/couchdb/src/couchdb/couch_server.erl"},
{line,56}]},
{couch_db,open,2,
[{file,
"d:/relax/couchdb/src/couchdb/couch_db.erl"},
{line,78}]},
{couch_httpd_db,do_db_req,2,
[{file,
"d:/relax/couchdb/src/couchdb/couch_httpd_db.erl"},
{line,227}]},
{couch_httpd,handle_request_int,5,
[{file,
"d:/relax/couchdb/src/couchdb/couch_httpd.erl"},
{line,317}]},
{mochiweb_http,headers,5,
[{file,
"d:/relax/couchdb/src/mochiweb/mochiweb_http.erl"},
{line,136}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]
[Mon, 24 Sep 2012 12:22:30 GMT] [error] [<0.141.0>] Uncaught server error:
{kill,
{gen_server,call,
[couch_server,
{open,<<"photos">>,
[{user_ctx,
{user_ctx,null,
[<<"_admin">>],
<<"{couch_httpd_auth,
default_authentication_handler}">>}}]},
infinity]}}
[Mon, 24 Sep 2012 12:22:30 GMT] [info] [<0.141.0>] 127.0.0.1 - - GET
/photos/?_=1348486290050 500
[Mon, 24 Sep 2012 12:22:30 GMT] [debug] [<0.141.0>] httpd 500 error response:
{"error":"kill","reason":"{gen_server,call,\n [couch_server,\n
{open,<<\"photos\">>,\n [{user_ctx,\n {user_ctx,null,\n
[<<\"_admin\">>],\n <<\"{couch_httpd_auth,
default_authentication_handler}\">>}}]},\n infinity]}"}