Skip to contentSkip to conversation

syslog-ng test does not work due to lack of random numbers

Buildroot Thomas Petazzoni 2 participants 2 messages Jun 21, 2019 – Jul 29, 2019

lore
Share & tools
lore
#0 lore raw

Hello,

The syslog-ng runtime test is no longer working:

https://gitlab.com/buildroot.org/buildroot/-/jobs/237108732

I had a look, and the problem is that syslog-ng is stuck when starting, waiting for random numbers. strace shows:

[pid 65] open("/dev/random", O_RDONLY|O_LARGEFILE) = 6
[pid 65] _newselect(7, [6], NULL, NULL, NULL

And then nothing.

Adding haveged to the configuration would have been an option, but haveged is started as S21haveged, while syslog-ng is started as S01syslog-ng, so obviously, this won't help.

What should we do ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#1 lore raw

Hello,

Quoted 10 lines · Thomas Petazzoni

The syslog-ng runtime test is no longer working:

https://gitlab.com/buildroot.org/buildroot/-/jobs/237108732

I had a look, and the problem is that syslog-ng is stuck when starting, waiting for random numbers. strace shows:

[pid 65] open("/dev/random", O_RDONLY|O_LARGEFILE) = 6
[pid 65] _newselect(7, [6], NULL, NULL, NULL

Quoted 7 lines

And then nothing.

Adding haveged to the configuration would have been an option, but haveged is started as S21haveged, while syslog-ng is started as S01syslog-ng, so obviously, this won't help.

What should we do ?

We can use VirtIORNG like Peter did for the docker compose test.

We need kernel config CONFIG_HW_RANDOM_VIRTIO=y.
It is not enabled in the 2 binary kernel images we have for test infra. We also need qemu argument -device virtio-rng-pci.

I will cook a patch.

Regards,
Ricardo