NetBSD Problem Report #48948
From www@NetBSD.org Tue Jun 24 20:54:36 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 3A451A6531
for <gnats-bugs@gnats.NetBSD.org>; Tue, 24 Jun 2014 20:54:36 +0000 (UTC)
Message-Id: <20140624205434.E2543A6547@mollari.NetBSD.org>
Date: Tue, 24 Jun 2014 20:54:34 +0000 (UTC)
From: jun@soum.co.jp
Reply-To: jun@soum.co.jp
To: gnats-bugs@NetBSD.org
Subject: RPI:pkgsrc/security/ruby-hmac Floating point exception (core dumped)
X-Send-Pr-Version: www-1.0
>Number: 48948
>Category: port-arm
>Synopsis: RPI:pkgsrc/security/ruby-hmac Floating point exception (core dumped)
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-arm-maintainer
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 24 20:55:00 +0000 2014
>Closed-Date: Sat Jul 19 06:55:48 +0000 2014
>Last-Modified: Sat Jul 19 06:55:48 +0000 2014
>Originator: Jun Ebihara
>Release: RPI.201406190040Z
>Organization:
SOUM Corporation
>Environment:
NetBSD rpi 6.99.44 NetBSD 6.99.44 (RPI.201406190040Z) #0: Thu Jun 19 02:05:51 UTC 2014 builds@b47.netbsd.org:/home/builds/ab/HEAD/evbarm-earmhf/201406190040Z-obj/home/builds/ab/HEAD/src/sys/arch/evbarm/compile/RPI evbarm
>Description:
On RaspberryPI with 201406190040Z ,pkgsrc/security/ruby-hmac make failed with Floating point exception (core dumped).
>How-To-Repeat:
# cd /usr/pkgsrc/security/ruby-hmac
# make
=> Bootstrap dependency digest>=20010302: found digest-20121220
===> Skipping vulnerability checks.
WARNING: No /var/db/pkg/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /var/db/pkg fetch-pkg-vulnerabilities'.
===> Building for ruby200-hmac-0.4.0
=> Removing backup files of patch before build
WARNING: licenses is empty
[1] Floating point exception (core dumped) /usr/bin/env USE...
*** Error code 136
Stop.
make[1]: stopped in /usr/pkgsrc/security/ruby-hmac
*** Error code 1
>Fix:
>Release-Note:
>Audit-Trail:
From: Takahiro HAYASHI <t.hash425@gmail.com>
To: gnats-bugs@NetBSD.org, port-arm-maintainer@netbsd.org
Cc:
Subject: Re: port-arm/48948: RPI:pkgsrc/security/ruby-hmac Floating point
exception (core dumped)
Date: Mon, 14 Jul 2014 23:10:28 +0900
Hello,
Try this patch plz.
It happens after changes on Fri Mar 28 21:39:10 UTC 2014.
> Various MP changes.
> http://mail-index.netbsd.org/source-changes/2014/03/28/msg053432.html
Before arm/vfp/vfp_init.c rev 1.37, vfp_attach() reads f0 and f1
from armreg_mvfr0_read() to only print fpu features list.
Besides this it reads cpu_media_and_vfp_features[N] from
armreg_mvfrN_read() (where N=0,1) and uses them to detect fpu features.
On the other hand, in vfp_init.c rev 1.37 or later vfp_attach() uses
armreg_mvfr0_read() for f0 and f1 (dmesg sez they are same)
to print and detect fpu features except denormals (FTZ).
I have no idea how to detect fpu correctly, but this patch may help
if you prefer pre-1.37 behavior.
Thank you.
Index: src/sys/arch/arm/vfp/vfp_init.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/vfp/vfp_init.c,v
retrieving revision 1.40
diff -p -U 6 -r1.40 vfp_init.c
--- src/sys/arch/arm/vfp/vfp_init.c 15 Jun 2014 23:07:36 -0000 1.40
+++ src/sys/arch/arm/vfp/vfp_init.c 14 Jul 2014 11:54:05 -0000
@@ -331,13 +331,13 @@ vfp_attach(struct cpu_info *ci)
cpu_fpu_present = 1;
cpu_media_and_vfp_features[0] = armreg_mvfr0_read();
cpu_media_and_vfp_features[1] = armreg_mvfr1_read();
if (fpsid != 0) {
uint32_t f0 = armreg_mvfr0_read();
- uint32_t f1 = armreg_mvfr0_read();
+ uint32_t f1 = armreg_mvfr1_read();
aprint_normal("vfp%d at %s: %s%s%s%s%s\n",
device_unit(ci->ci_dev),
device_xname(ci->ci_dev),
model,
((f0 & ARM_MVFR0_ROUNDING_MASK) ? ", rounding" : ""),
((f0 & ARM_MVFR0_EXCEPT_MASK) ? ", exceptions" : ""),
--
t-hash
From: Jun Ebihara <jun@soum.co.jp>
To: gnats-bugs@NetBSD.org, t.hash425@gmail.com
Cc: port-arm-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-arm/48948: RPI:pkgsrc/security/ruby-hmac Floating point
exception (core dumped)
Date: Sat, 19 Jul 2014 07:41:01 +0900 (JST)
From: Takahiro HAYASHI <t.hash425@gmail.com>
Subject: Re: port-arm/48948: RPI:pkgsrc/security/ruby-hmac Floating point exception (core dumped)
Date: Mon, 14 Jul 2014 14:15:01 +0000 (UTC)
> Try this patch plz.
> Index: src/sys/arch/arm/vfp/vfp_init.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/arm/vfp/vfp_init.c,v
> +++ src/sys/arch/arm/vfp/vfp_init.c 14 Jul 2014 11:54:05 -0000
> @@ -331,13 +331,13 @@ vfp_attach(struct cpu_info *ci)
> - uint32_t f1 = armreg_mvfr0_read();
> + uint32_t f1 = armreg_mvfr1_read();
With this patch ,I can make pkgsrc/devel/ruby-delayer
and pkgsrc/security/ruby-hmac again.
related PRs:
port-arm/48817
pkgsrc/devel/ruby-delayer build failed:
Floating point exception (core dumped)
port-arm/48948
pkgsrc/security/ruby-hmac build failed:
Floating point exception (core dumped)
RPI sample image with this patch.
ftp://ftp.netbsd.org/pub/NetBSD/misc/jun/raspberry-pi/2014-07-18-netbsd-raspi-pr48948.img.gz
--
Jun Ebihara
From: "Matt Thomas" <matt@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48948 CVS commit: src/sys/arch/arm/vfp
Date: Fri, 18 Jul 2014 22:54:53 +0000
Module Name: src
Committed By: matt
Date: Fri Jul 18 22:54:53 UTC 2014
Modified Files:
src/sys/arch/arm/vfp: vfp_init.c
Log Message:
fix typo reported in PR/48948
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/arm/vfp/vfp_init.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sat, 19 Jul 2014 06:55:48 +0000
State-Changed-Why:
Patch committed, thank you very much!
>Unformatted:
(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-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.