Core dumps on HP-UX
Kevin Steves
stevesk at sweden.hp.com
Sat Jan 20 00:30:19 EST 2001
On Thu, 18 Jan 2001, Tom Orban wrote:
: Pid 22024 received a SIGSEGV for stack growth failure.
: Possible causes: insufficient memory or swap space,
: or stack size exceeded maxssiz.
:
: Other info: we're running on HP boxes running HP-UX 11.00; the compiler
: is HP's Ansi C compiler with patch PHSS_22272 installed. The core
: problems have occurred on snapshots from 0112 up to and including
: tonight's (SNAP-0119).
that's the SIGCHLD issue that hasn't been resolved yet.
i've been using this patch on hp-ux for a few weeks now, so i can use
and test the proto 2 stuff. it implements a mysignal() wrapper and uses
it for the sigchld_handler2 function.
Index: ssh.h
===================================================================
RCS file: /var/cvs/openssh/ssh.h,v
retrieving revision 1.52
diff -u -r1.52 ssh.h
--- ssh.h 2001/01/19 04:26:52 1.52
+++ ssh.h 2001/01/19 13:13:59
@@ -500,6 +500,10 @@
/* set filedescriptor to non-blocking */
void set_nonblock(int fd);
+/* wrapper for signal interface */
+typedef void (*mysig_t)(int);
+mysig_t mysignal(int sig, mysig_t act);
+
/*
* Performs the interactive session. This handles data transmission between
* the client and the program. Note that the notion of stdin, stdout, and
Index: util.c
===================================================================
RCS file: /var/cvs/openssh/util.c,v
retrieving revision 1.4
diff -u -r1.4 util.c
--- util.c 2000/10/28 03:19:58 1.4
+++ util.c 2001/01/19 13:13:59
@@ -94,3 +94,25 @@
return (old);
}
+
+mysig_t
+mysignal(int sig, mysig_t act)
+{
+#ifdef HAVE_SIGACTION
+ struct sigaction sa, osa;
+
+ if (sigaction(sig, 0, &osa) == -1)
+ return (mysig_t) -1;
+ if (osa.sa_handler != act) {
+ memset(&sa, 0, sizeof sa);
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ sa.sa_handler = act;
+ if (sigaction(sig, &sa, 0) == -1)
+ return (mysig_t) -1;
+ }
+ return (osa.sa_handler);
+#else
+ return (signal(sig, act));
+#endif
+}
Index: serverloop.c
===================================================================
RCS file: /var/cvs/openssh/serverloop.c,v
retrieving revision 1.36
diff -u -r1.36 serverloop.c
--- serverloop.c 2001/01/19 04:26:52 1.36
+++ serverloop.c 2001/01/19 13:14:06
@@ -109,7 +109,7 @@
int save_errno = errno;
debug("Received SIGCHLD.");
child_terminated = 1;
- signal(SIGCHLD, sigchld_handler2);
+ mysignal(SIGCHLD, sigchld_handler2);
errno = save_errno;
}
@@ -643,7 +643,7 @@
debug("Entering interactive session for SSH2.");
- signal(SIGCHLD, sigchld_handler2);
+ mysignal(SIGCHLD, sigchld_handler2);
signal(SIGPIPE, SIG_IGN);
child_terminated = 0;
connection_in = packet_get_connection_in();
More information about the openssh-unix-dev
mailing list