NetBSD Problem Report #49253

From www@NetBSD.org  Sat Oct  4 06:48:02 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(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 5DC20A6567
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  4 Oct 2014 06:48:02 +0000 (UTC)
Message-Id: <20141004064800.F128DA65B0@mollari.NetBSD.org>
Date: Sat,  4 Oct 2014 06:48:00 +0000 (UTC)
From: oshima-ya@yagoto-urayama.jp
Reply-To: oshima-ya@yagoto-urayama.jp
To: gnats-bugs@NetBSD.org
Subject: NetBSD/sh3 7.0_BETA binaries made by gcc48 strange somewhere.
X-Send-Pr-Version: www-1.0

>Number:         49253
>Category:       port-sh3
>Synopsis:       NetBSD/sh3 7.0_BETA binaries made by gcc48 strange somewhere.
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-sh3-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 04 06:50:00 +0000 2014
>Closed-Date:    Wed Jan 28 16:21:24 +0000 2015
>Last-Modified:  Wed Jan 28 16:21:24 +0000 2015
>Originator:     Yasushi Oshima
>Release:        NetBSD 7.0_BETA
>Organization:
>Environment:
NetBSD usl5p2 7.0_BETA NetBSD 7.0_BETA (GENERIC.201410031710Z) landisk

>Description:
In NetBSD/sh3-port (landisk, hpcsh, ...) 7.0_BETA, some binaries does not work correctly.

1) For building pkgsrc, the gcc occurs SIGSEGV.
 see http://mail-index.netbsd.org/port-sh3/2014/08/16/msg000112.html

2) When atf-run in /usr/tests/fs/psshfs, it fails. 
  the mount_psshfs got signal 4(SIGILL). it is very strange.(*1)

For comparison, I build NetBSD/landisk binary with GCC45 by build.sh -V HAVE_GCC45 and run,

1) 'make pkgsrc/pkgtools/digest' success.
2) atf-run psshfs passed, SIGILL does not occur. 

and, 
2') in GCC4.8 (Normal release binary) environment, 
  I copy libpuffs.so.2 binary built by GCC4.5,
  atf-run psshfs passed, successful.
  In this case, the problem is in libpuffs.so.2 built by gcc4.8 only.

I think these problems are caused by GCC48 for netbsd/sh3, it may generate worse binary.
(Now GCC48 is the default for NetBSD/sh3 in netbsd-7 and current)

*1: results of all atf-run in /usr/tests is here:
 http://www.yagoto-urayama.jp/~oshimaya/netbsd/files/atf/netbsd-7/landisk/20141002/
 gcc48/ is by the normal release binaries in NetBSD7.0_BETA,
 gcc45/ is by binarries built with -V HAVE_GCC=45 in netbsd-7 tree.

>How-To-Repeat:
1) install NetBSD 7.0_BETA to NetBSD/sh3 port
2) build pkgsrc/pkgtools/digest
or 
2') run atf-run in /usr/tests/fs/psshfs



>Fix:
no idea.

>Release-Note:

>Audit-Trail:
From: Yasushi Oshima <oshima-ya@yagoto-urayama.jp>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-sh3/49253: NetBSD/sh3 7.0_BETA binaries made by gcc48
 strange somewhere.
Date: Thu, 29 Jan 2015 00:22:28 +0900 (JST)

 I wrote:
 > 1) For building pkgsrc, the gcc occurs SIGSEGV.

 This is gcc's bug: PR target/64479 [SH] wrong optimization delayed-branch

 It has been fixed in -current.
  http://mail-index.netbsd.org/source-changes/2015/01/15/msg062383.html

 > 2) When atf-run in /usr/tests/fs/psshfs, it fails. 
 >  the mount_psshfs got signal 4(SIGILL). it is very strange.

 This problem has been caused by a bug of swapcontext(3),
 not gcc48.
 Psshfs is puffs and libpuffs uses swapcontext(3) inside.
 this problem will be solved by fix for PR/49597,


 Please close this PR/49253 when the fix of GCC48 is applied
 to netbsd-7. 

 Thanks.

State-Changed-From-To: open->closed
State-Changed-By: skrll@NetBSD.org
State-Changed-When: Wed, 28 Jan 2015 16:21:24 +0000
State-Changed-Why:
Fixed in -current and netbsd-7


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.