NetBSD Problem Report #55939

From martin@duskware.de  Wed Jan 20 13:44:25 2021
Return-Path: <martin@duskware.de>
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 652751A923B
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 20 Jan 2021 13:44:25 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: arc4random_uniform() broken on arm?
X-Send-Pr-Version: 3.95

>Number:         55939
>Category:       lib
>Synopsis:       arc4random_uniform() broken on arm?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 20 13:45:00 +0000 2021
>Originator:     Martin Husemann
>Release:        NetBSD 9.99.78
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD space-truckin.duskware.de 9.99.78 NetBSD 9.99.78 (GENERIC) #118: Wed Jan 20 12:45:59 CET 2021 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/evbarm/compile/GENERIC evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:

While trying to update a machine to -current it spent ~20 cpu minutes in
extracting xfont.tgz:

# tar xpzf xfont.tgz
[ 6448.3086516] load: 0.99  cmd: tar 2494 [0x6db0dffe/0] 55.91u 1015.38s 99% 3124k

Attaching gdb showed:

[Switching to LWP 2494 of process 2494]
0x6db0dffe in __udivmodsi4 () from /lib/libc.so.12
(gdb) bt
#0  0x6db0dffe in __udivmodsi4 () from /lib/libc.so.12
#1  0x6db0bd50 in __aeabi_uidivmod () from /lib/libc.so.12
#2  0x6db02a08 in _arc4random_uniform (bound=bound@entry=62)
    at /work/src/lib/libc/gen/arc4random.c:642
#3  0x6db01a68 in __gettemp (
    path=path@entry=0x6de16000 "usr/X11R7/lib/X11/fonts/misc/8x13B-ISO8859-9.pcf.gzXXXXXX", doopen=0x7ffa51b4, doopen@entry=0x7ffa51ac, 
    domkdir=domkdir@entry=0, slen=slen@entry=0, oflags=oflags@entry=0)
    at /work/src/lib/libc/stdio/gettemp.c:89
#4  0x6db01910 in _mkstemp (
    path=0x6de16000 "usr/X11R7/lib/X11/fonts/misc/8x13B-ISO8859-9.pcf.gzXXXXXX") at /work/src/lib/libc/stdio/mkstemp.c:55
#5  0x6df2f9c4 in __archive_mktempx (tmpdir=tmpdir@entry=0x0, 
    template=template@entry=0x6dbbb17c)
    at /work/src/external/bsd/libarchive/dist/libarchive/archive_util.c:409

Unfortunately gdb died:

--Type <RET> for more, q to quit, c to continue without paging--q
terminate called after throwing an instance of 'gdb_exception_quit'
[ 6695.2111432] sorry, pid 2494 was killed: orphaned traced process
Abort (core dumped)


>How-To-Repeat:
no idea, apparently happens more or less randomly

>Fix:
n/a

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.