NetBSD Problem Report #51009

From www@NetBSD.org  Thu Mar 24 19:22:48 2016
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 8EE8D7ABDD
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 24 Mar 2016 19:22:48 +0000 (UTC)
Message-Id: <20160324192247.5DBFC7ACBD@mollari.NetBSD.org>
Date: Thu, 24 Mar 2016 19:22:47 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: userland segfaults on evbmips64el after import of compiler-rt r259194
X-Send-Pr-Version: www-1.0

>Number:         51009
>Notify-List:    jdbaker@consolidated.net
>Category:       toolchain
>Synopsis:       userland segfaults on evbmips64el after import of compiler-rt r259194
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 24 19:25:00 +0000 2016
>Closed-Date:    Thu Dec 20 22:21:43 +0000 2018
>Last-Modified:  Thu Dec 20 22:21:43 +0000 2018
>Originator:     John D. Baker
>Release:        NetBSD/evbmips-mips64el 7.99.26 from 201602271909Z or later
>Organization:
>Environment:
NetBSD 7.99.26 evbmips mips64el
>Description:
As noted here:

  http://mail-index.netbsd.org/port-evbmips/2016/03/21/msg000257.html

I've traced the fault to the following series of commits:

  http://mail-index.NetBSD.org/source-changes/2016/02/27/msg072917.html
  http://mail-index.NetBSD.org/source-changes/2016/02/27/msg072918.html
  http://mail-index.NetBSD.org/source-changes/2016/02/27/msg072919.html
  http://mail-index.NetBSD.org/source-changes/2016/02/27/msg072920.html

"Import compiler-rt r259194."

Sources from 201602271858Z and earlier produce a "working" release
(modulo the persistent problems with NFS writes, 'amd' invalid argument,
and 'ntpd's complaint about the struct timex pointer).

Sources of 201602271909Z or later produce a release in which:

  mount_tmpfs
  ntpd
  ntpdate
  ftp
  progress
  sudo
  (others?)

fail with Segmentation fault/Memory fault.

The system is a Lemote Yeeloong netbook.
>How-To-Repeat:
S/A
>Fix:

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import of compiler-rt r259194
Date: Thu, 24 Mar 2016 20:44:44 +0100

 On Thu, Mar 24, 2016 at 07:25:00PM +0000, jdbaker@mylinuxisp.com wrote:
 > >Environment:
 > NetBSD 7.99.26 evbmips mips64el

 I can reproduce this on ERLITE (evbmips64-eb).

 Martin

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import
 of compiler-rt r259194
Date: Thu, 24 Mar 2016 21:08:08 +0100

 On Thu, Mar 24, 2016 at 07:25:00PM +0000, jdbaker@mylinuxisp.com wrote:
 > Sources of 201602271909Z or later produce a release in which:
 > 
 >   mount_tmpfs
 >   ntpd
 >   ntpdate
 >   ftp
 >   progress
 >   sudo
 >   (others?)
 > 
 > fail with Segmentation fault/Memory fault.
 > 
 > The system is a Lemote Yeeloong netbook.

 Backtrace? Do you have the clzdi2.c change from March 4?

 Joerg

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import of compiler-rt r259194
Date: Thu, 24 Mar 2016 21:14:04 +0100

 On Thu, Mar 24, 2016 at 08:10:01PM +0000, Joerg Sonnenberger wrote:
 >  Backtrace? Do you have the clzdi2.c change from March 4?

 A working gdb would help, but sorry, no - and yes, very latest current.

 Martin

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import
 of compiler-rt r259194
Date: Thu, 24 Mar 2016 15:52:50 -0500 (CDT)

 On Thu, 24 Mar 2016, Martin Husemann wrote:

 >  On Thu, Mar 24, 2016 at 08:10:01PM +0000, Joerg Sonnenberger wrote:
 >  >  Backtrace? Do you have the clzdi2.c change from March 4?
 >  
 >  A working gdb would help, but sorry, no - and yes, very latest current.

 I first observed the problem with sources, from 14 March 2016, so the
 change mentioned was already incorporated.  See the thread beginning here:

   http://mail-index.netbsd.org/port-evbmips/2016/03/14/msg000248.html

 And, as Martin said, 'gdb' (and cross 'gdb') are broken on this port,
 so the bisection is the best I can provide for now.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import of compiler-rt r259194
