[erlang-bugs] Strange Memory Allocation Crash

Björn-Egil Dahlberg egil@REDACTED
Wed Jul 7 14:15:59 CEST 2010


On 2010-07-07 14:11, Björn-Egil Dahlberg wrote:
> The error_logger can't consume the info messages you send at the rate
> that that tight loop produces them.
>
> erl_crash.dump:
> <0.5.0> error_logger Garbing (limited info) 27440736 182452560 7557980

That is 7557980 messages in the msq-queue.
To answer your question, use the crashdump viewer to examine crash dump 
you just got.

Eshell V5.8.1  (abort with ^G)
1> crashdump_viewer:start().
WebTool is available at http://localhost:8888/
Or  http://127.0.0.1:8888/

// Björn-Egil


>
> Regards,
> Björn-Egil
> Erlang/OTP
>
> On 2010-07-07 13:27, tech@REDACTED wrote:
>>
>>
>> While try to do a quick check on which floats need to be rounded before
>> trunking them to get valid results, I was able to crash the Erlang VM.
>> I find
>> it a bit strange as it happened rather quickly into something that I
>> thought
>> shouldn't be that intensive. I have tried this twice, and was
>> wondering if
>> this could be pointing to something else as a problem.
>>
>> Machine Info
>> daniel@REDACTED:~/sdb/work/gf_olympus/troy/trunk/tmp> uname -a
>> Linux greyowl 2.6.31.12-0.2-default #1 SMP 2010-03-16 21:25:39 +0100
>> x86_64
>> x86_64 x86_64 GNU/Linux
>> daniel@REDACTED:~/sdb/work/gf_olympus/troy/trunk/tmp> erl --version
>> Erlang R14A (erts-5.8) [source] [64-bit] [smp:2:2] [rq:2]
>> [async-threads:0]
>> [hipe] [kernel-poll:false]
>>
>>
>> ============== CODE START
>>
>> -module(itest).
>> -export([do/0]).
>>
>> do() ->
>> do(0.0).
>>
>> do(100.0) ->
>> done;
>> do(Value) ->
>> if trunc(Value * 100) =:= trunc(round(Value * 100)) ->
>> do(Value + 0.01);
>> true ->
>> error_logger:info_msg("Value: ~p~n", [Value]),
>> do(Value + 0.01)
>> end.
>>
>> ============== CODE END
>>
>> The final result. (After 280 iterations of the function the following
>> crash)
>>
>> =INFO REPORT==== 7-Jul-2010::11:33:07 ===
>> Value: 2.7999999999999843
>>
>> Crash dump was written to: erl_crash.dump
>> eheap_alloc: Cannot allocate 20672 bytes of memory (of type "heap").
>> Aborted
>>
>>
>> The code is attached
>>
>> I am a bit at a loss as to where to start troubleshooting this :)
>>
>



More information about the erlang-bugs mailing list