<div dir="ltr">Hi David,<div><br></div><div>I think this is quite common pattern - some process wants to log some huge details (but not fatally "large"), but error logger crashed, as it wants to convert all data to strings (which can consume much more memory).</div>
<div>It happened to us several times.</div><div><br></div><div>proc_heap section contains dump of process heap. I am not exactly sure about structure, but I think it is <memory address>:<type><type data>.</div>
<div>Part of your dump:</div><div><br></div><div><div>7F1DCBACA878:lI39|H7F1DCBACA868</div><div>7F1DCBACA868:lI103|H7F1DCBACA858</div><div>7F1DCBACA858:lI115|H7F1DCBACA848</div><div>7F1DCBACA848:lI100|H7F1DCBACA838</div><div>
7F1DCBACA838:lI95|H7F1DCBACA828</div><div>7F1DCBACA828:lI119|H7F1DCBACA818</div><div>7F1DCBACA818:lI101|H7F1DCBACA808</div><div>7F1DCBACA808:lI98|H7F1DCBACA7F8</div><div>7F1DCBACA7F8:lI64|H7F1DCBACA7E8</div><div>7F1DCBACA7E8:lI108|H7F1DCBACA7D8</div>
<div>7F1DCBACA7D8:lI111|H7F1DCBACA7C8</div><div>7F1DCBACA7C8:lI99|H7F1DCBACA7B8</div><div>7F1DCBACA7B8:lI97|H7F1DCBACA7A8</div></div><div><br></div><div>Is part of some list. Type "l" is cons cell (basic construction item of lists), which contains tuple <value>:<next item>. Value is of type "I" (small integer - representing decimal character code), and next item is of type "H" - pointer to next data.</div>
<div>Most simple way is to expect, that data forms list in order of memory cells (which is quite often). You can e.g. use this simple Perl code to get some idea about data (what error logger want to display):</div><div><br>
</div><div><div>$ perl -n -e 'print chr($1) if($_ =~ /:lI([0-9]*)\|/)' < part_of_crash_dump</div><div>'gsd_web@loca</div></div><div><br></div><div>Where file "part_of_crash_dump" contains data from proc_heap section.</div>
<div>I am sure there are more sophisticated tools to analyze crash dumps, but this can be used for the first sight.</div><div><br></div><div>Regards,</div><div>Jan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jul 3, 2014 at 4:08 PM, David Welton <span dir="ltr"><<a href="mailto:davidnwelton@gmail.com" target="_blank">davidnwelton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">>> The kind people in #erlang have given me some suggestions, but I'm<br>
>> going to write here to appeal to a wider audience.  I've got a huge<br>
>> erl_crash.dump, that's larger than 2 gigs<br>
><br>
> Assuming for a second that this doesn't contain actual dumps of data it<br>
> feels like it might contain a long list of _somethings_ . Can you say (by<br>
> looking at a few random points) what something is ?<br>
<br>
</div>I'm not sure I follow...  I don't know what the proc_heap section<br>
contains - I don't know what all the lines in it mean.<br>
<div class=""><br>
Robert writes:<br>
> one thing to be aware of when using sasl and error_logger is that process crashes get logged by sasl with the complete state of the process that just died, and error_logger tries to pretty print that state; this can take huge amounts of memory if the crashed process state is large.<br>

<br>
> I would recommend monitoring processes with high memory usage and figuring out the usage patterns. In general it is a good idea to try and limit the amount of state a process holds. But this is obviously application dependent.<br>

<br>
</div>I don't think any of the processes grew in size so much that it was<br>
anywhere near the kind of size needed to trigger an out of memory<br>
error were its stated dumped and printed.  We'll keep an eye on them<br>
just in case one of them is stealthily growing, but for the moment we<br>
have not been able to reproduce the error.<br>
<br>
Thanks<br>
<div class="im HOEnZb">--<br>
David N. Welton<br>
<br>
<a href="http://www.welton.it/davidw/" target="_blank">http://www.welton.it/davidw/</a><br>
<br>
<a href="http://www.dedasys.com/" target="_blank">http://www.dedasys.com/</a><br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>