Hi, regarding my Problem with the assertion on select: I'm using the IP stack in several tasks (Webserver, SIP, mDNS, TFTP, MODBUS). But every task uses its own sockets. Still there seems to be a problem with multithreading. The problem occurs (sporadically) in one task, when another socket is closed in another task.
It seems that the error NEVER occurs, when SO_REUSE is disabled. (mDNS for example uses SO_REUSEADDR, so I enabled it recently) Could it be that the socket is reused before it is really closed and the select_waiting is set to zero (by doing the new connection) but there is one more select (by the just closed connection)? I'm still hoping for answers. Best regards, Sandra -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von [email protected] Gesendet: Mittwoch, 22. Juli 2015 18:00 An: [email protected] Betreff: lwip-users Digest, Vol 143, Issue 16 Send lwip-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.nongnu.org/mailman/listinfo/lwip-users or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of lwip-users digest..." Today's Topics: 1. Assertion on select (Sandra Gilge) 2. Re: lwip-users Digest, Vol 143, Issue 10 (Xun Chen) ---------------------------------------------------------------------- Message: 1 Date: Wed, 22 Jul 2015 14:11:04 +0200 From: "Sandra Gilge" <[email protected]> To: <[email protected]> Subject: [lwip-users] Assertion on select Message-ID: <000001d0c477$7b8265c0$72873140$@com> Content-Type: text/plain; charset="us-ascii" Hallo I'm using LWIP 1.4.1 and the Blackfin VDK port from analog devices (which is originally for 1.4.0). I moved on to 1.4.1 on my own. Now I'm having problems with following assertion when calling select. LWIP_ASSERT("sock->select_waiting >= 0", sock->select_waiting >= 0); I have several threads that use the socket interface. For me it looks like a thread safety problem, but SYS_ARCH_PROTECT is implemented. Has anybody a hint what could go wrong? Best Regards, Sandra -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.nongnu.org/archive/html/lwip-users/attachments/20150722/a35eba fa/attachment.html> ------------------------------ Message: 2 Date: Wed, 22 Jul 2015 09:41:56 -0400 From: Xun Chen <[email protected]> To: [email protected] Subject: Re: [lwip-users] lwip-users Digest, Vol 143, Issue 10 Message-ID: <[email protected]> Content-Type: text/plain; charset=windows-1252; format=flowed Hi Sergio, I took your suggestion of only sending out more data in tcp_sent callbak and rewrite the codes And I run into another problem: The data stream is very jerky (I am streaming 200kb/s) So I used a scope to see how often the tcp_sent callback is invoked, it turns out: I will get about 10-20 callbacks within a short burst of 5 to 10ms, then there is NO callback for 200ms, then repeat I tried to tune lwip based on various previous suggestions on the forum and didn't have much luck. With this callback frequency, it is impossible to plot data in real time smoothly (data acquisition application) Any suggestion? Thanks! Chen On 7/11/2015 12:00 PM, [email protected] wrote: > Send lwip-users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.nongnu.org/mailman/listinfo/lwip-users > or, via email, send a message with subject or body 'help' to > [email protected] > > You can reach the person managing the list at > [email protected] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of lwip-users digest..." > > > Today's Topics: > > 1. Re: Retransmit too quick? (Sergio R. Caprile) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 10 Jul 2015 13:31:37 -0300 > From: "Sergio R. Caprile" <[email protected]> > To: [email protected] > Subject: Re: [lwip-users] Retransmit too quick? > Message-ID: <[email protected]> > Content-Type: text/plain; charset=utf-8 > > The RAW API is event driven code. > The ACK is handled as an ACK by lwIP. This means the window is > updated, the sent pbufs are freed, and you can send data again. > You can't send more data until you receive an ACK for your window size. > You can't queue more data until lwIP frees pbus (when you receive an ACK). > There is no point in calling the send function when you don't have > room to queue/send more data, this causes CPU hog. > There is no point in calling the send function at specific intervals > (assuming you need to send a big bunch of data); if the ACK gets > received in between the interval, you'll have dead times where nothing > is sent. > The write time to call the send function is when the sent callback is fired. > You are free to choose and write your app the way you want; but, if it > does not work and you ask for help... > Good luck. > ------------------------------ _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users End of lwip-users Digest, Vol 143, Issue 16 ******************************************* _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
