NetBSD Problem Report #55119
From www@netbsd.org Sat Mar 28 09:36:42 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 F19001A9217
for <gnats-bugs@gnats.NetBSD.org>; Sat, 28 Mar 2020 09:36:41 +0000 (UTC)
Message-Id: <20200328093640.BB1711A9218@mollari.NetBSD.org>
Date: Sat, 28 Mar 2020 09:36:40 +0000 (UTC)
From: tgrom.automail@nuegia.net
Reply-To: tgrom.automail@nuegia.net
To: gnats-bugs@NetBSD.org
Subject: mutt segfaults on start
X-Send-Pr-Version: www-1.0
>Number: 55119
>Category: port-arm
>Synopsis: mutt segfaults on start
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-arm-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 28 09:40:01 +0000 2020
>Closed-Date: Thu Apr 17 21:41:07 +0000 2025
>Last-Modified: Thu Apr 17 21:41:07 +0000 2025
>Originator: Thomas Groman
>Release: 9.0
>Organization:
>Environment:
NetBSD arm64 9.0 NetBSD 9.0 (GENERIC64) #0: Fri Feb 14 00:06:28 UTC 2020 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm
>Description:
Mutt segfaults on launch.
arm64# gdb mutt
GNU gdb (GDB) 8.3
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from mutt...
(No debugging symbols found in mutt)
(gdb) run
Starting program: /usr/pkg/bin/mutt
Program received signal SIGILL, Illegal instruction.
0x0000f9918ab4a128 in _armv8_pmull_probe () from /usr/lib/libcrypto.so.14
(gdb) bt
#0 0x0000f9918ab4a128 in _armv8_pmull_probe () from /usr/lib/libcrypto.so.14
#1 0x0000f9918ab4a478 in OPENSSL_cpuid_setup () from /usr/lib/libcrypto.so.14
#2 0x0000ffffeed83d3c in _rtld_call_init_functions () from /usr/libexec/ld.elf_so
#3 0x0000ffffeed845bc in _rtld () from /usr/libexec/ld.elf_so
#4 0x0000ffffeed80af0 in _rtld_start () from /usr/libexec/ld.elf_so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
>How-To-Repeat:
# pkg_add -v mutt
# mutt
>Fix:
>Release-Note:
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-arm/55119: mutt segfaults on start
Date: Sat, 28 Mar 2020 10:42:14 +0100
On Sat, Mar 28, 2020 at 09:40:01AM +0000, tgrom.automail@nuegia.net wrote:
> Program received signal SIGILL, Illegal instruction.
> 0x0000f9918ab4a128 in _armv8_pmull_probe () from /usr/lib/libcrypto.so.14
> (gdb) bt
> #0 0x0000f9918ab4a128 in _armv8_pmull_probe () from /usr/lib/libcrypto.so.14
> #1 0x0000f9918ab4a478 in OPENSSL_cpuid_setup () from /usr/lib/libcrypto.so.14
This is not a SEGFAULT and it is harmless (the library catches it).
It is used to probe for arm features to enable optimized crypto code.
You can continue in gdb at that point and everything should run normally.
Martin
From: Tom <tgrom.automail@nuegia.net>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-arm/55119: mutt segfaults on start
Date: Sat, 28 Mar 2020 09:29:30 -0700
On Sat, 28 Mar 2020 09:45:02 +0000 (UTC)
Martin Husemann <martin@duskware.de> wrote:
> The following reply was made to PR port-arm/55119; it has been noted
> by GNATS.
>
> From: Martin Husemann <martin@duskware.de>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: port-arm/55119: mutt segfaults on start
> Date: Sat, 28 Mar 2020 10:42:14 +0100
>
> On Sat, Mar 28, 2020 at 09:40:01AM +0000, tgrom.automail@nuegia.net
> wrote:
> > Program received signal SIGILL, Illegal instruction.
> > 0x0000f9918ab4a128 in _armv8_pmull_probe ()
> > from /usr/lib/libcrypto.so.14 (gdb) bt
> > #0 0x0000f9918ab4a128 in _armv8_pmull_probe ()
> > from /usr/lib/libcrypto.so.14 #1 0x0000f9918ab4a478 in
> > OPENSSL_cpuid_setup () from /usr/lib/libcrypto.so.14
>
> This is not a SEGFAULT and it is harmless (the library catches it).
> It is used to probe for arm features to enable optimized crypto code.
>
> You can continue in gdb at that point and everything should run
> normally.
> Martin
>
How would I continue without gdb, because otherwise the program stops
and generates a core dump. I can send you a coredump if that would be
useful.
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-arm/55119: mutt segfaults on start
Date: Sat, 28 Mar 2020 17:33:41 +0100
On Sat, Mar 28, 2020 at 04:30:08PM +0000, Tom wrote:
> How would I continue without gdb, because otherwise the program stops
> and generates a core dump. I can send you a coredump if that would be
> useful.
You would not continue *without* gdb, but just tell gdb "continue" and it
will happily go on executing the program. You will likely hit two (or so)
more of this SIGILL before you get to the real issue you are after.
Martin
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@netbsd.org, port-arm-maintainer@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
tgrom.automail@nuegia.net
Cc:
Subject: Re: port-arm/55119: mutt segfaults on start
Date: Sat, 28 Mar 2020 12:35:35 -0400
On Mar 28, 4:30pm, tgrom.automail@nuegia.net (Tom) wrote:
-- Subject: Re: port-arm/55119: mutt segfaults on start
| How would I continue without gdb, because otherwise the program stops
| and generates a core dump. I can send you a coredump if that would be
| useful.
Just type "continue" at the gdb prompt.
christos
State-Changed-From-To: open->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Thu, 17 Apr 2025 21:41:07 +0000
State-Changed-Why:
It looks like this issue is actually just OpenSSL's CPU feature
detection, which works by
1. installing a SIGILL signal handler, and then
2. trying a SIMD/crypto instruction to see if it's supported.
If it's supported, great; if not, it triggers SIGILL, and the signal
handler longjmps out. This is perfectly normal -- but when you run it
under gdb, gdb traps the SIGILL itself, so it looks like the program
crashes.
If it's crashing and dumping core _outside_ gdb, please feel free to
follow up with more details. For example, maybe you can get a stack
trace out of a core dump:
arm64$ mutt
Segmentation fault (core dumped)
arm64$ gdb mutt ./mutt.core
(gdb) bt
But if you're just seeing the SIGILL under gdb, that's not a bug --
that's how it's supposed to work.
>Unformatted:
(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-2025
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.