NetBSD Problem Report #23120

Received: (qmail 24904 invoked by uid 605); 10 Oct 2003 10:00:19 -0000
Message-Id: <20031010100018.376B011153@narn.netbsd.org>
Date: Fri, 10 Oct 2003 10:00:18 +0000 (UTC)
From: ag@ersatz.org
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: ag@ersatz.org
To: gnats-bugs@gnats.NetBSD.org
Subject: openssh core dumps on Solaris
X-Send-Pr-Version: www-1.0

>Number:         23120
>Category:       pkg
>Synopsis:       openssh core dumps on Solaris
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 10 10:01:00 +0000 2003
>Closed-Date:    Sun Oct 12 10:15:47 +0000 2003
>Last-Modified:  Wed Oct 15 08:14:00 +0000 2003
>Originator:     Alex Gerasimoff
>Release:        pksrc from CVS
>Organization:
>Environment:
SunOS testsun-01 5.7 Generic_106541-27 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
openssh-3.7.1.2 compiles and installs OK on Solaris 7 from pkgsrc,
but when I try to run it, it dumps core.

I tried to disable support for skey, tcp-wrappers and some other 
stuff(in the Makefile), but it dumps core anyway.

When I extract the sources from the openssh archive  and compile and install it 
manually (without applying patches), the sshd seems to be OK.
(use configure, make (not bmake) in in the work directory, make install)

config.log contains both 
--with-skey=/data/pkg --without-skey
because in them Makefile there is 

.if ${OPSYS} == "Darwin" || ${OPSYS} == "SunOS"
.  include "../../security/skey/buildlink2.mk"
CONFIGURE_ARGS+=        --with-skey=${BUILDLINK_PREFIX.skey}
# XXX: NetBSD has 4 args (4: sslen) to skeychallenge instead of 3
#CONFIGURE_ARGS+=       --with-skey=/usr
CONFIGURE_ARGS+=        --without-skey
.else
CONFIGURE_ARGS+=        --without-skey
.endif

which does not make sense to me.

Should I send the core file and binary ?
Should I try re-compile with support for debug informatin ?

bash-2.05# gdb /data/pkg/sbin/sshd  core 
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris"...(no debugging symbols found)...
Core was generated by `/data/pkg/sbin/sshd'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /data/pkg/lib/libwrap.so.7...(no debugging symbols found)...done.
Loaded symbols for /data/pkg/lib/libwrap.so.7
Reading symbols from /usr/lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /data/pkg/lib/libz.so.0...(no debugging symbols found)...done.
Loaded symbols for /data/pkg/lib/libz.so.0
Reading symbols from /usr/lib/libsocket.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libc.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /data/pkg/lib/libcrypto.so.300.1...done.
Loaded symbols for /data/pkg/lib/libcrypto.so.300.1
Reading symbols from /usr/lib/libaio.so.1...done.
Loaded symbols for /usr/lib/libaio.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/platform/SUNW,UltraSPARC-IIi-cEngine/lib/libc_psr.so.1...done.
Loaded symbols for /usr/platform/SUNW,UltraSPARC-IIi-cEngine/lib/libc_psr.so.1
#0  0x00019f78 in main ()
(gdb) where
#0  0x00019f78 in main ()
(gdb) 








>How-To-Repeat:
bmake install on Solaris machine.

Similar problem was also reported with Solaris 8 machine.
>Fix:
not known
>Release-Note:
>Audit-Trail:

From: grant beattie <grant@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:  
Subject: pr/23120 CVS commit: pkgsrc/security/openssh
Date: Sun, 12 Oct 2003 10:13:53 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	grant
 Date:		Sun Oct 12 10:13:53 UTC 2003

 Modified Files:
 	pkgsrc/security/openssh: Makefile

 Log Message:
 set LD=CC again for all platforms with an appropriate comment - I
 don't know why this didn't originally work as it should, but I've
 just tested it with gcc3 and Forte 8 on Solaris and I couldn't make
 it fail.

 fixes coredump problem on Solaris observed by some, and also
 PR pkg/23120 from Alex Gerasimoff.

 bump PKGREVISION to differentiate between broken and unbroken
 package.


 To generate a diff of this commit:
 cvs rdiff -r1.118 -r1.119 pkgsrc/security/openssh/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed 
State-Changed-By: grant 
State-Changed-When: Sun Oct 12 10:15:21 UTC 2003 
State-Changed-Why:  
I have fixed this in openssh/Makefile rev. 1.119. 

thanks. 

From: Frank Kardel <Frank.Kardel@Acrys.COM>
To: ag@ersatz.org
Cc: gnats-bugs@gnats.NetBSD.org, current-users@netbsd.org
Subject: Re: pkg/23120: openssh core dumps on Solaris
Date: Wed, 15 Oct 2003 08:11:52 +0000

 Hi *,

 I have seen that too. I analyzed it to be in the area of startup 
 code/linking.

 main(int argc, char **argv) is called with following registers:
 %i0 (argc) == 0
 %i1 (argv) == 0x00000000

 These register values are pretty far from the expected standard and
 __progname = ssh_get_progname(argv[0]) is pretty dangerous when argv == 
 0x00000000.

 Thus i suspect a linkage/startupcode problem maybe in the way ld is
 called. I haven't debugged any further.

 Regards,
    Frank

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.