Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Dave Butenhof <butenhof@zko.dec.com>
Subject: Re: SIGPIPE->SIGIOT on DU 4.0?
Date: 1999/05/03	[thread overview]
Message-ID: <372D921A.DAFB56EA@zko.dec.com> (raw)
In-Reply-To: 7g4ksc$t2l$1@nnrp1.dejanews.com

gabejones@my-dejanews.com wrote:

> I'm doing socket programming, and occasionally an attempt to write to a
> closed socket results in a SIGPIPE being thrown.  No problem, I have an
> exception handler (using the TRY/CATCH macros) that does the right thing and
> gets my sockets back on track.  My problem is that 1 out of every 15 times or
> so, I seem to get SIGIOT instead of SIGPIPE.  Further, while I have a handler
> to deal with SIGIOT, it seems to just bypass it and I get a crash and core
> dump.  (Is it that DU 4.0 does not convert SIGIOT to an exception?)  Just
> doing a RAISE(pthread_exc_SIGPIPE_e) also seems to on occasion result in this
> behavior. Ideas, anyone?  I don't know enough about signals & exceptions to
> know from whence a SIGIOT would come.

SIGIOT is an alias for SIGABRT. (I don't know why SIGIOT, which would seem to be
the least common of the two, is treated as the "primary alias".)

What's probably happening is that the SIGPIPE is received while you don't have a
TRY block in scope. When an exception propagates to the "end" ("bottom") of a
thread's stack without finding a handler, the thread library tries to convert it
back into the original signal, to leave a core file that can be analyzed. There
were several levels of subtle problem in all this that were fixed in various
patches in the early 4.0x releases. One of the problems was that an unhandled
signal exception would also terminate the process by calling abort() (resulting
in SIGABRT/SIGIOT) rather than by re-raising the appropriate original signal.
This may be your problem. If so, you can get rid of it by installing the latest
patch kits for your release, or by upgrading to at least 4.0D.

/---------------------------[ Dave Butenhof ]--------------------------\
| Compaq Computer Corporation                     butenhof@zko.dec.com |
| 110 Spit Brook Rd ZKO2-3/Q18       http://members.aol.com/drbutenhof |
| Nashua NH 03062-2698  http://www.awl.com/cseng/titles/0-201-63392-2/ |
\-----------------[ Better Living Through Concurrency ]----------------/




      reply	other threads:[~1999-05-03  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-27  4:00 SIGPIPE->SIGIOT on DU 4.0? gabejones
1999-05-03  4:00 ` Dave Butenhof [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox