1

在 Raspberry Pi Zero 上运行交叉编译的 Rust ARM 二进制文件几个小时后,该进程出现以下错误并出现恐慌:

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 尝试重新启动该进程,但多次失败并出现相同的错误。第二天我能够手动重新启动它,但倒计时再次失败。

我怀疑这是由ws websocket crate间接使用rand v0.6.1 crate引起的,但我不确定。

有没有办法强制这些包使用更新版本的 rand crate,或者我需要调整 Raspbian 上的操作系统设置?我正在运行 Raspbian Stretch (v9),内核 v4.14.79+。作为一个内部监控工具,我的应用程序不需要加密或隐私,所以理想情况下我可以绕过熵问题。

4

0 回答 0