[erlang-questions] Truncated error reports

Ransom Richardson ransomr@REDACTED
Sat Oct 25 00:41:36 CEST 2014


I've been trying to get useful information (the full stack) from Cowboy error reports. But all of our reports are truncated. I found this http://stackoverflow.com/questions/17596686/truncated-error-report-in-erlang?, but the solution didn't work for me.


I looked at the emulator source code and found the undocumented +# switch which controls precision. Using this switch, I verified that the errors are being truncated by the emulator itself (see below).


Is this truncation intentional or a bug? Is there a better way around it than the +# switch?


At a higher level, is there a better way to get error/crash information from a process than going through error_logger? We're using lager and erlbrake and both add error_logger handlers that parse the text error reports. I would much rather deal with the reason term directly. Is there a way to be notified of process termination other than error_logger?

?



talko@REDACTED:~/talko_service/erl/session$ erl
Erlang/OTP 17 [erts-6.1.2] [source] [64-bit] [smp:6:6] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.1.2  (abort with ^G)
1> spawn(fun() -> erlang:error([$x || _ <- lists:seq(0,5000)]) end).
<0.35.0>

=ERROR REPORT==== 24-Oct-2014::22:23:21 ===
Error in process <0.35.0> with exit value: {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...


talko@REDACTED:~/talko_service/erl/session$ erl +#10
Erlang/OTP 17 [erts-6.1.2] [source] [64-bit] [smp:6:6] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.1.2  (abort with ^G)
1> spawn(fun() -> erlang:error([$x || _ <- lists:seq(0,5000)]) end).
<0.35.0>
2>
=ERROR REPORT==== 24-Oct-2014::22:23:34 ===
Error in process <0.35.0> with exit value: {"xxxxxxxx...


talko@REDACTED:~/talko_service/erl/session$ erl +#400
Erlang/OTP 17 [erts-6.1.2] [source] [64-bit] [smp:6:6] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.1.2  (abort with ^G)
1> spawn(fun() -> erlang:error([$x || _ <- lists:seq(0,5000)]) end).
<0.35.0>
2>
=ERROR REPORT==== 24-Oct-2014::22:23:49 ===
Error in process <0.35.0> with exit value: {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...



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


More information about the erlang-questions mailing list