RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1573090 - systemd crashes after double sending SIGBUS or SIGFPE
Summary: systemd crashes after double sending SIGBUS or SIGFPE
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-30 07:50 UTC by Lukas Herbolt
Modified: 2021-02-15 07:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-15 07:38:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vmcore dmesg (30.68 KB, text/plain)
2018-04-30 07:50 UTC, Lukas Herbolt
no flags Details

Description Lukas Herbolt 2018-04-30 07:50:53 UTC
Created attachment 1428700 [details]
vmcore dmesg

Description of problem:
systemd (pid 1) crashes after sending two SIGBUS or SIGFPE.

Version-Release number of selected component (if applicable):
[root@fastvm-rhel-7-2-25 ~]# rpm -q systemd
systemd-219-19.el7.x86_64
[root@fastvm-rhel-7-2-25 ~]# /usr/lib/systemd/systemd --version
systemd 219
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN

How reproducible:
everytime 

Steps to Reproduce:
1. boot system
2. kill -7 1 
3. kill -7 1 

Actual results:
systemd crashes which leads to crash of the system

Expected results:
no crash 

Additional info:
[ 2232.472981] systemd[1]: segfault at 7fff7d20cff0 ip 00007f095e63b1a7 sp 00007fff7d20cee0 error 6 in libc-2.17.so[7f095e5f4000+1b8000]
[ 2232.475325] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Comment 2 Jan Synacek 2018-05-03 07:58:38 UTC
(In reply to Lukas Herbolt from comment #0)
> Expected results:
> no crash 

How do you expect no crash after sending SIGBUS? The expected behavior on a linux kernel is to crash with a core dump.

Comment 3 Michal Sekletar 2018-05-09 09:45:07 UTC
[ 2232.475325] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Above shouldn't happen. Instead, systemd should invoke crash handling routine in which it forks off a new process which  (optionally) stores coredump and PID1 then enters a state in which does nothing except handling zombies (while (true) { wait() }).

PID1 must never call exit() or exit_group().

Comment 4 Lukas Herbolt 2018-05-25 09:40:35 UTC
(In reply to Jan Synacek from comment #2)
> (In reply to Lukas Herbolt from comment #0)
> > Expected results:
> > no crash 
> 
> How do you expect no crash after sending SIGBUS? The expected behavior on a
> linux kernel is to crash with a core dump.

When the pid 1 starts it sets a crash handler for signals:

SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT

After sending one of this it goes to freeze() where if it just waits for zombie process or ges to pause() and from there the original signal handler is no longer takes care about the signals. 


> [ 2232.475325] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

> Above shouldn't happen. Instead, systemd should invoke crash handling routine 
> in which it forks off a new process which  (optionally) stores coredump and 
> PID1 then enters a state in which does nothing except handling zombies (while 
> (true) { wait() }).

Yes, this is what is happening now. If I am reading the code correctly during the coredump handling the .sa_handler is set to nop_handler. So after the second SIGBUS or other from above mentioned signals the pid 1 dies. Which ends with crashed kernel.

I am not saying it is wrong behavior, but if it is desired, it should be in the documentation.

Comment 7 RHEL Program Management 2021-02-15 07:38:43 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


Note You need to log in before you can comment on or make changes to this bug.