lwip and multiple threads

wacko_eddie wrote on Tuesday, July 18, 2006:


I’m using the lwip demo on rowley with the at91sam7x and experience that when using multiple threads the webserver dies. Does anyone have the same experince and is this solveable?

nobody wrote on Tuesday, July 18, 2006:

What do you mean by uses multiple threads?  The demo uses multiple tasks which could be considered multiple threads depending on your definition, and that works fine.

If you are just wanting to use more tasks then you may just need to increase the heap size.

wacko_eddie wrote on Tuesday, July 18, 2006:

Yes that’s true. But that is nog what I mean.

I mean requesting the website with multiple threads.

rtel wrote on Tuesday, July 18, 2006:

So you open more than one browser at a time and use each browser to connect to the server?

When I first wrote the demo I tested it using two different PC’s.  Each had one Internet Explorer and one FireFox broswer making HTTP requests, plus one (or maybe two?) command prompts pinging large packets - all simultaneously.  I left it to run in this configuration for 30 hours or so.


wacko_eddie wrote on Wednesday, July 19, 2006:

Well if we use opera that gets a page with multiple threads it will crash after a few minutes
when using auto refresh.

We use a program that makes requests in multiple threds which can be set at the command prompt. with threads >2 it wil crash in 5 to 6 minutes.

We use the j-tag debugger to see where the crash occures and that is in tcpip.c:

In the case switch (msg->type) it goes to

witch ends op in ip.c in the switch switch (IPH_PROTO(iphdr)) and finaly in the case
default. where we get:
LWIP_DEBUGF(IP_DEBUG | 2, ("Unsupported transport protocol %"U16_F"\n", IPH_PROTO(iphdr)));

So somewhere along the transmits get corrupted or so. Anyone seen the same problems?

nobody wrote on Wednesday, July 19, 2006:

Which version of lwIP are you using?  It looks like 1.1.1 is the latest as far as I can see from http://savannah.nongnu.org/projects/lwip.

nobody wrote on Wednesday, July 19, 2006:

It might be worth asking the question on the lwIP users mailing list.  You should get an expert answer there.

wacko_eddie wrote on Thursday, July 20, 2006:

Yes we’ve been posting there to, but maybe sombody here ran into simular problems as we noticed that there are more people developing on the same board and with the same source.

We updated to 1.1.1 this was the first comment made by the lwip maillinglist.
Maybe there are some modifications we didn’t make
don’t know if there need to be