jirka-h / haveged

Entropy daemon ![Continuous Integration](https://github.com/jirka-h/haveged/workflows/Continuous%20Integration/badge.svg)
GNU General Public License v3.0
273 stars 34 forks source link

segfault on root-switch from initrd to real root #8

Closed v-fox closed 5 years ago

v-fox commented 6 years ago

When systemd switches into real root on my openSUSE Tumbleweed system, haveged crashes with this in kernel log: [ 7.077689] haveged[556]: segfault at 55e02e096000 ip 00007fa8036dad5d sp 00007ffe4e45f520 error 6 in libhavege.so.1.1.0[7fa8036da000+15000]. It doesn't even seem to able to load debug symbols from the real root. However, immediately after that, systemd auto-restarts it and it runs fine.

sudo journalctl -o short-full -b 0 -u haveged shows:

-- Logs begin at Sun 2018-03-18 07:45:02 +05, end at Thu 2018-10-25 20:23:49 +05. --
Thu 2018-10-25 01:13:39 +05 arsenal haveged[556]: haveged: listening socket at 3
Thu 2018-10-25 01:13:41 +05 arsenal haveged[556]: haveged: restart in new root: /sysroot
Thu 2018-10-25 01:13:41 +05 arsenal haveged[556]: haveged: listening socket at 3
Thu 2018-10-25 01:13:43 +05 arsenal systemd[1]: haveged.service: Main process exited, code=dumped, status=11/SEGV
Thu 2018-10-25 01:13:43 +05 arsenal systemd[1]: haveged.service: Failed with result 'core-dump'.
Thu 2018-10-25 01:13:43 +05 arsenal systemd[1]: haveged.service: Consumed 3.429s CPU time
Thu 2018-10-25 01:13:43 +05 arsenal systemd[1]: haveged.service: Service RestartSec=250ms expired, scheduling restart.
Thu 2018-10-25 01:13:43 +05 arsenal systemd[1]: haveged.service: Scheduled restart job, restart counter is at 1.
Thu 2018-10-25 01:13:44 +05 arsenal systemd[1]: Stopped Entropy Daemon based on the HAVEGE algorithm.
Thu 2018-10-25 01:13:44 +05 arsenal systemd[1]: haveged.service: Consumed 3.429s CPU time
Thu 2018-10-25 01:13:44 +05 arsenal systemd[1]: Started Entropy Daemon based on the HAVEGE algorithm.
Thu 2018-10-25 01:13:44 +05 arsenal haveged[1228]: haveged: listening socket at 3
jirka-h commented 5 years ago

I don't have openSUSE Tumbleweed installation - could you please try to debug the problem and get the location in the program where SEGV appears? Thanks!

v-fox commented 5 years ago

I don't have openSUSE Tumbleweed installation - could you please try to debug the problem and get the location in the program where SEGV appears? Thanks!

I have no idea how to debug stuff in initrd (I doubt there is non-super-hacky way to make dracut get debug-symbols there and also actually use them) BUT with some update the segfault just stopped, I don't see it anymore in logs. So, I guess there is no reason to keep that open.