NetBSD Problem Report #55641

From www@netbsd.org  Thu Sep  3 18:40:26 2020
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2FC5B1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  3 Sep 2020 18:40:26 +0000 (UTC)
Message-Id: <20200903184025.0F63B1A9239@mollari.NetBSD.org>
Date: Thu,  3 Sep 2020 18:40:25 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Recent changes to random/entropy "pkgsrc devel brick" an Intel Ivy Bridge system, with workaround
X-Send-Pr-Version: www-1.0

>Number:         55641
>Category:       kern
>Synopsis:       Recent changes to random/entropy "pkgsrc devel brick" an Intel Ivy Bridge system, with workaround
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 03 18:45:00 +0000 2020
>Last-Modified:  Fri Sep 04 02:30:01 +0000 2020
>Originator:     David Shao
>Release:        NetBSD current after a couple of weeks ago
>Organization:
>Environment:
NetBSD xxxxxx.xxx 9.99.72 NetBSD 9.99.72 (GENERIC) #1: Thu Sep  3 08:36:53 PDT 2020  xxxxxx.xxx:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
After updating NetBSD current a couple of weeks ago, building pkgsrc devel/glib2 would stop on an Intel Ivy Bridge machine (Asus P8H77-V) motherboard, i3 CPU) at a line ending in something like

. output

That is what I mean by "pkgsrc devel bricking".  Rebuilding the system, reinstalling the system, nothing will fix this.

Pressing Ctrl-C, on this system, I discovered building devel/glib2 stopped in a line calling a random number function.  Then I remember seeing on boot a line flashing by talking about entropy.

This problem does not appear at all on an Intel Eagle Lake system and on a Comet Lake system.  Therefore it will not appear across a wide variety of machines.  But from what I am seeing in the mailing lists, it will appear for some number of contributors and will render their machines useless for further pkgsrc development unless worked around.

Why Ivy Bridge?  I believe it introduced the RDRAND function.  It would not surprise me if a first generation implementation had some edge cases.

>How-To-Repeat:

>Fix:
Look up a posting:

HEADS UP: Entropy overhaul

Date: Fri, 1 May 2020 21:10:58 +0000

Apply the following two lines as root as a workaround:

dd if=/dev/urandom of=/dev/random bs=32 count=1
sysctl -w kern.entropy.consolidate=1

In the long run, it seems unlikely a fix will ever be applied since the problem occurs for a small number of older machines.  But there must be some way to communicate to people upgrading to current, or later to a release, to apply the workaround to "pkgsrc devel unbrick" their systems.

>Audit-Trail:
From: Taylor R Campbell <riastradh@NetBSD.org>
To: davshao@gmail.com
Cc: gnats-bugs@NetBSD.org
Subject: Re: kern/55641: Recent changes to random/entropy "pkgsrc devel brick" an Intel Ivy Bridge system, with workaround
Date: Fri, 4 Sep 2020 02:26:00 +0000

 > Date: Thu,  3 Sep 2020 18:40:25 +0000 (UTC)
 > From: davshao@gmail.com
 > 
 > After updating NetBSD current a couple of weeks ago, building pkgsrc
 > devel/glib2 would stop on an Intel Ivy Bridge machine (Asus P8H77-V)
 > motherboard, i3 CPU) at a line ending in something like
 > 
 > . output
 > 
 > That is what I mean by "pkgsrc devel bricking".  Rebuilding the
 > system, reinstalling the system, nothing will fix this.
 > 
 > Pressing Ctrl-C, on this system, I discovered building devel/glib2
 > stopped in a line calling a random number function.  Then I remember
 > seeing on boot a line flashing by talking about entropy.

 Can you please share the dmesg output, and share whatever kind of
 trace led you to conclude `building devel/glib2 stopped in a line
 calling a random number function'?  Can you also share any relevant ps
 or pstree output?

 When did you last update before your most recent update a couple of
 weeks ago?

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.