NetBSD Problem Report #57419

From www@netbsd.org  Thu May 18 00:37:48 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 DCE2C1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 18 May 2023 00:37:48 +0000 (UTC)
Message-Id: <20230518003746.E7EA81A9239@mollari.NetBSD.org>
Date: Thu, 18 May 2023 00:37:46 +0000 (UTC)
From: jspath55@gmail.com
Reply-To: jspath55@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Automated test failures on RPi0W related to floating point math processor
X-Send-Pr-Version: www-1.0

>Number:         57419
>Category:       lib
>Synopsis:       Automated test failures on RPi0W related to floating point math processor
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 18 00:40:00 +0000 2023
>Last-Modified:  Thu May 18 18:20:01 +0000 2023
>Originator:     Jim Spath
>Release:        10.0_BETA
>Organization:
>Environment:
NetBSD nzerow 10.0_BETA NetBSD 10.0_BETA (RPI) #0: Mon May 15 10:40:13 UTC 2023  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/RPI evbarm

>Description:
I ran the full automated test framework on a Raspberry Pi 0 W. Among the failures were 10 test cases, each related to floating point math.

lib/libc/gen/t_fpclassify:fpclassify_double,
lib/libc/gen/t_fpclassify:fpclassify_float,
lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_double,
lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_float,
lib/libc/gen/t_fpsetmask:fpsetmask_unmasked_long_double,
lib/libc/gen/t_siginfo:sigfpe_flt,
lib/libm/t_exp:exp2_powers,
lib/libm/t_ldexp:ldexp_denormal,
lib/libm/t_ldexp:ldexp_denormal_large,
lib/libm/t_ldexp:ldexp_underflow,

One example from above:

tps-count: 1
tp-start: 1684316405.482514, lib/libm/t_exp, 1
tc-start: 1684316405.482848, exp2_powers
tc-se:*** Check failed: subtest 23: exp2f(-127) is 0 (0x0.00000000000000p+0) not 5.87747e-39 (0x1.0000000000000p-127), error 1 (0x1.000000p+0) > 0
tc-se:*** Check failed: subtest 24: exp2f(-128) is 0 (0x0.00000000000000p+0) not 2.93874e-39 (0x1.0000000000000p-128), error 1 (0x1.000000p+0) > 0
tc-end: 1684316405.556077, exp2_powers, failed, 2 checks failed; see output for more details
tp-end: 1684316405.569460, lib/libm/t_exp

One reference I found related to this:

https://mail-index.netbsd.org/port-arm/2015/02/23/msg002872.html
"earmv6hf IEEE754 underflow problem"

That thread ends with:
https://mail-index.netbsd.org/port-arm/2015/02/25/msg002882.html
~
"The armv6 vfp needs exception code to do denormals properly and that code has not been written.  Until that code is written, flush to zero is enforced."
~



>How-To-Repeat:
Run the listed test cases on a Pi Zero W.
>Fix:
Unknown.

>Audit-Trail:
From: Jim Spath <jspath55@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: lib/57419
Date: Thu, 18 May 2023 14:19:38 -0400

 I ran the same test cases that had failed on the RPi 0W (earmv6hf) on
 an RPi 02w (aarch64) and found that some passed but others were
 skipped. None of them failed.

 $ grep tc-end tests_arm02w.log
 tc-end: 1684374619.174517, fpclassify_double, passed
 tc-end: 1684374619.571917, fpclassify_float, passed
 tc-end: 1684374620.392177, fpsetmask_unmasked_double, skipped, FPU
 does not implement traps on FP exceptions
 tc-end: 1684374620.666940, fpsetmask_unmasked_float, skipped, FPU does
 not implement traps on FP exceptions
 tc-end: 1684374621.37833, fpsetmask_unmasked_long_double, skipped, FPU
 does not implement traps on FP exceptions
 tc-end: 1684374621.839611, sigfpe_flt, skipped, FPU does not implement
 traps on FP exceptions
 tc-end: 1684374622.868218, exp2_powers, passed
 tc-end: 1684374623.590447, ldexp_denormal, passed
 tc-end: 1684374623.897221, ldexp_denormal_large, passed
 tc-end: 1684374624.117534, ldexp_underflow, passed

 The cases that were skipped might also need to be skipped on this CPU variant?

 The dmesg output shows the CPU/FPU types:
 [     1.000000] simplebus0 at armfdt0: Raspberry Pi Zero W Rev 1.1
 [     1.000000] cpu0 at cpus0: 700 MHz ARM1176JZ-S r0p7 (ARM11J V6ZK core)
 [     1.000000] vfp0 at cpu0: VFP11, rounding, exceptions

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.