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

Haveged Crashing On Boot - Segv #64

Closed weaselBuddha closed 3 years ago

weaselBuddha commented 3 years ago

Systemd reports failure, as does running from the command line, SegFault

OS: Ubuntu 18.04 (Esxi VM) Kernel: 5.10.71-xanmod1 #0~git20211006.8e0ccfa SMP PREEMPT

     PID: 21612 (haveged)
       UID: 0 (root)
       GID: 0 (root)
    Signal: 11 (SEGV)
 Timestamp: Mon 2021-10-11 04:14:52 CEST (4min 8s ago)

Command Line: /usr/sbin/haveged --Foreground --verbose=1 -w 1024 Executable: /usr/sbin/haveged Control Group: /user.slice/user-1000.slice/session-3.scope Unit: session-3.scope Slice: user-1000.slice Session: 3 Owner UID: 1000 ( ) Boot ID: d0aa65c8069044f3952c3382a5523832 Machine ID: 7ae74b38bb314eb08357f142b6314be3 Hostname: Storage: /var/lib/systemd/coredump/core.haveged.0.d0aa65c8069044f3952c3382a5523832.21612.1633918492000000.lz4 Message: Process 21612 (haveged) of user 0 dumped core.

            Stack trace of thread 21612:
            #0  0x00007f82be920a7d havege_rng (libhavege.so.1)
            #1  0x000056492b402284 n/a (haveged)
            #2  0x00007f82be54fbf7 __libc_start_main (libc.so.6)
            #3  0x000056492b4024ba n/a (haveged)

Trying to use haveged to address entropy starvation that is creating problems for Apache and PHP-FPM at boot (no HWRNG)

jirka-h commented 3 years ago

Hi,

I'm sorry to hear that.

Which version of haveged are you using? Could you please try to use Ubuntu 20.04 and send me the outcome?

Thanks Jirka

weaselBuddha commented 3 years ago

apt install haveged : haveged is already the newest version (1.9.1-6).

Download and compile the most recent? Upgrading to 20.04 is not an option.

jirka-h commented 3 years ago

Hi,

could you please try to install the latest haveged : https://github.com/jirka-h/haveged/releases/tag/v1.9.15

and compile it with ./configure make

If the compilation is successful, install it with sudo make install

Thanks Jirka

weaselBuddha commented 3 years ago

Ok, that fixed it.

To make on 18.04 I had to:

touch aclocal.m4 configure Makefile.am Makefile.in

To address the problem of "make error - aclocal-1.16: command not found" (18.04 has aclocal 1.15)

I also used the haveged.service from the ubuntu repo install

Command line, via systemd:

/usr/local/sbin/haveged --Foreground --verbose=1 -w 1024

jirka-h commented 3 years ago

Hi,

I'm glad that the new version is working for you!

I'm sorry for the problems with compilation. Next time, you can use autoreconf -fiv - it will generate a new ./configure script for your system.

autoreconf -fiv
./configure --disable-enttest --enable-nistest --disable-static
make

Cheers, Jirka