Subject: bug#65847: system container gathering entropy takes forever

From: [email-masked]
Date: Sat, 09 Sep 2023 21:40:02 -0000

New containers get stuck with a message similar to the following one:  

guile: warning: failed to install locale  

system container is running as PID 85878W  

ARNING: (guile-user): imported module (guix build utils) overrides core
binding `delete'  

Run 'sudo guix container exec 85878 /run/current-system/profile/bin/bash
--login'  

or run 'sudo nsenter -a -t 85878' to get a shell into it.  

WARNING: (guile-user): imported module (guix build utils) overrides core
binding `delete'  

making '/gnu/store/gkqmm80naf3zw2n20ml11q7xb2nbnglg-system' the current
system...  

WARNING: (guile-user): imported module (guix build utils) overrides core
binding `delete'  

setting up setuid programs in '/run/setuid-programs'...  

populating /etc from /gnu/store/wigi6gny24gpk2inqy19xswsbplqa6fc-etc...  

WARNING: (guile-user): imported module (guix build utils) overrides core
binding `delete'  

WARNING: (guile-user): imported module (guix build utils) overrides core
binding `delete'  

Please wait while gathering entropy to generate the key pair;  

this may take time...  

and the message stays there forever, I have left it running even for more than
half an hour and it doesn't move from there. This is happening even with basic
system container definitions. The previos message was generated when running a
system container with the following system definition:  

(use-modules (gnu)  

(gnu services web))  

(operating-system  

(host-name "container")  

(timezone "Europe/Berlin")  

(file-systems (cons (file-system  

(device (file-system-label "does-not-matter"))  

(mount-point "/")  

(type "ext4"))  

%base-file-systems))  

(bootloader (bootloader-configuration  

(bootloader grub-bootloader)  

(targets '("/dev/sdX"))))  

(services %base-services))  

I also tried sharing /dev/random and /dev/urandom with the host and it still
gets stuck there.  

Any ideas about what could be causing this?