Christopher Bonhage created COUCHDB-1794:
--------------------------------------------
Summary: Automatic compaction warning causes crash
Key: COUCHDB-1794
URL: https://issues.apache.org/jira/browse/COUCHDB-1794
Project: CouchDB
Issue Type: Bug
Components: Database Core
Reporter: Christopher Bonhage
While evaluating CouchDB 1.3.0's automatic compaction daemon, I encountered an
error when the daemon tried to warn about insufficient free space:
{noformat}
[Mon, 13 May 2013 22:30:10 GMT] [error] [emulator] Error in process <0.467.0>
with exit value:
{undef,[{couch_log,warn_on,[couch_compaction_daemon],[]},{couch_compaction_daemon,can_db_compact,2,[{file,"couch_compaction_daemon.erl"},{line,305}]},{couch_compaction_daemon,maybe_compact_db,2,[{file,"couch_compact...
[Mon, 13 May 2013 22:30:10 GMT] [error] [<0.466.0>] ** Generic server
couch_compaction_daemon terminating
** Last message in was {'EXIT',<0.467.0>,
{undef,
[{couch_log,warn_on,
[couch_compaction_daemon],
[]},
{couch_compaction_daemon,can_db_compact,2,
[{file,"couch_compaction_daemon.erl"},
{line,305}]},
{couch_compaction_daemon,maybe_compact_db,2,
[{file,"couch_compaction_daemon.erl"},
{line,136}]},
{couch_compaction_daemon,
'-compact_loop/1-fun-0-',2,
[{file,"couch_compaction_daemon.erl"},
{line,113}]},
{couch_server,'-all_databases/2-fun-0-',4,
[{file,"couch_server.erl"},{line,207}]},
{filelib,do_fold_files2,8,
[{file,"filelib.erl"},{line,218}]},
{couch_server,all_databases,2,
[{file,"couch_server.erl"},{line,200}]},
{couch_compaction_daemon,compact_loop,1,
[{file,"couch_compaction_daemon.erl"},
{line,101}]}]}}
** When Server state == {state,<0.467.0>}
** Reason for termination ==
** {compaction_loop_died,
{undef,
[{couch_log,warn_on,[couch_compaction_daemon],[]},
{couch_compaction_daemon,can_db_compact,2,
[{file,"couch_compaction_daemon.erl"},{line,305}]},
{couch_compaction_daemon,maybe_compact_db,2,
[{file,"couch_compaction_daemon.erl"},{line,136}]},
{couch_compaction_daemon,'-compact_loop/1-fun-0-',2,
[{file,"couch_compaction_daemon.erl"},{line,113}]},
{couch_server,'-all_databases/2-fun-0-',4,
[{file,"couch_server.erl"},{line,207}]},
{filelib,do_fold_files2,8,[{file,"filelib.erl"},{line,218}]},
{couch_server,all_databases,2,
[{file,"couch_server.erl"},{line,200}]},
{couch_compaction_daemon,compact_loop,1,
[{file,"couch_compaction_daemon.erl"},{line,101}]}]}}
[Mon, 13 May 2013 22:30:10 GMT] [error] [<0.466.0>] {error_report,<0.30.0>,
{<0.466.0>,crash_report,
[[{initial_call,
{couch_compaction_daemon,init,['Argument__1']}},
{pid,<0.466.0>},
{registered_name,couch_compaction_daemon},
{error_info,
{exit,
{compaction_loop_died,
{undef,
[{couch_log,warn_on,[couch_compaction_daemon],[]},
{couch_compaction_daemon,can_db_compact,2,
[{file,"couch_compaction_daemon.erl"},
{line,305}]},
{couch_compaction_daemon,maybe_compact_db,2,
[{file,"couch_compaction_daemon.erl"},
{line,136}]},
{couch_compaction_daemon,
'-compact_loop/1-fun-0-',2,
[{file,"couch_compaction_daemon.erl"},
{line,113}]},
{couch_server,'-all_databases/2-fun-0-',4,
[{file,"couch_server.erl"},{line,207}]},
{filelib,do_fold_files2,8,
[{file,"filelib.erl"},{line,218}]},
{couch_server,all_databases,2,
[{file,"couch_server.erl"},{line,200}]},
{couch_compaction_daemon,compact_loop,1,
[{file,"couch_compaction_daemon.erl"},
{line,101}]}]}},
[{gen_server,terminate,6,
[{file,"gen_server.erl"},{line,747}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,227}]}]}},
{ancestors,
[couch_secondary_services,couch_server_sup,<0.31.0>]},
{messages,[]},
{links,[<0.92.0>]},
{dictionary,[]},
{trap_exit,true},
{status,running},
{heap_size,987},
{stack_size,24},
{reductions,2845}],
{noformat}
It looks like this is being caused by the ?LOG_WARN macro referencing
couch_log:warn_on/1 (which does not exist and appears to be an artifact of
per-module log levels, a feature is not a part of 1.3.0) instead of
couch_log:warn_on/0.
--
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