Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #61035 > unrolled thread
| Started by | 積丹尼 Dan Jacobson <jidanni@jidanni.org> |
|---|---|
| First post | 2018-05-16 09:00 +0200 |
| Last post | 2018-12-15 00:50 +0100 |
| Articles | 10 — 4 participants |
Back to article view | Back to linux.debian.kernel
Bug#898814: When I log in, it hangs until crng init done 積丹尼 Dan Jacobson <jidanni@jidanni.org> - 2018-05-16 09:00 +0200
Bug#898814: When I log in, it hangs until crng init done Vincent Lefevre <vincent@vinc17.net> - 2018-07-24 16:10 +0200
Bug#898814: When I log in, it hangs until crng init done Xilin Sun <s.sn.giraffe@gmail.com> - 2018-12-12 23:30 +0100
Bug#898814: When I log in, it hangs until crng init done Yves-Alexis Perez <corsac@debian.org> - 2018-12-14 10:30 +0100
Bug#898814: When I log in, it hangs until crng init done Yves-Alexis Perez <corsac@debian.org> - 2018-12-14 11:10 +0100
Bug#898814: When I log in, it hangs until crng init done Vincent Lefevre <vincent@vinc17.net> - 2018-12-14 11:30 +0100
Bug#898814: When I log in, it hangs until crng init done Vincent Lefevre <vincent@vinc17.net> - 2018-12-14 11:40 +0100
Bug#898814: When I log in, it hangs until crng init done Xilin Sun <s.sn.giraffe@gmail.com> - 2018-12-15 00:10 +0100
Bug#898814: When I log in, it hangs until crng init done Xilin Sun <s.sn.giraffe@gmail.com> - 2018-12-15 00:20 +0100
Bug#898814: When I log in, it hangs until crng init done Xilin Sun <s.sn.giraffe@gmail.com> - 2018-12-15 00:50 +0100
| From | 積丹尼 Dan Jacobson <jidanni@jidanni.org> |
|---|---|
| Date | 2018-05-16 09:00 +0200 |
| Subject | Bug#898814: When I log in, it hangs until crng init done |
| Message-ID | <vPYzL-6gn-1@gated-at.bofh.it> |
Package: linux-image-4.16.0-1-amd64 I am also experiencing: https://unix.stackexchange.com/questions/442698/when-i-log-in-it-hangs-until-crng-init-done
[toc] | [next] | [standalone]
| From | Vincent Lefevre <vincent@vinc17.net> |
|---|---|
| Date | 2018-07-24 16:10 +0200 |
| Message-ID | <wf6aJ-7kj-3@gated-at.bofh.it> |
| In reply to | #61035 |
On 2018-05-16 14:55:07 +0800, 積丹尼 Dan Jacobson wrote: > I am also experiencing: > https://unix.stackexchange.com/questions/442698/when-i-log-in-it-hangs-until-crng-init-done I have the same problem (when logging via lightdm). One of the answers says "Apparently updating util-linux 2.32 should fix the issue" but this is not true since I have util-linux 2.32-0.1. -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
[toc] | [prev] | [next] | [standalone]
| From | Xilin Sun <s.sn.giraffe@gmail.com> |
|---|---|
| Date | 2018-12-12 23:30 +0100 |
| Message-ID | <x4laV-2yG-3@gated-at.bofh.it> |
| In reply to | #61035 |
On Wed, 16 May 2018 14:55:07 +0800 =?utf-8?B?56mN5Li55bC8?= Dan Jacobson <jidanni@jidanni.org> wrote: > Package: linux-image-4.16.0-1-amd64 > > I am also experiencing: > https://unix.stackexchange.com/questions/442698/when-i-log-in-it-hangs-until-crng-init-done I am also experiencing this bug on my sid amd64 on a laptop (Acer Aspire S3). Linux 4.18.0-3-amd64 #1 SMP Debian 4.18.20-2 (2018-11-23) x86_64 GNU/Linux Installing and enabling haveged (http://www.issihosts.com/haveged/) solved this issue for me.
[toc] | [prev] | [next] | [standalone]
| From | Yves-Alexis Perez <corsac@debian.org> |
|---|---|
| Date | 2018-12-14 10:30 +0100 |
| Message-ID | <x4RXb-692-1@gated-at.bofh.it> |
| In reply to | #62716 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On Wed, 2018-12-12 at 14:25 -0800, Xilin Sun wrote: > On Wed, 16 May 2018 14:55:07 +0800 =?utf-8?B?56mN5Li55bC8?= Dan > Jacobson <jidanni@jidanni.org> wrote: > > Package: linux-image-4.16.0-1-amd64 > > > > I am also experiencing: > > https://unix.stackexchange.com/questions/442698/when-i-log-in-it-hangs-until-crng-init-done > > I am also experiencing this bug on my sid amd64 on a laptop (Acer Aspire > S3). > > Linux 4.18.0-3-amd64 #1 SMP Debian 4.18.20-2 (2018-11-23) x86_64 GNU/Linux > > Installing and enabling haveged (http://www.issihosts.com/haveged/) > solved this issue for me. Something puzzles me with all those issues: as far as I can tell, on most install, systemd-random-seed.service should save a seed at shutdown and restore it at startup, and this (I think) should be enough to properly init the RNG. Can you check if the service has been run in your case? - -- Yves-Alexis -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAlwTduMACgkQ3rYcyPpX RFtASggAxyL/vgfbbHNTsWpyXKuTlXmPJFTWGYTsZ8uVB0t+8ndehIyr4XHihEpe 3F9VyqRtBXqNN4wtsw0rb199lXZTkxJJ5DOHWRKR5fnlsVYo2hv2PJtchNM89OpK jXyuNuIooAZjpQf+xan3JSJRSEHhaBqcNp1AzQy8I3Sbw+rFil19jVLja7orOrbr ODR0zZyjQCtE5W7Q8yjiFE/JrnvvATQ8fndGrVA3gjydRx53gMqgvVvE+hOwySqL z8jdmgUeh2mtj/z/XdGeDM8cavqOLFzI1NBGiF0iJJlDuJR3ljYzqaskVIyy8ezr ZlQ3IOPkbdteOOtQq5ri5ClHK/FLcw== =5t4I -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | Yves-Alexis Perez <corsac@debian.org> |
|---|---|
| Date | 2018-12-14 11:10 +0100 |
| Message-ID | <x4SzT-6BH-1@gated-at.bofh.it> |
| In reply to | #62719 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On Fri, 2018-12-14 at 10:24 +0100, Yves-Alexis Perez wrote: > Something puzzles me with all those issues: as far as I can tell, on most > install, systemd-random-seed.service should save a seed at shutdown and > restore it at startup, and this (I think) should be enough to properly init > the RNG. > > Can you check if the service has been run in your case? Hi again, actually don't bother, I was pointed to [1] which has explanations. The random seed load is done by just writing to /dev/urandom which doesn't credit entropy [2]. But there's apparently an RFC [3] for crediting that. It's just a bit complicated to impose trust on downstream users. [1] https://bugs.debian.org/912087#118 [2] https://sources.debian.org/src/systemd/239-15/src/random-seed/random-seed.c/#L108 [3] https://github.com/systemd/systemd/pull/10621 I don't have good solutions right now. With 4.19 and if your CPU has an RNG you're willing to trust, you'll be able to pass random.trust_cpu=yes to the kernel command line, which should help seeding the RNG. Regards, - -- Yves-Alexis -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8vi34Qgfo83x35gF3rYcyPpXRFsFAlwTgDgACgkQ3rYcyPpX RFsyoAgAkbtHav7ce39vm+XnPJJeH7mBNRd3ff28Uy3JMQcweet1jKcqMDm0po/T 4f+zCGhHuR6/spuO+esHF7/jSRG8QW00jSqW7+9HW8EdUu8MdYMyg6/119U7RLXm BqrjcXlWgpDYS+QcTGV939EAlhhA1QvpftuZ5stzLnl1Q4OTiMEfSCubFACB0knl q7tpEUQTFywFD4oSAXiShLacUwSbxDkBbUcjZFHiFVpUDCs6JHdZvCt+giNxZrF0 8niQlxzlhaML2976lZQbfOjOVWVY8o2oVdDlr/7KhE1uivXpE82A/LZNCZwM1Dm5 c4OwK5tBoBGSgcTSJw8j9BvtL+ZvWQ== =NQnp -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | Vincent Lefevre <vincent@vinc17.net> |
|---|---|
| Date | 2018-12-14 11:30 +0100 |
| Message-ID | <x4STf-6I1-1@gated-at.bofh.it> |
| In reply to | #62719 |
On 2018-12-14 10:24:51 +0100, Yves-Alexis Perez wrote: > Something puzzles me with all those issues: as far as I can tell, on most > install, systemd-random-seed.service should save a seed at shutdown and > restore it at startup, and this (I think) should be enough to properly init > the RNG. > > Can you check if the service has been run in your case? Interesting. On a machine where I have no such issues, I can see in journalctl info at shutdown: Dec 13 15:44:14 zira systemd[1]: Stopping Load/Save Random Seed... [...] Dec 13 15:44:14 zira systemd[1]: Stopped Load/Save Random Seed. but no such lines on a machine where the issue is present. Any idea of the cause of the difference? -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
[toc] | [prev] | [next] | [standalone]
| From | Vincent Lefevre <vincent@vinc17.net> |
|---|---|
| Date | 2018-12-14 11:40 +0100 |
| Message-ID | <x4T2V-6L3-3@gated-at.bofh.it> |
| In reply to | #62722 |
On 2018-12-14 11:23:39 +0100, Vincent Lefevre wrote: > Interesting. On a machine where I have no such issues, I can see > in journalctl info at shutdown: > > Dec 13 15:44:14 zira systemd[1]: Stopping Load/Save Random Seed... > [...] > Dec 13 15:44:14 zira systemd[1]: Stopped Load/Save Random Seed. > > but no such lines on a machine where the issue is present. Sorry, I have these lines on both machines (I forgot the -1 after "journalctl -b" on one of the machines). -- Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
[toc] | [prev] | [next] | [standalone]
| From | Xilin Sun <s.sn.giraffe@gmail.com> |
|---|---|
| Date | 2018-12-15 00:10 +0100 |
| Message-ID | <x54KJ-5nG-3@gated-at.bofh.it> |
| In reply to | #61035 |
On Fri, 14 Dec 2018 11:04:40 +0100 Yves-Alexis Perez <corsac@debian.org> wrote: > On Fri, 2018-12-14 at 10:24 +0100, Yves-Alexis Perez wrote: > > Something puzzles me with all those issues: as far as I can tell, on most > > install, systemd-random-seed.service should save a seed at shutdown and > > restore it at startup, and this (I think) should be enough to properly init > > the RNG. > > > > Can you check if the service has been run in your case? > > Hi again, > > actually don't bother, I was pointed to [1] which has explanations. The random > seed load is done by just writing to /dev/urandom which doesn't credit > entropy [2]. Hi, That service appears to be running normal on the machine with this bug. As you said, it cannot be the cause. > I don't have good solutions right now. With 4.19 and if your CPU has an RNG > you're willing to trust, you'll be able to pass random.trust_cpu=yes to the > kernel command line, which should help seeding the RNG. The CPU on the machine with the bug does have an hardware RNG. I will test this option once I have linux-image-amd64 4.19 installed.
[toc] | [prev] | [next] | [standalone]
| From | Xilin Sun <s.sn.giraffe@gmail.com> |
|---|---|
| Date | 2018-12-15 00:20 +0100 |
| Message-ID | <x54Up-5qQ-1@gated-at.bofh.it> |
| In reply to | #61035 |
On Fri, 14 Dec 2018 11:04:40 +0100 Yves-Alexis Perez <corsac@debian.org> wrote: > I don't have good solutions right now. With 4.19 and if your CPU has an RNG > you're willing to trust, you'll be able to pass random.trust_cpu=yes to the > kernel command line, which should help seeding the RNG. Just took at look at the /boot/config-4.19.0-trunk-amd64 file from Debian, and saw this: # CONFIG_RANDOM_TRUST_CPU is not set It seems that you have to compile your own kernel to enable random.trust_cpu to try this option at this time.
[toc] | [prev] | [next] | [standalone]
| From | Xilin Sun <s.sn.giraffe@gmail.com> |
|---|---|
| Date | 2018-12-15 00:50 +0100 |
| Message-ID | <x55nr-5zR-1@gated-at.bofh.it> |
| In reply to | #61035 |
On Fri, 14 Dec 2018 15:13:08 -0800 Xilin Sun <s.sn.giraffe@gmail.com> wrote: > On Fri, 14 Dec 2018 11:04:40 +0100 Yves-Alexis Perez <corsac@debian.org> wrote: > > I don't have good solutions right now. With 4.19 and if your CPU has an RNG > > you're willing to trust, you'll be able to pass random.trust_cpu=yes to the > > kernel command line, which should help seeding the RNG. > > Just took at look at the /boot/config-4.19.0-trunk-amd64 file from > Debian, and saw this: > > # CONFIG_RANDOM_TRUST_CPU is not set > > It seems that you have to compile your own kernel to enable > random.trust_cpu to try this option at this time. Just read the message on the patch by Ted Ts'o: https://lkml.org/lkml/2018/7/17/1279 It seems Debian will never ever enable this option by default. Unless you compile your own kernel, rng-tools5 or haveged is the solution to such bugs.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.kernel
csiph-web