[erlang-questions] lager_trunc_io

Steve Strong steve@REDACTED
Fri Jan 18 09:12:36 CET 2013


Hi All,  

Having a strange one with some lager logging, and hopping someone might have seen it before…  In the last couple of days I've spotted a few crashes in my logs that I've not seen before.  In my console log, I get:

<snip>
2013-01-17 14:56:44.712 [error] <0.46.0> gen_server lager_crash_log terminated with reason: bad argument in call to lager_trunc_io:format("FORMAT ERROR: ~p ~p", ["** Generic server ~p terminating \
\n** Last message in was ~p~n** When Server state == ~p~n** R...",...]) line 66 in lager_crash_log:do_log/2 line 189


2013-01-17 14:56:44.820 [error] <0.46.0> CRASH REPORT Process lager_crash_log with 0 neighbours exited with reason: bad argument in call to lager_trunc_io:format("FORMAT ERROR: ~p ~p", ["** Generi\
c server ~p terminating \n** Last message in was ~p~n** When Server state == ~p~n** R...",...]) line 66 in lager_crash_log:do_log/2 line 189 in gen_server:terminate/6 line 747
2013-01-17 14:56:45.079 [error] <0.43.0> Supervisor lager_sup had child lager_crash_log started with lager_crash_log:start_link("log/crash.log", 65536, 65536, [{hour,0}], 5) at <0.46.0> exit with \
reason bad argument in call to lager_trunc_io:format("FORMAT ERROR: ~p ~p", ["** Generic server ~p terminating \n** Last message in was ~p~n** When Server state == ~p~n** R...",...]) line 66 in la\
ger_crash_log:do_log/2 line 189 in context child_terminated

</snip>

with a corresponding crash report in the crash log:

<snip/>
013-01-17 14:56:45 =CRASH REPORT====
  crasher:
    initial call: lager_crash_log:init/1
    pid: <0.2189.47>
    registered_name: lager_crash_log
    exception exit: {{function_clause,[{lager_trunc_io,alist,[{<0.390.0>,left},64003,{print_options,-1,true,false}],[{file,"src/lager_trunc_io.erl"},{line,367}]},{lager_trunc_io,alist,3,[{file,"sr\
c/lager_trunc_io.erl"},{line,382}]},{lager_trunc_io,alist_start,3,[{file,"src/lager_trunc_io.erl"},{line,355}]},{lager_trunc_io,list_body,4,[{file,"src/lager_trunc_io.erl"},{line,299}]},{lager_tru\
nc_io,alist_start,3,[{file,"src/lager_trunc_io.erl"},{line,364}]},{lager_trunc_io,list_bodyc,4,[{file,"src/lager_trunc_io.erl"},{line,311}]},{lager_trunc_io,list_bodyc,4,[{file,"src/lager_trunc_io\
.erl"},{line,312}]},{lager_trunc_io,list_body,4,[{file,"src/lager_trunc_io.erl"},{line,300}]}]},[{gen_server,terminate,6,[{file,"gen_server.erl"},{line,747}]},{proc_lib,init_p_do_apply,3,[{file,"p\
roc_lib.erl"},{line,227}]}]}
    ancestors: [lager_sup,<0.41.0>]
    messages: []
    links: [<0.43.0>,#Port<0.6132>]
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 2584
    stack_size: 24
    reductions: 3739
  neighbours:
2013-01-17 14:56:46 =SUPERVISOR REPORT====
     Supervisor: {local,lager_sup}
     Context:    child_terminated
     Reason:     {function_clause,[{lager_trunc_io,alist,[{<0.390.0>,left},64003,{print_options,-1,true,false}],[{file,"src/lager_trunc_io.erl"},{line,367}]},{lager_trunc_io,alist,3,[{file,"src/la\
ger_trunc_io.erl"},{line,382}]},{lager_trunc_io,alist_start,3,[{file,"src/lager_trunc_io.erl"},{line,355}]},{lager_trunc_io,list_body,4,[{file,"src/lager_trunc_io.erl"},{line,299}]},{lager_trunc_i\
o,alist_start,3,[{file,"src/lager_trunc_io.erl"},{line,364}]},{lager_trunc_io,list_bodyc,4,[{file,"src/lager_trunc_io.erl"},{line,311}]},{lager_trunc_io,list_bodyc,4,[{file,"src/lager_trunc_io.erl\
"},{line,312}]},{lager_trunc_io,list_body,4,[{file,"src/lager_trunc_io.erl"},{line,300}]}]}
     Offender:   [{pid,<0.2189.47>},{name,lager_crash_log},{mfargs,{lager_crash_log,start_link,["log/crash.log",65536,65536,[{hour,0}],5]}},{restart_type,permanent},{shutdown,5000},{child_type,wor\
ker}]

</snip>

The lager activity is, I think, due to one of my gen_servers crashing, but I've never seen lager exhibit this behaviour before.  This is lager v1.2.1.  Anyone seen this behaviour before?  Any pointers as to how to track down the root cause?

Cheers,

Steve


--  
Steve Strong
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130118/6103ebb7/attachment.htm>


More information about the erlang-questions mailing list