[En-Nut-Discussion] Race condition in TCP statemachine

Ole Reinhardt ole.reinhardt at embedded-it.de
Fri Jan 10 18:32:31 CET 2014


Hi all,

Am 10.01.2014 18:26, schrieb Ole Reinhardt:
> while implementing a TCP connect timeout, I found a severe problem
> (racecondition) in the TCP statemachine.

I missed one thing:

There are still three places, where this kind of race condition still
exists:

- net/netdebug.c
  NutDumpSocketList() iterates over the socket list, while there are
  scheduling points.

- hwtest/avr/basemon/webdemo.c:
  ShowSockets() iterates over the socket list, while there are
  scheduling points.

- app/httpd/httpserv.c:
  ShowSockets() iterates over the socket list, while there are
  scheduling points.

I do not have a good idea how to solve these issues here. Only possible
solution: First copy the list, then print it out...

Best regards,

Ole Reinhardt

-- 
kernel concepts GmbH            Tel: +49-271-771091-14
Sieghuetter Hauptweg 48         Mob: +49-177-7420433
D-57072 Siegen
http://www.embedded-it.de
http://www.kernelconcepts.de


More information about the En-Nut-Discussion mailing list