Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[helios4] sshd service slow to start (SOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8628
Location: ~Brussels - Belgique

PostPosted: Thu Aug 22, 2019 7:37 am    Post subject: [helios4] sshd service slow to start (SOLVED) Reply with quote

Hello,

On my helios4 (armada 388), the sshd service is really slow to start.
The process ssh-keygen -A takes minutes to run.
Code:
# time /etc/init.d/sshd start
 * Starting sshd ...                                                      [ ok ]

real    42m11,129s
user    0m0,130s
sys     0m0,041s


I also see in dmesg "random: udevd: uninitialized urandom read (16 bytes read)".

Could it be related to random kernel modules?
_________________
Kind regards,
Xavier Miller


Last edited by xaviermiller on Thu Aug 22, 2019 2:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 2646
Location: Frankfurt, Germany

PostPosted: Thu Aug 22, 2019 11:23 am    Post subject: Reply with quote

It could be related to random number generation initialization. Look for a message like:
Code:
[ 1057.771583] random: crng init done

Some users suggest to install and use 'haveged'.

See this thread: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912087, especially https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=912087#275 (look at the footnote) and the follow-up-post.
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8628
Location: ~Brussels - Belgique

PostPosted: Thu Aug 22, 2019 12:29 pm    Post subject: Reply with quote

Hi!,
dmesg | grep random:
[    1.009381] random: fast init done
[    1.374161] random: java-config-2: uninitialized urandom read (24 bytes read)
[    3.642413] random: udevd: uninitialized urandom read (16 bytes read)
[    3.643400] random: udevd: uninitialized urandom read (16 bytes read)
[    3.643454] random: udevd: uninitialized urandom read (16 bytes read)
[    5.171498] urandom_read: 4 callbacks suppressed
[    5.171501] random: ln: uninitialized urandom read (6 bytes read)
[    5.725969] random: mktemp: uninitialized urandom read (10 bytes read)
[ 2639.515546] random: crng init done


The HW Random kernel option was in module, but it didn't help.

Emerging haveged and running it at boot solved the entropy-based random problem
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 647
Location: EU

PostPosted: Thu Aug 29, 2019 9:28 pm    Post subject: Reply with quote

haveged is no longer developed and becoming quickly obsolete, the successor is jitterentropy http://www.chronox.de/jent.html kernel module that can be used with a modern rngd ... I used it with gentoo for some time already.
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6921

PostPosted: Thu Aug 29, 2019 11:38 pm    Post subject: Reply with quote

erm67 wrote:
haveged is no longer developed

Looks quite alive to me.
Back to top
View user's profile Send private message
erm67
l33t
l33t


Joined: 01 Nov 2005
Posts: 647
Location: EU

PostPosted: Fri Aug 30, 2019 8:15 am    Post subject: Reply with quote

well ... alive ... 1 commit in 2018 0 in 2017 ... 8 commits in 2019 fixing ancient bugs never cared of ...

There is no point using haveged anyway since jitterentrpy support is now in rngd officially and in the linux kernel :-)

https://github.com/torvalds/linux/blob/master/crypto/jitterentropy.c

If the kernel is recent enough of course.
_________________
Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia

My fediverse account: @erm67@erm67.dynu.net
Back to top
View user's profile Send private message
xaviermiller
Bodhisattva
Bodhisattva


Joined: 23 Jul 2004
Posts: 8628
Location: ~Brussels - Belgique

PostPosted: Mon Sep 02, 2019 6:37 am    Post subject: Reply with quote

Hi,

For now, haveged works well, but I can take a look at the other entropy generators ;)
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum