Bugs item #2974702, was opened at 2010-03-22 18:28 Message generated for change (Comment added) made by zmoelnig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2974702...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: externals Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: IOhannes m zmlnig (zmoelnig) Assigned to: Martin Peach (mrpeach) Summary: tcpserver: couldn't create sender thread
Initial Comment: i'm currently testing [tcpserver] under more or less heavy loads, and find it slightly unreliable.
broadcasting a lot of messages will eventually stop sending. tcpserver will output an error like "tcpserver: couldn't create sender thread (11)" and that's it.
test scenario: 5048 bytes messages (osc stream), banged every 10ms after 435 successfull broadcasts, things stop; pstree shows 325 open pd threads quiting Pd will not free the port (but that might be due to the hung tcpclient )
trying the same thing again, will roughly yield the same results (448 successfull broadcasts; 382 hung threads; tcpclient hung again)
PS: this all happens on a debian squeeze/sid machine (2.6.32-3-686) with a dual core processor and 2GB of ram)
PPS: this might be a duplicate of #2905508
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig)
Date: 2010-03-24 10:42
Message: hmm, don't know what you mean with the problem shutting down tcpserver...
in this case, tcpserver spawns threads and doesn't close them anymore.
i think the problem is the consumer: if the consumer is too slow (e.g. [tcpclient] on localhost) then the problem will appear (more reliable) if the consumer is fast (eg. netcat on localhost), then the tcpserver seems to work fine.
however, tcpserver should never stop working, regardless of the speed of the consumer (i'm involved in a project with really low bandwidth; a hanging Pd is no option there)
why can't i attach a patch at the same time as writing a comment?
----------------------------------------------------------------------
Comment By: Martin Peach (mrpeach) Date: 2010-03-23 17:38
Message: I think I fixed the problem with shutting down tcpserver, tcpserver_free() was not checking for null pointers, so some clients were not disconnected as Pd segfaulted before they could be serviced. I don't see anything in [tcpserver] that would result in hundreds of hung threads. Can you post a patch that does that?
----------------------------------------------------------------------
Comment By: IOhannes m zmlnig (zmoelnig) Date: 2010-03-22 18:33
Message: btw, networking is done to localhost
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478070&aid=2974702...