Summary: Crash through adding and removing tcb's to the
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: None
Submitted on: Donnerstag 20.04.2006 um 04:22 UTC
Severity: 3 - Normal
Item Group: Crash Error
Assigned to: None
I had a problem when I did a heavy load test on a webserver with a
multitasking os I programmed. The program hangs in the tcp_input function
where it looks in the TIMED_WAIT list for connection that might get data now.
Once there was only one tcp in the list and the ->next pointer was pointing to
the tcp itselfe. An other time there were two connections in the list and the
last points to the first.
If I alter the last ->next to NULL in the list with my debugger it runs
I am not shure how to solve. I surrounded them with sys_arch_protect and
-unprotect but the problem didn't went away. It comes up not as often as
before but it is till there.
[bug #16390] Crash through adding and removing tcb's to the TIME_WAIT list
Follow-up Comment #1, bug #16390 (project lwip):
Ok i did some more investigations...
the problem occured also at the active list.
And it occures if you write or read to/from connection if a further write or
read returns an error and is not handled. In my case it was a webserver
application. I wrote and wrote and wrote without checking for errors because
I thought the lower layers will handle it if there is a problem with writing
to a connection in a "wrong" state. The problem occured if the client is
resetting or closing the connection. The write give me an error and I didn't
handle it and continued writing. After this point the tcb lists get meshed
I do error checking now and I am closing the connection if there is an error
and everything works fine.