Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3
-
None
Description
While evaluating CouchDB 1.3.0's automatic compaction daemon, I encountered an error when the daemon tried to warn about insufficient free space:
[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}],
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.