This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: simultaneous socket write/close causes panic?
- From: Grant Edwards <grante at visi dot com>
- To: Jonathan Larmour <jifl at eCosCentric dot com>
- Cc: nickg at eCosCentric dot com, ecos-discuss at sources dot redhat dot com
- Date: Tue, 5 Nov 2002 09:45:57 -0600
- Subject: Re: [ECOS] simultaneous socket write/close causes panic?
- References: <20021029073637.60313.qmail@web21006.mail.yahoo.com> <200210290016.30158.ecos@navosha.com> <20021029143058.GL16433@biferten.ma.tech.ascom.ch> <20021029121650.A22013@visi.com> <20021029200203.CA4F2616CB@delenn.bartv.net> <20021029163642.A22755@visi.com> <20021029233608.A1B88616CB@delenn.bartv.net> <m3d6psiyx9.fsf@ecoscentric.com> <20021031220636.55CF3616CB@delenn.bartv.net> <3DC75471.6080301@eCosCentric.com>
On Tue, Nov 05, 2002 at 05:17:37AM +0000, Jonathan Larmour wrote:
> Just to summarise: the application is almost certainly broken
> because it shouldn't do stuff like this because the socket fd
> number may be reallocated (modulo micromanagement of the code
> so you could guarantee that it wouldn't be).
Yes. Perhaps the customer is doing that sort of management,
but I'd still claim it's broken code.
> The stack is
> *also* broken as it shouldn't panic.
Yes.
> Nick Garnett wrote:
> > I would contend that the locking regime in the TCP/IP stack is at
> > present not right and needs to be fixed.
>
> Potentially, or more accurately Grant should use the new
> FreeBSD stack :-).
Probably so. It would require adding the fileio package also.
If I had a spare day or two...
Are there noticable performance differences between the two
stacks? We're running out of horsepower in our ARM7 app with
lots of TCP/IP connections running. If the new stack required
fewer memcpy() operations it would be a huge win. My Ethernet
does DMA but not scatter gather, so having the Tx packets
presented to me in chunks is a big performance hit.
> Anyway, Hugo did a lot of work in this area at one point.
> Grant, you said the code was from an eCos and net snapshot from
> Jan 2001. Even so, does it definitely have this change:
>
> 2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
>
> * OVERVIEW: This is part of the change to the network stack to
> [snip]
Yes. My tcpip ChangeLog goes up through:
2000-11-15 Hugo Tyson <hmt@redhat.com>
* src/lib/bootp_support.c (init_net): Do a SIOCSIFADDR a 2nd time
after setting the netmask (SIOCSIFNETMASK) in order for the newly
[...]
--
Grant Edwards
grante@visi.com
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss