After running a cross-compiled Rust ARM binary on a Raspberry Pi Zero for a few hours, the process panics with the following error:
1 Feb 02 12:03:17 raspberrypi monitoring-service[339]: thread 'main'
panicked at 'could not initialize thread_rng: All entropy sources failed (permanently unavailable); cause: getrandom not ready (not ready
yet); cause: Resource temporarily unavailable (os error 11)', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.1/src/rngs/thread.rs:82:17
systemd tried to restart the process, but it failed with the same error several times. The next day I was able to manually restart it, but countdown to when it fails again.
I suspect this is caused by the ws websocket crate indirectly using the rand v0.6.1 crate, but I'm not sure.
Is there a way to force these packages to use a newer version of the rand crate, or do I need to tweak an OS setting on Raspbian? I'm running Raspbian Stretch (v9), kernel v4.14.79+. As an internal monitoring tool, my application requires no encryption or privacy so ideally I can get around the entropy issue.
Aucun commentaire:
Enregistrer un commentaire