Ruby slow to launch (was L-o-n-g delay for rc.local in systemd on Ubuntu.)
Ken D'Ambrosio
ken at jots.org
Tue Aug 8 15:30:46 EDT 2017
On 2017-08-08 15:18, Joshua Judson Rosen wrote:
> The /dev/random interface is considered a legacy
> interface, and
> /dev/urandom is preferred and sufficient in all use cases,
> with the
> exception of applications which require randomness during
> early boot
> time; for these applications, getrandom(2) must be used
> instead,
> because it will block until the entropy pool is initialized.
>
> So, there you go. "until the entropy pool is initialized" is apparently
> about 3 minutes in your case ;)
Yeah... getrandom() apparently pings /dev/urandom by default which, as
per the getrandom manpage, blocks until it has entropy. Sounds like
we've wound up at much the same place: I took some data off of
/dev/random, stored it in a file, and am feeding that to /dev/urandom at
boot time (and re-seeding the file after five minutes' uptime). Alas
(because, you know, deadline), that doesn't seem to be working. Which
is really, really annoying. I'm *still* blocking for three-to-five on
getrandom().
I guess it's time to cut my losses and start this in a different
language. I mean, most of the hard stuff was figuring out *how* to do
things, but I admit, my Perl and Python have grown rusty as I've enjoyed
my Ruby...
-Ken
More information about the gnhlug-discuss
mailing list