NetBSD Problem Report #58215

From martin@aprisoft.de  Tue Apr 30 10:30:47 2024
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E00FA1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 30 Apr 2024 10:30:47 +0000 (UTC)
Message-Id: <20240430103038.006465CC795@emmas.aprisoft.de>
Date: Tue, 30 Apr 2024 12:30:37 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: compat_netbsd32 broken
X-Send-Pr-Version: 3.95

>Number:         58215
>Category:       kern
>Synopsis:       compat_netbsd32 broken
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          needs-pullups
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 30 10:35:00 +0000 2024
>Closed-Date:    
>Last-Modified:  Thu May 02 14:55:46 +0000 2024
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.10
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD seven-days-to-the-wolves.aprisoft.de 10.99.10 NetBSD 10.99.10 (GENERIC) #692: Tue Apr 30 09:57:26 CEST 2024 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

Recently (within the last week) compat_netbsd32 on amd64 broke. This is
from trying to exec a i386 tcsh in a i386 chroot on an amd64 machine running
-current as of a few hours ago:

 26296  26296 tcsh     CALL  netbsd32___sigprocmask14(1,0xfff9a2f4,0xfff9a2e4)
 26296  26296 tcsh     RET   netbsd32___sigprocmask14 0
 26296  26296 tcsh     CALL  netbsd32___sigsuspend14(0xfff9a304)
 26296  26296 tcsh     RET   netbsd32___sigsuspend14 -1 errno 4 Interrupted system call
 26296  26296 tcsh     PSIG  SIGCHLD caught handler=0x808bace mask=(2,20): code=CLD_EXITED child pid=15948, uid=0,  status=0, utime=0, stime=0)
 26296  26296 tcsh     CALL  compat_16_netbsd32___sigreturn14(0xfff9a260)
 26296  26296 tcsh     RET   compat_16_netbsd32___sigreturn14 -1 errno 78 Function not implemented
 26296  26296 tcsh     PSIG  SIGSYS SIG_DFL: code=SI_NOINFO
 26296  26296 tcsh     NAMI  "tcsh.core"


The same works on aarch64, both tcsh binaries are a bit oldish, both (base)
userlands are up to date (as of a few hours ago):

tcsh: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /usr/libexec/ld.elf_so, for NetBSD 9.99.82, stripped
tcsh: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /usr/libexec/ld.elf_so, for NetBSD 9.99.80, compiled for: earmv7hf, stripped


>How-To-Repeat:

s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->needs-pullups
State-Changed-By: martin@NetBSD.org
State-Changed-When: Thu, 02 May 2024 14:55:46 +0000
State-Changed-Why:
Fixed by:

Module Name:    src
Committed By:   mlelstv
Date:           Wed May  1 11:32:29 UTC 2024

Modified Files:
        src/sys/compat/netbsd32: netbsd32_compat_16.c

Log Message: 
Enable compat sigreturn system call.


To generate a diff of this commit: 
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/netbsd32/netbsd32_compat_16.c

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


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.