[rabbitmq-discuss] rabbitmq error report of plugins is too short and incomplete

Guido Extra guido.extras at gmail.com
Tue May 28 12:47:50 BST 2013


Hi Matthias

I am not use the error_logger:error_report/2 function, which would produce a log with such a header "=ERROR REPORT===="

I checked the RabbitMq source code and found it used under the supervisor2.erl module below. Nothing looks like to be truncating it, so I believe it must be the report_error itself that truncates Terms that are too large. Once this happens again I will add markers to supervisor2 so I can identify if the exception passed through it and how was the term's integrity at that point .

Thanks
Guido

%%% ------------------------------------------------------
%%% Error and progress reporting.
%%% ------------------------------------------------------

report_error(Error, Reason, Child, SupName) ->
    ErrorMsg = [{supervisor, SupName},
		{errorContext, Error},
		{reason, Reason},
		{offender, extract_child(Child)}],
    error_logger:error_report(supervisor_report, ErrorMsg).

shutdown_error_reporter(SupName) ->
    fun(Reason, Child) ->
        report_error(shutdown_error, Reason, Child, SupName)
    end.

extract_child(Child) ->
    [{pid, Child#child.pid},
     {name, Child#child.name},
     {mfa, Child#child.mfa},
     {restart_type, Child#child.restart_type},
     {shutdown, Child#child.shutdown},
     {child_type, Child#child.child_type}].
 



On May 28, 2013, at 5:02 AM, Matthias Radestock <matthias at rabbitmq.com> wrote:

> Guido,
> 
> On 24/05/13 14:35, Guido Extra wrote:
>> I have created several plugin applications that run under RabbitMQ
>> and when they produce an issue, sometimes the ERROR REPORT is logged
>> in a very short/incomplete manner that does not allow me to identify
>> where ( which module and line of code ) the error occurred.
>> 
>> Here is an example:
>> 
>> =ERROR REPORT==== 24-May-2013::08:23:35 === Error in process
>> <0.489.0> on node 'rabbit at guidomacbookpro2' with exit value:
>> {function_clause,[{orddict,fetch,["rxLBslwAswwgRz6RMtmDYenC8",[{"rxlbslwaswwgrz6rmtmdyenc8",[[{"BRANCH_ID","B8UpVlS40csA6v246IsYeTGYB"},{"DTTM_VERSION",2.013032e+16},{"HEADER_ID","B8UpVlS40csA6v246IsYeTGYB"},{"MODEL_ID","rxLBslwAsw...
>> 
>> Notice above the last "..." characters, that's where it all ends.
>> The interesting stuff is certainly at the end of that
>> 
>> Strangely, other times, the report shows complete. I can't also
>> understand what is the difference.
>> 
>> Question:
>> 
>> How to get a full / complete report ?
> 
> The above message is clearly generated by your own code - nothing in rabbit or otp produces an error message of the form "Error in process <pid> on node '<node>' with exit value: <reason>". So the truncation must happen in your own code, somehow.
> 
> Matthias.



More information about the rabbitmq-discuss mailing list