NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Callesoroe
Oct 30, 2013Aspirant
Haveged on ReadyNas Ultra ?
I am running LMS (squeezebox) on my readynas ultra. There is a problem with the Random mix. The problem is that it isn't very random.
The problem could be this that I have read about:
http://www.issihosts.com/haveged/
Is it possible to get Haveged to run on a ReadyNas. And if. How ?
If this really is a problem in the kernel software. Will this not be fixed ????
The problem could be this that I have read about:
http://www.issihosts.com/haveged/
Is it possible to get Haveged to run on a ReadyNas. And if. How ?
If this really is a problem in the kernel software. Will this not be fixed ????
23 Replies
Replies have been turned off for this discussion
- fastfwdVirtuoso
Callesoroe wrote: I am running LMS (squeezebox) on my readynas ultra. There is a problem with the Random mix. The problem is that it isn't very random.
The problem could be this that I have read about:
http://www.issihosts.com/haveged/
I thought that that was unlikely, and I was about to post a response saying so... But then I checked my Pro Pioneer's available entropy and discovered that it was REALLY low -- single digits or low double digits -- and I took those measurements while I was logged in and right after I'd performed some filesystem commands that should have produced a large increase in available entropy.
Maybe there's something on my system that is voraciously consuming entropy; I'll have to investigate further. But I guess it is possible that an additional entropy source like havege could be helpful. - chirpaLuminaryTested on an Ultra 4 running RAIDiator-x86 4.2.23:
# cat /proc/sys/kernel/random/entropy_avail
221
# cat /proc/sys/kernel/random/entropy_avail
131
# wget http://http.us.debian.org/debian/pool/main/h/haveged/haveged_1.4-4_i386.deb
# dpkg -i haveged_1.4-4_i386.deb
Setting up haveged (1.4-4) ...
# cat /proc/sys/kernel/random/entropy_avail
3968
# cat /proc/sys/kernel/random/entropy_avail
3712 - chirpaLuminaryTested on Ultra 4 running ReadyNAS OS 6.1.3:
# cat /proc/sys/kernel/random/entropy_avail
203
# cat /proc/sys/kernel/random/entropy_avail
134
# wget http://http.us.debian.org/debian/pool/main/h/haveged/haveged_1.4-4_amd64.deb
# dpkg -i haveged_1.4-4_amd64.deb
Setting up haveged (1.4-4) ...
[ ok ] Starting haveged (via systemctl): haveged.service.
# cat /proc/sys/kernel/random/entropy_avail
2339
# cat /proc/sys/kernel/random/entropy_avail
2211 - fastfwdVirtuoso
chirpa wrote: # cat /proc/sys/kernel/random/entropy_avail
203
# cat /proc/sys/kernel/random/entropy_avail
134
On my Pro Pioneer running 4.2.24, after 7 hours of uptime, my first read was 3 and I never got a value above 120 bits even after lots of file-access-induced hardware randomness.
Chirpa, I notice that even with haveged running, each of your "cat" invocations seemed to consume around 100 bits of entropy. If you do something like "watch cat /proc/sys/kernel/random/entropy_avail" with haveged running, does the available entropy stay high (or refill when it gets below the read threshold), or does it fall all the way to single digits as it would without haveged? - chirpaLuminaryWhen it drops below 1024 (default), it refills back up to 4000.
# cat /etc/default/haveged
# Configuration file for haveged
# Options to pass to haveged
# -w sets low entropy watermark (in bits)
DAEMON_ARGS="-w 1024"
# while true; do cat /proc/sys/kernel/random/entropy_avail; sleep 1; done
1408
1152
3840
3584
3328
3072
2816
2630
2374
2118
1862
1606
1248
1072
3968
3712
3456
^C - fastfwdVirtuoso
chirpa wrote: When it drops below 1024 (default), it refills back up to 4000.
Good. Thanks for checking, Chirpa.
Callesoroe: If you have SSH root access to your NAS, you can install the package as Chirpa did, with these commands:wget http://http.us.debian.org/debian/pool/main/h/haveged/haveged_1.4-4_i386.deb
dpkg -i haveged_1.4-4_i386.deb - CallesoroeAspirantTHANK YOU GUYS :)
It is installed an running now. I made some random selections on my LMS, and it really seems to work. Again thank you :) - CallesoroeAspirantnas-C1-71-AE:~# cat /proc/sys/kernel/random/entropy_avail
3466
:) - fastfwdVirtuoso
Callesoroe wrote: nas-C1-71-AE:~# cat /proc/sys/kernel/random/entropy_avail
3466
Another test you can do iscat /dev/random
/dev/random blocks while the entropy pool is low, so if haveged is not running you'll see random bytes being generated VERY slowly: a burst of 8 characters every few seconds, or even slower. With haveged running, random characters will be generated almost as fast as your terminal can display them.
Hit ctrl-c to stop the random-character display. - fastfwdVirtuosoOh, and by the way... Going back to your original problem, it still seems odd that LMS should be affected by this issue.
I use MusicIP or Michael Herger's SmartMix plugins for my "random" mixes, so I haven't seen the problem you've described, but I would expect LMS to get its random numbers from /dev/urandom, which should be basically unaffected by the available entropy. The behavior you were seeing, though, seems to indicate that LMS is getting its random stream from /dev/random instead.
It might be worth posting a bug on the slimdevices (or logitech or whatever) bug tracker.
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!