Date: Fri, 25 Mar 2016 21:00:20 +0100

 Not sure how much I can trust this gdb, but for the mount_tmpfs core
 it says:

 #0  0x786cc538 in _softfloat_float32_lt ()
    from /hosts/evbmips64-eb/lib/libc.so.12
 #1  0x7862dd74 in __ltsf2 () from /hosts/evbmips64-eb/lib/libc.so.12
 #2  0x7860d02c in __fixsfdi () from /hosts/evbmips64-eb/lib/libc.so.12
 [.. and then the stack is bogus..]

 Martin

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import
 of compiler-rt r259194
Date: Fri, 25 Mar 2016 18:08:17 -0500 (CDT)

 On Fri, 25 Mar 2016, Martin Husemann wrote:

 >  Not sure how much I can trust this gdb, but for the mount_tmpfs core
 >  it says:

 I built a release from sources about 201603250359Z to clean OBJDIR and
 DESTDIR.  The resulting 'gdb' still didn't like the core file:

 # gdb /sbin/mount_tmpfs /mount_tmpfs.core
 GNU gdb (GDB) 7.10.1
 Copyright (C) 2015 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 "mips64el--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 /sbin/mount_tmpfs...Reading symbols from /usr/libdata/debug//sbin/mount_tmpfs.debug...done.
 done.
 "/mount_tmpfs.core" is not a core dump: File format not recognized
 (gdb)


 Then again, I was testing on my NFS root setup, so it may have mangled
 the core file.  I'll update one of my root/var setups on SD card and
 try again.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import
 of compiler-rt r259194
Date: Fri, 25 Mar 2016 19:10:44 -0500 (CDT)

 On Fri, 25 Mar 2016, John D. Baker wrote:

 > I'll update one of my root/var setups on SD card and try again.

 No joy.  Still doesn't recognize the core file as valid.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import of compiler-rt r259194
Date: Sat, 26 Mar 2016 07:16:08 +0100

 On Sat, Mar 26, 2016 at 12:15:01AM +0000, John D. Baker wrote:
 >  No joy.  Still doesn't recognize the core file as valid.

 The cross-gdb got a bit better, but the native one still needs at least
 an mknative update (should follow soon).

 There also is some confusion about -msoft-float not beeing applied
 everywhere where needed and maybe compile_rt needing -D__SOFT_FP__
 when compiling with softfloat.

 Martin

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import
 of compiler-rt r259194
Date: Sat, 26 Mar 2016 10:19:11 +0100

 On Sat, Mar 26, 2016 at 06:20:01AM +0000, Martin Husemann wrote:
 >  There also is some confusion about -msoft-float not beeing applied
 >  everywhere where needed and maybe compile_rt needing -D__SOFT_FP__
 >  when compiling with softfloat.

 I don't think it is necessary, but it can result in somewhat tighter
 code. That said, I can't explain the backtrace from the compiler-rt
 version, so it's more likely that the other soft-float code in libc is
 responsible.

 Joerg

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import of compiler-rt r259194
Date: Sat, 26 Mar 2016 19:11:13 +0100

 On Sat, Mar 26, 2016 at 07:16:08AM +0100, Martin Husemann wrote:
 > There also is some confusion about -msoft-float not beeing applied
 > everywhere where needed and maybe compile_rt needing -D__SOFT_FP__
 > when compiling with softfloat.

 The -D__SOFT_FP__ (and maybe a few other softfloat changes) seems to have
 fixed it.

 Gdb also does not do the internal misconfig thing anymore (but does not
 really work either).

 Martin

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/51009: userland segfaults on evbmips64el after import
 of compiler-rt r259194
Date: Sat, 26 Mar 2016 17:05:10 -0500 (CDT)

 On Sat, 26 Mar 2016, Martin Husemann wrote:

 >  The -D__SOFT_FP__ (and maybe a few other softfloat changes) seems to have
 >  fixed it.

 Indeed.  I do not see the segfaults that I did before (or any new ones).

 > Gdb also does not do the internal misconfig thing anymore (but does not
 > really work either).

 I have not tried this yet, but expect to when I update my other SD card
 and poke at X with siliconmotion driver again.

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Thu, 20 Dec 2018 22:21:43 +0000
State-Changed-Why:
this was fixed a while ago.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.