2017-06-28 15:42 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0013358CentOS-7rng-toolspublic2017-06-20 00:43
Reporterkabe 
PrioritynormalSeveritymajorReproducibilityalways
StatusassignedResolutionopen 
Platformi686OSCentOSOS Version7
Product Version7.3.1611 
Target VersionFixed in Version 
Summary0013358: rngd dumps core on kernel-3.10.0-514.21.1.el7.centos.plus.i686 on boot
DescriptionOn boot, /sbin/rngd dumps core.

$ systemctl status -l rngd
* rngd.service - Hardware RNG Entropy Gatherer Daemon
   Loaded: loaded (/usr/lib/systemd/system/rngd.service; enabled; vendor preset: enabled)
   Active: failed (Result: core-dump) since Fri 2017-06-02 15:51:50 JST; 31min ago
  Process: 513 ExecStart=/sbin/rngd -f (code=dumped, signal=SEGV)
 Main PID: 513 (code=dumped, signal=SEGV)

Jun 02 15:51:39 TSPC330-i686 systemd[1]: Started Hardware RNG Entropy Gatherer Daemon.
Jun 02 15:51:39 TSPC330-i686 systemd[1]: Starting Hardware RNG Entropy Gatherer Daemon...
Jun 02 15:51:39 TSPC330-i686 rngd[513]: read error
Jun 02 15:51:39 TSPC330-i686 rngd[513]: read error
Jun 02 15:51:50 TSPC330-i686 systemd[1]: rngd.service: main process exited, code=dumped, status=11/SEGV
Jun 02 15:51:50 TSPC330-i686 systemd[1]: Unit rngd.service entered failed state.
Jun 02 15:51:50 TSPC330-i686 systemd[1]: rngd.service failed.

Manually starting by "systemctl start rngd" works.
Steps To ReproduceUpdate to latest kernel-3.10.0-514.21.1.el7.centos.plus.i686 and reboot.
Additional InformationExamining the corpse in /var/spool/abrt/ccpp-*:
# gdb /sbin/rngd coredump
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-94.el7
...
Core was generated by `/sbin/rngd -f'.
Program terminated with signal 11, Segmentation fault.
#0 x86_rdseed_or_rdrand_bytes () at rdrand_asm.S:165
165 mov %eax, (%edx)

SIGSEGV inside a hand-assembly section.


This may be related to 32-bit specific bug mentioned in
[abrt] rng-tools: x86_rdseed_or_rdrand_bytes(): rngd killed by SIGSEGV
https://bugzilla.redhat.com/show_bug.cgi?id=1276858
I'll try rebuilding rngd with this patch.
Tagsi386
abrt_hash
URL
Attached Files
  • patch file icon rng-tools-32bit-rpmbuild.patch (363 bytes) 2017-06-19 13:21 -
    diff -uNrp rng-tools-5.orig/rdrand_asm.S rng-tools-5/rdrand_asm.S
    --- rng-tools-5.orig/rdrand_asm.S	2017-06-19 13:06:18.076203634 +0000
    +++ rng-tools-5/rdrand_asm.S	2017-06-19 13:11:38.541196211 +0000
    @@ -165,8 +165,8 @@ ENTRY(x86_rdseed_or_rdrand_bytes)
     	mov	%eax, (%edx)
     	add	$4, %edx
     	sub	$4, %esi
    -	jnz	1b
    -	ja	4b
    +	ja	1b
    +	jmp	4b
     5:
     	dec	%ecx
     	rep;nop
    
    patch file icon rng-tools-32bit-rpmbuild.patch (363 bytes) 2017-06-19 13:21 +

-Relationships
+Relationships

-Notes

~0029392

kabe (reporter)

The fix in https://bugzilla.redhat.com/show_bug.cgi?id=1276858 worked;
rngd doesn't coredump on boot.

This is a patch for rnd-tools rpmbuild directory:
https://bugs.centos.org/file_download.php?file_id=20495&type=bug

This is 32-bit specific, so is unlikely to be fixed in upstream RHEL rnd-tools.
This is not a kernel patch (which could be stuffed into centosplus kernel)
but for a userland package.
Was there any provisions for such patch?

~0029520

JohnnyHughes (administrator)

I can change i686 packages which need to be modified .. let me add this to the i686 mod packages and roll in this patch.

~0029521

JohnnyHughes (administrator)

That patch does not work .. what I need is your actual patch named patch-32bit-coredump.patch

~0029522

JohnnyHughes (administrator)

I attached the actual patch that I used and created a new RPM .. I'll sign and upload it shortly

~0029523

JohnnyHughes (administrator)

Before we actually push this update, please verify that these rpms work:

https://buildlogs.centos.org/c7.1611.u/rng-tools/20170619131709/5-8.el7.centos.i386/

(Those are unsigned, directly from the builder)

Please feedback if these solve the problem and are updated by yum from the original c7-i686 packages.

~0029525

kabe (reporter)

The provided rng-tools-5-8.el7.centos.i686.rpm on http://buildlogs fixed the problem;
rngs does not coredump on boot.

[kabe@TSPC330-i686 ~]$ systemctl status -l rngd
* rngd.service - Hardware RNG Entropy Gatherer Daemon
   Loaded: loaded (/usr/lib/systemd/system/rngd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2017-06-20 09:36:58 JST; 1min 44s ago
 Main PID: 488 (rngd)
   CGroup: /system.slice/rngd.service
           `-488 /sbin/rngd -f

Jun 20 09:36:58 TSPC330-i686 systemd[1]: Started Hardware RNG Entropy Gatherer Daemon.
Jun 20 09:36:58 TSPC330-i686 systemd[1]: Starting Hardware RNG Entropy Gatherer Daemon...
Jun 20 09:36:58 TSPC330-i686 rngd[488]: read error
Jun 20 09:36:58 TSPC330-i686 rngd[488]: read error


I guess initial "read error" is something not related to this bug; the rngd itself is working.
+Notes

-Issue History
Date Modified Username Field Change
2017-06-02 07:31 kabe New Issue
2017-06-02 07:31 kabe Tag Attached: i386
2017-06-02 07:57 kabe File Added: rng-tools-32bit-rpmbuild.patch
2017-06-02 08:03 kabe Note Added: 0029392
2017-06-02 10:41 toracat Status new => acknowledged
2017-06-19 12:39 JohnnyHughes Note Added: 0029520
2017-06-19 13:02 JohnnyHughes Note Added: 0029521
2017-06-19 13:18 JohnnyHughes File Deleted: rng-tools-32bit-rpmbuild.patch
2017-06-19 13:21 JohnnyHughes File Added: rng-tools-32bit-rpmbuild.patch
2017-06-19 13:22 JohnnyHughes Note Added: 0029522
2017-06-19 13:42 JohnnyHughes Status acknowledged => feedback
2017-06-19 13:42 JohnnyHughes Note Added: 0029523
2017-06-20 00:43 kabe Note Added: 0029525
2017-06-20 00:43 kabe Status feedback => assigned
+Issue History