random pool entropy starvation in initrd with parse-kickstart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Trying to write down some of the things I know so that I don't forget
and so that maybe someone else can figure this out.

I've been testing with a PXE setup using rawhide boot.iso's that I've
created. I'm injecting the modified code into the initrd by adding
,/path/to/extra.img to the initrd PXE entry. This also works for adding
the kickstart at /

If parse-kickstart is run before the kernel initializes the nonblocking
random pool it appears to starve the system and it takes anywhere from
several minutes to forever for the pool to be initialized and for the
boot to continue.

There doesn't seem to be much of anything feeding the entropy pool in
the initrd.  https://github.com/rhinstaller/anaconda/pull/458 waits for
some number of bits before continuing, printing what's available as it
waits. When running parse-kickstart early the pool sits at 0 pretty much
forever. When running it later it starts around 50, pool initialization
seems to happen at around 300 (even though the code in the kernel
random.c is checking for 128).

It is worse with inst.ks=file, which will hang nearly forever. Moving it
to run in the initqueue with wwoods' patch improves things, it
eventually runs so that's an improvement.  inst.ks=http will eventually
run, but it may be minutes (I've seen as long as 5 in non-exhaustive
timing tests).

I tried reducing the random.py value from 2500 back to 32. This was not
a quick fix, it still delays. I also tried skipping the initialization
by setting a=None and that made no observable differece. This probably
means that there is more to this than just the python 3.5 change.

I tried adding qemu and qemu-net to the initrd with lorax, thinking that
virtio-rng would magically start feeding entropy from the host. It
didn't appear to help, but also doesn't hurt. Maybe rngd is needed? Not
sure how well that would work with running in the initrd.

I'm not sure where to go next with this, reducing/removing the random.py
init and still having it get stuck would seem to indicate some other
thing is involved, but david shea has straced it and it is getting stuck
in the python read from /dev/urandom.

Also, things boot normally if inst.ks isn't passed. pool initialization
happens at about 14 seconds.


-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list



[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux