GNU bug report logs

#36380 service urandom-seed takes too long on boot

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #55 received at 36380@debbugs.gnu.org (full text, mbox, reply):

Received: (at 36380) by debbugs.gnu.org; 27 Dec 2020 15:00:34 +0000
From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 27 10:00:34 2020
Received: from localhost ([127.0.0.1]:33237 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1ktXX8-0003AO-3C
	for submit@debbugs.gnu.org; Sun, 27 Dec 2020 10:00:34 -0500
Received: from smtpout2.vodafonemail.de ([145.253.239.133]:38102)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefan-guix@vodafonemail.de>) id 1ktXX5-0003A9-RD
 for 36380@debbugs.gnu.org; Sun, 27 Dec 2020 10:00:33 -0500
Received: from smtp.vodafone.de (unknown [10.2.0.33])
 by smtpout2.vodafonemail.de (Postfix) with ESMTP id ADF9812369D
 for <36380@debbugs.gnu.org>; Sun, 27 Dec 2020 16:00:24 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de;
 s=vfde-smtpout-mb-15sep; t=1609081224;
 bh=Q2Hz4mC8kUzLgW4k+JFcQjszc5p975ZesEZ6hlckElg=;
 h=From:Subject:Date:To;
 b=jUM0WXxfezNU7LpJdWVHEH0JC8RM0pGkGlAMTK2XDvzHaOHoZR89neAxNMV+hQx1y
 /gvc79fhRnuxCzLZMudLUPWFl7uAtql7bzQhgSJcB1fI9Lz2TqR8ba+5aLTXCtIj0r
 64KZpbkMsRsUUb/jEHrirUgEKC3nsxWVbr73h9EA=
Received: from macbook-pro.kuh-wiese.my-router.de
 (dslb-002-206-141-133.002.206.pools.vodafone-ip.de [2.206.141.133])
 (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by smtp.vodafone.de (Postfix) with ESMTPSA id 449A014107E
 for <36380@debbugs.gnu.org>; Sun, 27 Dec 2020 15:00:24 +0000 (UTC)
From: Stefan <stefan-guix@vodafonemail.de>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: service urandom-seed takes too long on boot
Message-Id: <2C14BF51-2755-4315-AC75-26F71F93884D@vodafonemail.de>
Date: Sun, 27 Dec 2020 16:00:23 +0100
To: 36380@debbugs.gnu.org
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
X-Mailer: Apple Mail (2.3124)
X-purgate-type: clean
X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de
X-purgate: This mail is considered clean (visit http://www.eleven.de for
 further information)
X-purgate: clean
X-purgate-size: 2314
X-purgate-ID: 155817::1609081224-00005EB2-0B824C2A/0/0
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 36380
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
Hi!

I’m running Guix in qemu on a NAS. The boot takes sometimes more than 30 minutes, probably waiting to start the urandom-seed service.

Guix is using virtio_rng:

stefan@guix ~$ cat /sys/devices/virtual/misc/hw_random/rng_available
virtio_rng.0 
stefan@guix ~$ cat /sys/devices/virtual/misc/hw_random/rng_current
virtio_rng.0
stefan@guix ~$ guix describe
Generation 1	26. Dezember 2020 15:06:11	(aktuell)
  guix 4969b51
    Repository-URL: https://git.savannah.gnu.org/git/guix.git
    Branch: master
    Commit: 4969b51d175497bfcc354c91803e9d70542b7113


This may be relevant information from dmesg:

[    0.194324] random: get_random_u64 called from __kmem_cache_create+0x30/0x460 with crng_init=0
…
[    3.271767] random: fast init done
…
[    3.497369] random: crng init done
…
[   21.228829] shepherd[1]: Service file-systems has been started.
[   21.243838] shepherd[1]: Service user-homes has been started.
[ 2182.735965] shepherd[1]: Service urandom-seed has been started.
[ 2182.737229] shepherd[1]: Service user-processes has been started.
…

Sometimes the urandom-seed service takes “just” 200 seconds – still a lot.

Interestingly during this time-out the system can’t be pinged, the networking with dhclient doesn't seem to be done.

The Guix installer iso is not using the urandom-seed service and does not suffer from this delay.


The host kernel and qemu are rather old:

~$ uname -a
Linux aaaaaaaa 4.4.59+ #25426 SMP PREEMPT Mon Dec 14 18:48:50 CST 2020 x86_64 GNU/Linux synology_apollolake
~$ /usr/local/bin/qemu-system-x86_64 --version
QEMU emulator version 2.12.1 (-dirty)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers


Qemu is invoked with these arguments concerning random:

-cpu host,+smap,+rdseed,+erms,+smep,+fsgsbase,+3dnowprefetch,+rdtscp,+pdpe1gb,+rdrand,+osxsave,+xsave,+tsc-deadline,+movbe,+x2apic,+pdcm,+xtpr,+tm2,+est,+vmx,+ds_cpl,+dtes64,+pclmuldq,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -object rng-random,id=objrng0,filename=/dev/random -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x1c

The full qemu command is huge. I can provide it on request.


Bye

Stefan



Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Sep 7 09:38:21 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.