Bug 1270524 - systemd segfault in timer_enter_waiting while masking a unit
systemd segfault in timer_enter_waiting while masking a unit
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
23
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-10 11:38 EDT by Sitsofe Wheeler
Modified: 2016-12-20 09:56 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 09:56:41 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sitsofe Wheeler 2015-10-10 11:38:03 EDT
Description of problem:
While trying to mask a timer file that in turn has a subunit override systemd segfaulted.

Version-Release number of selected component (if applicable):
systemd-219-24.fc22.x86_64

How reproducible:
Reproducible every time.

Steps to Reproduce:
1. Run
rm /etc/systemd/system/dnf-makecache.timer.d/override.conf
systemctl unmask dnf-makecache.timer
reboot
.
2. When the system is back up and running log in and run
systemctl edit dnf-makecache.timer
and put the following lines:
[Timer]
OnBootSec=10s
OnUnitInactiveSec=1h
and then save and quit your editor.
3. Run
systemctl mask dnf-makecache.timer
.

Actual results:
The following is printed:
Broadcast message from systemd-journald@<hostname> (Sat 2015-10-10 15:31:20 UTC):

systemd[1]: Caught <SEGV>, dumped core as pid 819.


Broadcast message from systemd-journald@<hostname> (Sat 2015-10-10 15:31:20 UTC):

systemd[1]: Freezing execution.

and it is no longer possible to start/stop systemd units or change runlevels/reboot cleanly.

Expected results:
dnf-makecache.timer unit to be masked out?

Additional info:
Using
echo "/tmp/core" > /proc/sys/kernel/core_pattern
before step 3 allows a core dump to be produced. Looking at the backtrace in the coredump shows the following:
#0  0x00007f433b062d07 in kill () from /lib64/libc.so.6
#1  0x0000563ce32c04dd in crash.lto_priv ()
#2  <signal handler called>
#3  0x0000563ce337240c in timer_enter_waiting ()
#4  0x0000563ce3372d7d in timer_enter_waiting_coldplug ()
#5  0x0000563ce3386226 in manager_coldplug.lto_priv ()
#6  0x0000563ce32b8ef4 in manager_reload ()
#7  0x0000563ce32bb819 in main ()

systemd-219-20 seems to segfault with the same steps. I don't think this is security sensitive because I would imagine normal users would only crash their own systemd using these steps rather than the system one but I'll mark this private and someone can make it publically viewable after reviewing it.
Comment 1 Sitsofe Wheeler 2015-10-10 11:46:19 EDT
dmesg also contains the following:
[   49.866897] systemd[1]: segfault at 1d0 ip 0000556629ef640c sp 00007ffffa39f700 error 4 in systemd[556629e1b000+14a000]
[   49.882635] systemd-coredum[820]: segfault at 0 ip 0000561607fb4361 sp 00007ffe6effbc90 error 6 in systemd-coredump[561607fa6000+18000]
Comment 2 Sitsofe Wheeler 2015-11-14 18:14:19 EST
This one is still here in
systemd-222-8.fc23.x86_64

Can we make this issue public as I don't think anyone is going to look at it otherwise...
Comment 3 Sitsofe Wheeler 2015-11-22 04:19:15 EST
Filed upstream: https://github.com/systemd/systemd/issues/1981 .
Comment 4 Sitsofe Wheeler 2016-01-09 07:37:35 EST
Changing Fedora version back to 23 per comment #2,
Comment 5 Sitsofe Wheeler 2016-03-01 00:34:27 EST
This is now fixed in systemd v229 by https://github.com/poettering/systemd/commit/e903182e5b0daa941de47a9c08c824106cec7fe0 .
Comment 6 Mike McCune 2016-03-28 19:38:32 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 7 Fedora End Of Life 2016-11-24 07:44:50 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2016-12-20 09:56:41 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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