On Thu, 2017-10-12 at 13:24 +0100, Colin Helliwell wrote:
On 11 October 2017 at 14:56 Thomas Haller <thaller redhat com> wrote: On Wed, 2017-10-11 at 13:49 +0100, colin helliwell ln-systems com wrote:I've noticed that my system has a delay during boot-up, of about 20secs. It *looks* like NM is waiting for urandom - there's no " NetworkManager (version 1.8.2) is starting " message until right after "random: nonblocking pool is initialized ". That might just be a coincidence (though other services etc *have* started by then), but if not then I'm curious what the dependency is (and whether there's a way round it for faster boot). Hi,that is quite possible that NM reads urandom. For example, to generate a key in /var/lib/NetworkManager/secret_key That doesn't seem wrong. We could try to call getrandom() instead, but that probably would block just as long. ThomasThanks Thomas. I found your blog related to this - https://blogs.gnom e.org/thaller/category/networkmanager/ - is the use of urandom only related to WiFi and/or IPv6 functionality (which I don't need), and could it be disabled with a config setting?
Hi, there are several places that might read urandom. Some might be hard to avoid. For example, src/dhcp/nm-dhcp-client.c does g_rand_new(), which might read /dev/urandom. urandom is documented not to block and be suitable to call, basically anytime. It sounds like a bug if it really would block that long. You could run NM under strace, to see what it's doing. best, Thomas
Attachment:
signature.asc
Description: This is a digitally signed message part