NetBSD Problem Report #54877

From martin@duskware.de  Sun Jan 19 12:02:26 2020
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 4D25D7A152
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 19 Jan 2020 12:02:26 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: gdb_exception_RETURN_MASK_ERROR on evbarm
X-Send-Pr-Version: 3.95

>Number:         54877
>Category:       toolchain
>Synopsis:       gdb stack walking sometimes fails
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 19 12:05:01 +0000 2020
>Closed-Date:    Wed Apr 29 15:54:24 +0000 2020
>Last-Modified:  Wed Apr 29 15:54:24 +0000 2020
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.37
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD space-truckin.duskware.de 9.99.37 NetBSD 9.99.37 (GENERIC) #43: Mon Jan 13 18:34:10 CET 2020 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:

While in gdb:

(gdb) c
Continuing.
assertion "info->nat_type != NULL" failed: file "/usr/src/usr.sbin/sysinst/arch/evbarm/../../mbr.c", line 2061, function "mbr_add_part"

Thread 1 "" received signal SIGABRT, Aborted.
0x7935b000 in _lwp_kill () from /usr/lib/libc.so.12
(gdb) up
#1  0x79359bec in abort () at /work/src/lib/libc/stdlib/abort.c:74
74      /work/src/lib/libc/stdlib/abort.c: No such file or directory.
(gdb) 
#2  0x793586b4 in __assert13 (
    file=0x7243aa8 "/usr/src/usr.sbin/sysinst/arch/evbarm/../../mbr.c", 
terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'
    line=line@entry=2061, 
[ 445745.2228103] sorry, pid 28004 was killed: orphaned traced process
Abort (core dumped)
>  gdb gdb gdb.core
Reading symbols from gdb...
Reading symbols from /usr/libdata/debug//usr/bin/gdb.debug...
[New process 1]
Core was generated by `gdb'.
Program terminated with signal SIGABRT, Aborted.
#0  0x5dcbb000 in _lwp_kill () from /usr/lib/libc.so.12
(gdb) bt
#0  0x5dcbb000 in _lwp_kill () from /usr/lib/libc.so.12
#1  0x5dcb9bec in abort () at /work/src/lib/libc/stdlib/abort.c:74
#2  0x5de41144 in __gnu_cxx::__verbose_terminate_handler ()
    at /work/src/external/gpl3/gcc/dist/libstdc++-v3/libsupc++/vterminate.cc:95
terminate called after throwing an instance of 'gdb_exception_RETURN_MASK_ERROR'
#3  0x5de4bd18 in __cxxabiv1::__terminate (Abort (core dumped)

I guess I can recurse that a few times deeper ;-)

>How-To-Repeat:
n/a

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54877 CVS commit: src/external/gpl3/gdb/lib/libgdb
Date: Wed, 29 Apr 2020 11:04:59 +0000

 Module Name:	src
 Committed By:	rin
 Date:		Wed Apr 29 11:04:58 UTC 2020

 Modified Files:
 	src/external/gpl3/gdb/lib/libgdb: Makefile

 Log Message:
 PR toolchain/54820
 PR toolchain/54877

 GCC 8.4 miscompiles dwarf2expr.c with -O2 or -O1 for earmv7hf{,eb}, which
 results in crashes described in the PRs. No upstream fixes up to now. So,
 let us disable optimization for this file.

 Note that this affects only earmv7hf{,eb} as far as I can see. Crashes do
 not occur neither for earmv6hf{,eb} nor earmv7{,eb}.


 To generate a diff of this commit:
 cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gdb/lib/libgdb/Makefile

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

From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54877 CVS commit: src/doc
Date: Wed, 29 Apr 2020 11:08:40 +0000

 Module Name:	src
 Committed By:	rin
 Date:		Wed Apr 29 11:08:40 UTC 2020

 Modified Files:
 	src/doc: HACKS

 Log Message:
 PR toolchain/54820
 PR toolchain/54877

 earmv7hf{,eb}: compile gdb/dwarf2expr.c with -O0 for GCC8

 http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gdb/lib/libgdb/Makefile#rev1.22


 To generate a diff of this commit:
 cvs rdiff -u -r1.201 -r1.202 src/doc/HACKS

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

State-Changed-From-To: open->feedback
State-Changed-By: rin@NetBSD.org
State-Changed-When: Wed, 29 Apr 2020 11:13:58 +0000
State-Changed-Why:
Seems like same problem as toolchain/54820. Now, backtrace works fine for me.


State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Wed, 29 Apr 2020 15:54:24 +0000
State-Changed-Why:
works for me


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.