L-o-n-g delay for rc.local in systemd on Ubuntu.
Xen
list at xenhideout.nl
Wed Aug 9 12:04:58 UTC 2017
Ken D'Ambrosio schreef op 09-08-2017 13:53:
> OK. Turned out that the problem with my rc.local wasn't *with* my
> rc.local, per se, but rather with the scripts it was invoking. Which
> were written in Ruby -- a language I love. When I finally got around
> to really digging in, I saw that it was hanging not on network stuff
> the script was doing (my first expectation, once I realized that the
> script was at fault), but the initial invocation of the interpreter.
> E.g., if I logged in to the machine quickly, and typed this:
> ruby -e 'print 1'
> it would take *three to five minutes* to execute. Using "strace"
> helped me figure out that it was blocking on getrandom(). Apparently,
> as someone on my LUG mailing list noted, Ruby does "eager RNG
> initialization" (as opposed to Python and Perl, which do the "lazy"
> variant). And a newly launched VM -- with no video card, audio card,
> keyboard, or mouse for entropy sources -- has to largely rely on
> network traffic... of which there's very little. (See "newly
> launched.") Catch-22. (Note that this was probably a conscious
> design decision on the part of the Ruby crew; there are downsides and
> upsides to both approaches.)
Reminds me of trying to do random numbers with Awk; the horror.
Well good that you found the answer, I don't know why you wanted to
change the boot sequence, but I guess going in-depth as to those kind of
answers would have been unnecessary ;-) (as it was).
As I wasn't very eager to do.... :p.
Havege sounds nice.
Regards.
More information about the ubuntu-users
mailing list