NetBSD Problem Report #41288
From taca@back-street.net Mon Apr 27 15:18:45 2009
Return-Path: <taca@back-street.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 101B763C166
for <gnats-bugs@gnats.NetBSD.org>; Mon, 27 Apr 2009 15:18:45 +0000 (UTC)
Message-Id: <20090427151832.4A0EB49336@edge.back-street.net>
Date: Tue, 28 Apr 2009 00:18:32 +0900 (JST)
From: taca@back-street.net
Reply-To: taca@back-street.net
To: gnats-bugs@gnats.NetBSD.org
Subject: FreeBSD emulation stop working
X-Send-Pr-Version: 3.95
>Number: 41288
>Category: kern
>Synopsis: FreeBSD emulation stop working
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 27 15:20:00 +0000 2009
>Closed-Date: Sat Feb 10 08:56:31 +0000 2018
>Last-Modified: Sat Feb 10 08:56:31 +0000 2018
>Originator: Takahiro Kambe
>Release: NetBSD 5.99.11
>Organization:
Takahiro Kambe
>Environment:
System: NetBSD edge.back-street.net 5.99.11 NetBSD 5.99.11 (CF-R) #206: Fri Apr 24 22:45:34 JST 2009 taca@reef.back-street.net:/var/obj/sys/arch/i386/compile/CF-R i386
Architecture: i386
Machine: i386
>Description:
FreeBSD emulation stop working.
>How-To-Repeat:
Run FreeBSD binary.
Here is ktraced output. dpkeyserv is statically linked FreeBSD
binary. It was worked at least 5.99.9.
413 1 ktrace EMUL "netbsd"
413 1 ktrace RET ktrace 0
413 1 ktrace CALL execve(0xbfbff8df,0xbfbfe7bc,0xbfbfe7c4)
413 1 ktrace NAMI "/usr/local/bin/Dp/dpkeyserv"
413 1 dpkeyserv NAMI "/emul/freebsd"
413 1 dpkeyserv EMUL "freebsd"
413 1 dpkeyserv RET syscall JUSTRETURN
413 1 dpkeyserv CALL open(0xbfbff558,0,0x1b6)
413 1 dpkeyserv NAMI "/emul/freebsd/usr/jp/lib/dp/dpkeylist"
413 1 dpkeyserv NAMI "/usr/jp/lib/dp/dpkeylist"
413 1 dpkeyserv RET open -1 errno 2 No such file or directory
413 1 dpkeyserv PSIG SIGSEGV SIG_DFL: code=SEGV_ACCERR, addr=0x27f98, trap=4)
413 1 dpkeyserv NAMI "dpkeyserv.core"
>Fix:
Unknown.
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/41288: FreeBSD emulation stop working
Date: Wed, 31 Mar 2010 03:01:33 +0000
(send to gnats-admin instead of gnats-bugs)
------
From: Takahiro Kambe <taca@back-street.net>
To: gnats-admin@netbsd.org
Subject: Re: kern/41288: FreeBSD emulation stop working
Date: Fri, 26 Mar 2010 00:46:18 +0900 (JST)
I found that this problem happened by processing shared libraries of
FreeBSD.
Here is dynamic linked program:
% ktrace -di -t A ./motd
2080 1 ktrace EMUL "netbsd"
2080 1 ktrace RET ktrace 0
2080 1 ktrace CALL execve(0xbfbffca8,0xbfbfeb7c,0xbfbfeb84)
2080 1 ktrace NAMI "./motd"
2080 1 ktrace CSW stop kernel
2080 1 ktrace CSW resume kernel
2080 1 ktrace ARG "./motd"
2080 1 ktrace ENV "XMODIFIERS=@im=uim"
2080 1 ktrace ENV "PWD=/data/tmp/freebsd228"
...
2080 1 ktrace ENV "PAGER=less"
2080 1 ktrace ENV "EDITOR=vi"
2080 1 ktrace ENV "_=/usr/bin/ktrace"
2080 1 motd NAMI "/emul/freebsd"
2080 1 motd EMUL "freebsd"
2080 1 motd RET syscall JUSTRETURN
2080 1 motd CALL open(0x109c,0,0)
2080 1 motd NAMI "/emul/freebsd/usr/libexec/ld.so"
2080 1 motd RET open 3, -1077937132/0xbfbffc14
2080 1 motd PSIG SIGSEGV SIG_DFL: code=SEGV_MAPERR, addr=0x3, trap=6)
2080 1 motd NAMI "motd.core"
2080 1 motd CSW stop kernel
2080 1 motd CSW resume kernel
2080 1 motd CSW stop kernel
2080 1 motd CSW resume kernel
[2] 2743 segmentation fault (core dumped) ktrace -id -t A ./motd
When the same program which statically linked on FreeBSD:
% ktrace -id -t A ./motd.static
% kdump
3323 1 ktrace EMUL "netbsd"
3323 1 ktrace RET ktrace 0
3323 1 ktrace CALL execve(0xbfbffca4,0xbfbfeb78,0xbfbfeb80)
3323 1 ktrace NAMI "./motd.static"
3323 1 ktrace ARG "./motd.static"
3323 1 ktrace ENV "XMODIFIERS=@im=uim"
3323 1 ktrace ENV "PWD=/data/tmp/freebsd228"
...
3323 1 ktrace ENV "PAGER=less"
3323 1 ktrace ENV "EDITOR=vi"
3323 1 ktrace ENV "_=/usr/bin/ktrace"
3323 1 motd.static NAMI "/emul/freebsd"
3323 1 motd.static EMUL "freebsd"
3323 1 motd.static RET syscall JUSTRETURN
3323 1 motd.static CALL open(0x10c0,0,0)
3323 1 motd.static NAMI "/emul/freebsd/etc/motd"
3323 1 motd.static RET open 3, 8284/0x205c
3323 1 motd.static CALL close(3)
3323 1 motd.static RET close 0, 8284/0x205c
3323 1 motd.static CALL exit(0)
This program simply open /etc/motd, close it and end.
--
Takahiro Kambe <taca@back-street.net>
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/41288: FreeBSD emulation stop working
Date: Wed, 31 Mar 2010 03:32:29 +0000
On Wed, Mar 31, 2010 at 03:05:06AM +0000, David Holland wrote:
> (send to gnats-admin instead of gnats-bugs)
er, "sent". (Do *not* send (only) to gnats-admin...)
--
David A. Holland
dholland@netbsd.org
From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/41288: FreeBSD emulation stop working
Date: Wed, 31 Mar 2010 12:45:51 +0900 (JST)
Hi,
In message <20100331033502.62CE063B11D@www.NetBSD.org>
on Wed, 31 Mar 2010 03:35:02 +0000 (UTC),
David Holland <dholland-bugs@netbsd.org> wrote:
> On Wed, Mar 31, 2010 at 03:05:06AM +0000, David Holland wrote:
> > (send to gnats-admin instead of gnats-bugs)
>
> er, "sent". (Do *not* send (only) to gnats-admin...)
I'm sorry for it.
Best regards.
--
Takahiro Kambe <taca@back-street.net>
From: Takahiro Kambe <taca@back-street.net>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/41288: FreeBSD emulation stop working
Date: Wed, 31 Mar 2010 12:48:48 +0900 (JST)
Here are cleaner ktruss's output.
% ktruss ./motd.static
11314 1 ktruss fktrace = 0
11314 1 ktruss emul(netbsd)
11314 1 ktruss fcntl(0x4, 0x3, 0) = 1
11314 1 ktruss fcntl(0x4, 0x4, 0x1) = 0
11314 1 motd.static execve("./motd.static", 0xbfbfeae4, 0xbfbfeaec) JUSTRETURN
11314 1 motd.static emul(freebsd)
11314 1 motd.static open("/emul/freebsd/etc/motd", 0, 0) = 3, 8284
11314 1 motd.static close(0x3) = 0, 8284
11314 1 motd.static exit(0)
% ktruss ./motd
18519 1 ktruss fktrace = 0
18519 1 ktruss emul(netbsd)
18519 1 ktruss fcntl(0x4, 0x3, 0) = 1
18519 1 ktruss fcntl(0x4, 0x4, 0x1) = 0
18519 1 motd execve("./motd", 0xbfbfeaec, 0xbfbfeaf4) JUSTRETURN
18519 1 motd emul(freebsd)
18519 1 motd open("/emul/freebsd/usr/libexec/ld.so", 0, 0) = 3, -1077937288
18519 1 motd SIGSEGV SIG_DFL
% uname -rs
NetBSD 5.99.24
Best regards.
--
Takahiro Kambe <taca@back-street.net>
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/41288: FreeBSD emulation stop working
Date: Wed, 31 Mar 2010 04:52:57 +0000
On Wed, Mar 31, 2010 at 03:50:05AM +0000, Takahiro Kambe wrote:
> > er, "sent". (Do *not* send (only) to gnats-admin...)
> I'm sorry for it.
It's not a problem as such, it's just that mail to gnats-admin doesn't
get filed in the database and sometimes doesn't get seen at all.
--
David A. Holland
dholland@netbsd.org
State-Changed-From-To: open->closed
State-Changed-By: maxv@NetBSD.org
State-Changed-When: Sat, 10 Feb 2018 08:56:31 +0000
State-Changed-Why:
Close this PR. compat_freebsd is not maintained anymore, and we keep the
code only for tw_cli (which is tested, and does work). I've updated the
man page to explicitly say that.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.