Bug#897572: urandom hang in early boot

2018-05-09 Thread Yves-Alexis Perez
On Tue, 2018-05-08 at 13:23 +0200, Bjørn Mork wrote: > And sd_id128_randomize() is called from all over the place. I haven't > bothered looking at all the call sites, but would be surprised if not at > least one of them is unconditionally called at boot. > > If I am correct, then I guess this is

Bug#897572: urandom hang in early boot

2018-05-08 Thread Bjørn Mork
Ben Hutchings writes: > On Tue, 2018-05-08 at 11:12 +1200, Ben Caradoc-Davies wrote: >> On 08/05/18 05:34, Laurent Bigonville wrote: >> > Apparently it's also happening for other applications that are starting >> > later during the boot like GDM. >> > Somebody has reported an issue on IRC where G

Bug#897572: urandom hang in early boot

2018-05-07 Thread Ben Caradoc-Davies
On 08/05/18 15:55, Ben Caradoc-Davies wrote: If something calls getrandom without GRND_NONBLOCK while crng_init==1 (during early boot) I now have conclusive evidence that this is the cause of the hang. If I add a printk: diff --git a/drivers/char/random.c b/drivers/char/random.c index cd888d4e

Bug#897572: urandom hang in early boot

2018-05-07 Thread Ben Caradoc-Davies
On 08/05/18 14:00, Ben Hutchings wrote: You keep saying this, but based on my reading of the code I don't see how reads from /dev/urandom can end up blocking. Ben, I think you are right. I have picked through the code in detail and none of the changes affect any substantive logic (except loggi

Bug#897572: urandom hang in early boot

2018-05-07 Thread Ben Hutchings
On Tue, 2018-05-08 at 11:12 +1200, Ben Caradoc-Davies wrote: > On 08/05/18 05:34, Laurent Bigonville wrote: > > Apparently it's also happening for other applications that are starting > > later during the boot like GDM. > > Somebody has reported an issue on IRC where GDM was taking upto 8 > > min

Bug#897572: urandom hang in early boot

2018-05-07 Thread Ben Caradoc-Davies
On 08/05/18 05:34, Laurent Bigonville wrote: Apparently it's also happening for other applications that are starting later during the boot like GDM. Somebody has reported an issue on IRC where GDM was taking upto 8 minutes to start (dmesg was showing several "random: systemd: uninitialized uran

Bug#897572: urandom hang in early boot

2018-05-07 Thread Laurent Bigonville
Hello, Apparently it's also happening for other applications that are starting later during the boot like GDM. Somebody has reported an issue on IRC where GDM was taking upto 8 minutes to start (dmesg was showing several "random: systemd: uninitialized urandom read (16 bytes read)" during bo