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: NavEcos <ecos at navosha dot com>
- To: Brij Bihari Pandey <fuzzhead012 at yahoo dot com>,Gary Thomas <gthomas at ecoscentric dot com>,Grant Edwards <grante at visi dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 29 Oct 2002 00:16:30 -0800
- Subject: Re: [ECOS] simultaneous socket write/close causes panic?
- Organization: Navosha
- References: <20021029073637.60313.qmail@web21006.mail.yahoo.com>
- Reply-to: ecos at navosha dot com
Correct me if I'm wrong (because I might be), but isn't this
inherently a race condition in the first place? These seems like an
application programmer error to me, not an error of eCos.
Maybe I don't understand the question properly though...
-Rich
On Monday 28 October 2002 11:36 pm, Brij Bihari Pandey wrote:
> Hi Nick,
>
> Looks like we have one more person involved with eCos
> on multiprocessors. else how could one have
> *simultaneous* closing and writing to a socket?
>
> > > > > A customer has reported to me that
> >
> > simultaneously writing and
> >
> > > > > closing a socket causes the system to crash
> >
> > with the message
> >
> > > > > "PANIC: sbflush". I believe that this error
> >
> > was caused by
> >
> > > > > having one thread close a socket while another
> >
> > thread is
> >
> > > > > writing data to the socket.
> > > >
> > > > b) If it could be reproduced with the new stack,
> >
> > it might be
> >
> > > > worth looking at. Otherwise, goto "a"
>
> Gary, it looks like one of the not-so-often case of
> synchronisation (unwanted though) b/w two actually
> parallely executing threads, that is not guaranteed to
> be reproduced easily. If it was so many such reports
> would have come on list in past.
> I think, we can look into code of socket close and
> write calls (suspects as per the text of original
> mail) and evaluate if any concerned data structure is
> likely to be messed up because of
> by-some-rare-coincidence the two calls for same socket
> happens to be taking place simultaneously. You have
> the final say in whether it the effort is worth it or
> not, as you are the expert.
>
> brij
>
>
> __________________________________________________
> Do you Yahoo!?
> HotJobs - Search new jobs daily now
> http://hotjobs.yahoo.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