This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: TCP/IP preemption fix
- To: Grant Edwards <grante at visi dot com>
- Subject: Re: [ECOS] TCP/IP preemption fix
- From: Gary Thomas <gthomas at redhat dot com>
- Date: Thu, 13 Apr 2000 16:50:46 -0600 (MDT)
- Cc: eCos Discussion <ecos-discuss at sourceware dot cygnus dot com>
On 13-Apr-00 Grant Edwards wrote:
> On Wed, Apr 12, 2000 at 06:13:04PM -0600, Gary Thomas wrote:
>
>> Can you see if these patches fix [at least] the sockbuf corruption
>> problem you were seeing?
>
> After some additional testing, it seems the problem is still
> there. It looks like there are routines that access sb structs
> without calling sblock/sbunlock.
>
> The ones we've found are in code called by the network task:
> tcp_input, tcp_output, etc. There are calls to sbappend and
> similar functions/macros that result in unprotected accesses to
> sb struct fields.
>
> My original e-mail pointing out the unreliability of sblock and
> sbunlock didn't identify the entire problem.
>
>> The basic idea I've incorporated is to use the eCos scheduler
>> lock to emulate the user/kernel behaviour from the BSD world
>> (i.e. kernel code cannot be preempted)
>
> I think that sblock and sbunlock should work now, but I don't
> think they're called in enough places.
>
So this seems to be a start. I'll try and investigate more.
BTW did you see any improvement at all (just to make sure we are
hunting the right fox)?
DO you have a good way to duplicate the failures? Is it something
I can set up here? Any/all information on this will be useful.
Thanks.