[ECOS] Re: What causes interrupted network system calls?

Grant Edwards grant.b.edwards@gmail.com
Thu Oct 29 18:34:00 GMT 2009

On 2009-10-28, Nick Garnett <nickg@ecoscentric.com> wrote:

>> We're not using POSIX support.
> In which case there is something else going on. The only place that
> the FreeBSD stack generates an EINTR result is in cyg_tsleep() when
> the call to cyg_semaphore_timed_wait() returns false, and it is not a
> timeout. Something must either be zapping that semaphore in some way,
> or the thread is being released by something else. The OpenBSD stack
> has similar code, so it is not immediately clear why one stack is
> doing this and the other not.
> Are you sure that the EINTR result is coming from the stack itself and
> is not simply a leftover in errno from a previous call? Try zeroing
> errno before the call.
> Also, in the original message you mentioned -EINTR.

I was wrong.  send() is returning -1, and then errno contains
EINTR (4).

Setting errno to 0 before calling send results in the same
thing.  This only seems to happen with heavy network traffic on
several sockets and connections being opened and close every
second or two.  Some more experimention has shown that the
first rety will succeed most of the time, but it will
occasionally fail repeatedly (as many as 10 times in a row).

We do have the SNMP agent running, but I didn't find any
alarm() or raise() calls.  What else can cause a signal in eCos?

Are signals thread-specific?

Grant Edwards                   grante             Yow! Were these parsnips
                                  at               CORRECTLY MARINATED in
                               visi.com            TACO SAUCE?

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list