Hi,<br><br>In the crashdump viewer, you can click on the process that spawned this process (the "Spawned by" field) several times to go up the process hierarchy of your application to see where in the process tree it was spawned. <br>
Also, you can see it was executing a call to xmerl, and is linked to a Erlang port, which should help you narrow down which process it was in your application.<br><br>Cheers,<br>Gustav Simonsson<br><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Dec 13, 2012 at 10:21 AM, cao xu <span dir="ltr"><<a href="mailto:cao.xu@rytong.com" target="_blank">cao.xu@rytong.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi,<div><br></div><div><span style="white-space:pre-wrap"> </span>I got an erlang crash dump file on a 2G memory linux with following info:</div><div><br></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Times;word-spacing:0px">eheap_alloc: Cannot allocate 78362800 bytes of memory (of type "heap").</span></div>
<div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Times;word-spacing:0px"><br>
</span></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Times;word-spacing:0px"><div>
=memory</div><div>total: 1510245164</div><div>processes: 1360838774</div><div>processes_used: 1360720438</div></span></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Times;word-spacing:0px"><br>
</span></div><div><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Times;word-spacing:0px"><span style="white-space:pre-wrap"> </span></span>The total memory consumed by the VM was about 1.5G and most of them were used by process. According to the process info in the dump file, the biggest Stack+Heap was <span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-right;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Times;word-spacing:0px">15672560 </span>and the owner's state was garbing. I am not sure whether the process was the killer of the whole VM. </div>
<div><br></div><div><table style="font-family:Times;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px" border="4" cols="4" width="100%"><tbody><tr><td nowrap><b>Name</b></td><td colspan="1"> </td>
<td nowrap><b>Spawned as</b></td><td colspan="1">proc_lib:init_p/5</td></tr><tr><td nowrap><b>State</b></td><td colspan="1">Garbing (limited info)</td><td nowrap><b>Last scheduled in for</b></td><td colspan="1">xmerl_scan:'-initial_state0/2-fun-1-'/2</td>
</tr><tr><td nowrap><b>Started</b></td><td colspan="1">Tue Nov 6 17:00:39 2012</td><td nowrap><b>Spawned by</b></td><td colspan="1"><a href="http://localhost:8888/cdv_erl/crashdump_viewer/proc_details?pid=%3C0.48.0%3E" target="_blank"><0.48.0></a></td>
</tr><tr><td nowrap><b>Reductions</b></td><td colspan="3">20600887</td></tr><tr><td nowrap><b>Stack+heap</b></td><td>15672560</td><td nowrap><b>OldHeap</b></td><td>8024355</td></tr><tr><td nowrap><b>Heap unused</b></td><td>
202</td><td nowrap><b>OldHeap unused</b></td><td>8024355</td></tr><tr><td nowrap><b>Number of heap fragments</b></td><td>1</td><td nowrap><b>Heap fragment data</b></td><td>119</td></tr><tr><td nowrap><b>Program counter</b></td>
<td colspan="3">0x02ea24dc (xmerl_scan:'-initial_state0/2-fun-1-'/2 + 4)</td></tr><tr><td nowrap><b>Continuation pointer</b></td><td colspan="3">0x02e8a254 (xmerl_scan:scan_char_data/5 + 2408)</td></tr><tr><td nowrap>
<b>Arity</b></td><td colspan="3"> </td></tr><tr><td nowrap><b>Link list</b></td><td colspan="3">[<a href="http://localhost:8888/cdv_erl/crashdump_viewer/port?port=Port%3C0.16239279%3E" target="_blank">#Port<0.16239279></a>, <a href="http://localhost:8888/cdv_erl/crashdump_viewer/proc_details?pid=%3C0.48.0%3E" target="_blank"><0.48.0></a>]</td>
</tr><tr><td nowrap><b>Msg queue length</b></td><td colspan="3">0</td></tr></tbody></table><div><br></div></div><div><br></div><div>Is there a way to find out which process or function call was the reason of the allocating action, and how can I get more info from the dump file to help locating the error?</div>
<div><br></div><div>Thanks.</div></div><br>_______________________________________________<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>
<br></blockquote></div><br></div>