NetBSD Problem Report #53643
From martin@duskware.de Sat Sep 29 22:40:19 2018
Return-Path: <martin@duskware.de>
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 168B07A159
for <gnats-bugs@gnats.NetBSD.org>; Sat, 29 Sep 2018 22:40:19 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: gdb on core files fails on arm
X-Send-Pr-Version: 3.95
>Number: 53643
>Category: toolchain
>Synopsis: gdb on core files fails on arm
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 29 22:45:00 +0000 2018
>Last-Modified: Sun Sep 30 09:55:00 +0000 2018
>Originator: Martin Husemann
>Release: NetBSD 8.99.25
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD space-truckin.duskware.de 8.99.25 NetBSD 8.99.25 (SUNXI) #78: Sat Sep 29 20:54:01 CEST 2018 martin@night-owl.duskware.de:/usr/src/sys/arch/evbarm/compile/SUNXI evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:
The new openssl does not work well on arm. I get various core files, but
looking at them seems to be unreliable:
Core was generated by `ssh-add'.
Program terminated with signal SIGILL, Illegal instruction.
#0 0x6f559468 in _armv7_tick () from /usr/lib/libcrypto.so.14
(gdb) bt
#0 0x6f559468 in _armv7_tick () from /usr/lib/libcrypto.so.14
Register 25 is not available
Note that even the pc register is likely wrong - the instruction it points
at is not illegal on this cpu, and tracing through the call in live
instances does not throw a SIGILL.
>How-To-Repeat:
Just use gdb on a core file on arm. Maybe special for big endian arm?
>Fix:
n/a
>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, toolchain-manager@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc:
Subject: Re: toolchain/53643: gdb on core files fails on arm
Date: Sat, 29 Sep 2018 21:56:09 -0400
On Sep 29, 10:45pm, martin@NetBSD.org (martin@NetBSD.org) wrote:
-- Subject: toolchain/53643: gdb on core files fails on arm
| >Number: 53643
| >Category: toolchain
| >Synopsis: gdb on core files fails on arm
| >Confidential: no
| >Severity: serious
| >Priority: medium
| >Responsible: toolchain-manager
| >State: open
| >Class: sw-bug
| >Submitter-Id: net
| >Arrival-Date: Sat Sep 29 22:45:00 +0000 2018
| >Originator: Martin Husemann
| >Release: NetBSD 8.99.25
| >Organization:
| The NetBSD Foundation, Inc.
| >Environment:
| System: NetBSD space-truckin.duskware.de 8.99.25 NetBSD 8.99.25 (SUNXI) #78: Sat Sep 29 20:54:01 CEST 2018 martin@night-owl.duskware.de:/usr/src/sys/arch/evbarm/compile/SUNXI evbarm
| Architecture: earmv7hfeb
| Machine: evbarm
| >Description:
|
| The new openssl does not work well on arm. I get various core files, but
| looking at them seems to be unreliable:
|
| Core was generated by `ssh-add'.
| Program terminated with signal SIGILL, Illegal instruction.
| #0 0x6f559468 in _armv7_tick () from /usr/lib/libcrypto.so.14
| (gdb) bt
| #0 0x6f559468 in _armv7_tick () from /usr/lib/libcrypto.so.14
| Register 25 is not available
|
| Note that even the pc register is likely wrong - the instruction it points
| at is not illegal on this cpu, and tracing through the call in live
| instances does not throw a SIGILL.
|
| >How-To-Repeat:
| Just use gdb on a core file on arm. Maybe special for big endian arm?
This is on BE arm only? I can't reproduce any of it on LE arm (RPi 2)
christos
From: matthew green <mrg@eterna.com.au>
To: gnats-bugs@NetBSD.org, martin@netbsd.org
Cc: toolchain-manager@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: re: toolchain/53643: gdb on core files fails on arm
Date: Sun, 30 Sep 2018 13:45:32 +1000
> The new openssl does not work well on arm. I get various core files, but
> looking at them seems to be unreliable:
>
> Core was generated by `ssh-add'.
> Program terminated with signal SIGILL, Illegal instruction.
> #0 0x6f559468 in _armv7_tick () from /usr/lib/libcrypto.so.14
> (gdb) bt
> #0 0x6f559468 in _armv7_tick () from /usr/lib/libcrypto.so.14
> Register 25 is not available
>
> Note that even the pc register is likely wrong - the instruction it points
> at is not illegal on this cpu, and tracing through the call in live
> instances does not throw a SIGILL.
are there any CFI markers in the asm? there isn't for x86 last
i saw, and they're needed for properly traversing stack traces
into these asm files. i'd guess that's probably the problem..
.mrg.
From: Martin Husemann <martin@duskware.de>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@NetBSD.org
Subject: Re: toolchain/53643: gdb on core files fails on arm
Date: Sun, 30 Sep 2018 09:56:34 +0200
On Sat, Sep 29, 2018 at 09:56:09PM -0400, Christos Zoulas wrote:
> | >How-To-Repeat:
> | Just use gdb on a core file on arm. Maybe special for big endian arm?
>
> This is on BE arm only? I can't reproduce any of it on LE arm (RPi 2)
The openssl issue seems to be BE only, I don't know about the core
dump one (which is what this PR is about).
Why would the processor status (register 25 in gdb speak) not be available
in a core? Can I still trust the other registers, given that $PC doesn't
seem to make any sense? Note that it is not SIGILLing on one of the
armv8 instructions it tests, but on the single armv7 one that should not
generate a trap on this CPU (only if run under xen or something).
Martin
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: toolchain/53643: gdb on core files fails on arm
Date: Sun, 30 Sep 2018 11:51:18 +0200
The SIGILL this core reported happened in a thread program, and not in the
main thread. Maybe this related.
Martin
(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.