<div dir="ltr">hi again, <div><br></div><div style>just saw this thread right after posting mine : <a href="http://lists.puredata.info/pipermail/pd-list/2013-07/103236.html">http://lists.puredata.info/pipermail/pd-list/2013-07/103236.html</a></div>

<div style><br></div><div style>sorry for bothering</div><div class="gmail_extra"><br></div><div class="gmail_extra" style>here is attached three small patches that make PD crash</div><div class="gmail_extra" style>raw_client and raw_server work well together </div>

<div class="gmail_extra" style>but when I try to connect more client (eg. 10 with 10_raw_client)</div><div class="gmail_extra" style>crash happens...</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>

I realize that with iemnet&#39;s version of tcpclient/tcpserver,</div><div class="gmail_extra" style>if two client connect at the same time to server, only on receive data not the other, </div><div class="gmail_extra" style>

so I put a timeout to disconnect the client if no answer was received in a certain time and then reconnect </div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>i first make this with iemnet&#39;s tcpserver</div>

<div class="gmail_extra" style>and I got a SIGPIPE on the server side (see my previous post)</div><div class="gmail_extra" style>while I got SIGSEGV on the client side, here is the gdb backtrace : </div><div class="gmail_extra" style>

<div class="gmail_extra"><br></div><div class="gmail_extra">[New Thread 0x7fff7bfff700 (LWP 4478)]</div><div class="gmail_extra"><br></div><div class="gmail_extra">Program received signal SIGSEGV, Segmentation fault.</div>

<div class="gmail_extra">[Switching to Thread 0x7fffc8ff9700 (LWP 4477)]</div><div class="gmail_extra">0x0000000000472963 in clock_set ()</div><div class="gmail_extra">(gdb) watchdog: signaling pd...</div><div><br></div>
</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>I think in the server side a </div><div class="gmail_extra" style><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">signal(SIGPIPE, SIG_IGN);</span><br>

</div><div class="gmail_extra" style><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">could help but I don&#39;t know where to put it (in tcpserver.c ? in iemlnet_sender.c or somewhere else ?)</span></div>

<div class="gmail_extra" style><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)"><br></span></div>

<div class="gmail_extra" style><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">also I tested it with the mrpeach&#39;s version, it doesn&#39;t crash but the GUI hangs</span></div>

<div class="gmail_extra" style><span style="color:rgb(68,68,68);font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:13px;line-height:17px;background-color:rgb(250,250,250)">gdb doesn&#39;t tell anything, it continue to show thread creation and exiting</span></div>

<div class="gmail_extra" style><br></div><div class="gmail_extra" style><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:16.988636016845703px">also I&#39;m using iemnet&#39;s first because it has a [port( method to change the binding port on the fly</span></font></div>

<div class="gmail_extra" style><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:16.988636016845703px">and I made a rebinding routing to choose an available port in a certain range both in server and in client side</span></font></div>

<div class="gmail_extra" style><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:16.988636016845703px">to prenvent connection error if port is still used after a crash for example</span></font></div>

<div class="gmail_extra" style><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:16.988636016845703px"><br></span></font></div><div class="gmail_extra" style><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:16.988636016845703px">I don&#39;t know how to go further with this,</span></font></div>

<div class="gmail_extra" style><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:16.988636016845703px">But I really need a reliable server for some project and for now I just have an headache :-)</span></font></div>

<div class="gmail_extra" style><font color="#444444" face="Arial, Liberation Sans, DejaVu Sans, sans-serif"><span style="line-height:16.988636016845703px">please tell me how i can help fixing this (and please note that I don&#39;t know anything on tcp communication...)</span></font></div>

<div class="gmail_extra" style><br></div><div class="gmail_extra" style>cheers</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style>antoine</div><div class="gmail_extra" style><br></div><div class="gmail_extra">

<br clear="all"><div>--<br>do it yourself                       <br><a href="http://antoine.villeret.free.fr" target="_blank">http://antoine.villeret.free.fr</a><br></div>
<br><br><div class="gmail_quote">2013/7/2 Antoine Villeret <span dir="ltr">&lt;<a href="mailto:antoine.villeret@gmail.com" target="_blank">antoine.villeret@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr">hi all, <div><br></div><div>I got some crashes with iemnet&#39;s tcpserver</div><div><br></div><div>gdb tells : </div><div><div>[New Thread 0x7fffb9ffb700 (LWP 7828)]</div><div><br></div><div>Program received signal SIGPIPE, Broken pipe.</div>



<div>[Switching to Thread 0x7fffea57a700 (LWP 7713)]</div><div>0x00007ffff73b52cc in __libc_send (fd=&lt;optimized out&gt;, buf=&lt;optimized out&gt;, </div><div>    n=&lt;optimized out&gt;, flags=&lt;optimized out&gt;)</div>



<div><br></div><div>and it happends when several (10) clients are connected at the same time and send some data</div><div><br></div><div>I guess tcpserver is trying to write to a broken pipe and receive a SIGPIPE signal which is not handle and then exit - so crashes pd</div>



<div><br></div><div>am I right ?</div><div>if so, is it possible to set the SIG_PIPE handler to SIG_IGN to avoid crash ?</div><div>I saw that here [1].</div><div><br></div><div>should I file a bug report ? </div>
<div>if so where ?</div><div><br></div><div>best regards</div><div><br></div><div>antoine</div><div><br></div><div>[1] : <a href="http://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly" target="_blank">http://stackoverflow.com/questions/108183/how-to-prevent-sigpipes-or-handle-them-properly</a></div>



<div><br></div><div>--<br>do it yourself                       <br><a href="http://antoine.villeret.free.fr" target="_blank">http://antoine.villeret.free.fr</a><br></div>
</div></div>
</blockquote></div><br></div></div>