NetBSD Problem Report #60877

From martin@duskware.de  Wed Oct 14 18:20:29 2026
Return-Path: <martin@duskware.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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id DAD1D1A923B
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 14 Oct 2026 18:20:29 +0000 (UTC)
Message-Id: <20261014182026.048B8E1FFAA@mail.duskware.de>
Date: Wed, 14 Oct 2026 20:20:20 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: t_signal_and_sp test failure with i386 userland on amd64 kernel
X-Send-Pr-Version: 3.95
X-From4GNATS: "martin@NetBSD.org via gnats" <gnats-admin@NetBSD.org>

>Number:         60877
>Category:       kern
>Synopsis:       t_signal_and_sp test failure with i386 userland on amd64 kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          needs-pullups
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 14 18:25:00 +0000 2026
>Closed-Date:    
>Last-Modified:  Wed Oct 14 19:35:01 +0000 2026
>Originator:     Martin Husemann
>Release:        NetBSD 11.99.9
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD seven-days-to-the-wolves.aprisoft.de 11.99.9 NetBSD 11.99.9 (GENERIC) #903: Wed Oct 14 14:46:31 CEST 2026 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

When running the i386 tests on an amd64 machine (in a 32bit chroot)
the /usr/tests/kernel/t_signal_and_sp test program shows lots of 
failures, like:

tc-start: 1792001789.340810, getstack_vforkexec
tc-so:child
tc-se:h_getstack: ELF AT_STACKBASE: addr=0xffff4000
tc-se:h_getstack:       getcontext: addr=0xfffff000       used=2000
tc-se:h_getstack:     __ps_strings: addr=0xffff4000
tc-se:h_getstack:     pthread attr: addr=0xffff4000       size=400000
tc-se:h_getstack:     RLIMIT_STACK:                       size=400000 min, 4000000 max
tc-se:h_getstack:      sigaltstack: addr=0x0              size=0
tc-se:h_getstack: Stack disagreement!
tc-so:parent
tc-se:*** Check failed: /work/src/tests/kernel/t_signal_and_sp.c:779: child exited with code 255
tc-se:t_signal_and_sp: ELF AT_STACKBASE: addr=0xfff6d000
tc-se:t_signal_and_sp:       getcontext: addr=0xfffff000       used=3000
tc-se:t_signal_and_sp:     __ps_strings: addr=0xfff6d000
tc-se:t_signal_and_sp:     pthread attr: addr=0xfff6d000       size=400000
tc-se:t_signal_and_sp:     RLIMIT_STACK:                       size=400000 min, 4000000 max
tc-se:t_signal_and_sp:      sigaltstack: addr=0x0              size=0
tc-se:t_signal_and_sp: Stack disagreement!
tc-se:*** Check failed: /work/src/tests/kernel/t_signal_and_sp.c:786: checkgetstack() == 0 not met
tc-end: 1792001789.344804, getstack_vforkexec, failed, 2 checks failed; see output for more details

see also:
https://netbsd.org/~martin/amd64-compat32-atf/

>How-To-Repeat:
s/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Wed, 14 Oct 2026 19:32:59 +0000
State-Changed-Why:
candidate fix committed, needs pullup-11, pullup-10 after test run


From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60877 CVS commit: src/sys/compat/netbsd32
Date: Wed, 14 Oct 2026 19:32:04 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Wed Oct 14 19:32:04 UTC 2026

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

 Log Message:
 compat32: Advertise true stack base to getcontext(2).

 Needs adjustment for PaX ASLR.

 This was missed as part of:

 > Module Name:    src
 > Committed By:   christos
 > Date:           Wed Dec 26 22:11:54 UTC 2007
 >
 > Modified Files:
 >         src/sys/conf: files
 >         src/sys/kern: exec_elf32.c exec_subr.c init_sysctl.c kern_exec.c
 >             kern_pax.c kern_sig.c
 >         src/sys/sys: exec.h exec_elf.h pax.h proc.h
 >         src/sys/uvm: uvm_extern.h uvm_mmap.c
 >
 > Log Message:
 > Add PaX ASLR (Address Space Layout Randomization) [from elad and myself]

 https://mail-index.NetBSD.org/source-changes/2007/12/26/msg195243.html

 PR kern/60877: t_signal_and_sp test failure with i386 userland on amd64
 kernel


 To generate a diff of this commit:
 cvs rdiff -u -r1.56 -r1.57 src/sys/compat/netbsd32/netbsd32_signal.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.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.