<div dir="ltr">Yes, I have tried valgrind; with valgrind the problem does not come.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 16, 2016 at 6:49 PM, Sverker Eriksson <span dir="ltr"><<a href="mailto:sverker.eriksson@ericsson.com" target="_blank">sverker.eriksson@ericsson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you tried to run your c-node under valgrind.<br>
<br>
<a href="http://valgrind.org/" rel="noreferrer" target="_blank">http://valgrind.org/</a>.<br>
<br>
<br>
/Sverker<div><div class="h5"><br>
<br>
<br>
On 11/15/2016 08:32 PM, Silver Surfer wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
I have an application running on otp-19.0, where there is a single erlang<br>
node and two c-nodes; several processes from erlang node continuously send<br>
messages to the c-node servers. The c-node accepts a single connection and<br>
process all the received messages (ERL_MSG-> ERL_REG_SEND, ERL_SEND) in<br>
separate threads except ERL_TICK, ERL_ERROR etc.<br>
<br>
So in the c-node main() a connection is accepted and all the messages are<br>
received (erl_receive_msg), if the message is ERL_TICK, ERL_ERROR etc. they<br>
are dealt appropriately by freeing the memory, else if the message is<br>
ERL_MSG then a thread is created and the message is passed to the thread<br>
where it is processed and a reply is send using erl_send; this approach of<br>
handling message through thread is taken as some of the operation performed<br>
by the c-node takes considerable amount of time which is more than the tick<br>
time (is there a better way to do this?).<br>
<br>
Now out of the two c-nodes one is crashing randomly (10 times in 24Hrs,<br>
more or less); both the c-nodes follows same architecture, only the<br>
operations they perform are different. In most of the times the c-node just<br>
goes down without giving any error reason and in 2 or 3 cases it crashes<br>
because of double free or memory corruption printer by malloc, the trace<br>
back points to erl_receive_msg.<br>
<br>
Another point observed is that, in the thread after erl_free_compound, when<br>
we look at the allocated blocks using erl_eterm_statistics(allocated<wbr>,<br>
freed), it is 0 most of the times but sometimes it is non zero value, i.e.<br>
9, 18, etc.<br>
<br>
Any help is appreciated.<br>
<br>
Greg<br>
<br>
<br>
</blockquote>
<br></div></div>
______________________________<wbr>_________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/list<wbr>info/erlang-questions</a><br>
</blockquote></div><br></div>