Bug 1149507

Summary: systemctl crashes
Product: [Fedora] Fedora Reporter: nucleo <alekcejk>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 21CC: johannbg, jsynacek, lnykryn, msekleta, s, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: initscripts-9.56.1-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-28 21:49:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description nucleo 2014-10-05 15:31:44 UTC
Description of problem:
systemctl crashes when I trying to use autocompletion.

Version-Release number of selected component (if applicable):
systemd-215-19.fc21.i686

How reproducible:
Every time.

Steps to Reproduce:
1. type "systemctl restart ud" (or start)
2. press tab

Actual results:
No autocompletion, systemctl crash in systemlog:
systemctl[2148]: segfault at b70000cc ip b776b98d sp bfbb7e00 error 4 in systemctl[b773e000+8a000]

Expected results:
No crash.

Comment 1 Zbigniew Jędrzejewski-Szmek 2014-10-05 16:20:43 UTC
Any chance you could get the full backtrace?

Comment 2 nucleo 2014-10-05 17:27:47 UTC
#0  sd_bus_message_exit_container (m=0xb7000000) at ../src/libsystemd/sd-bus/bus-message.c:3960
#1  0xb77b723c in show_one.lto_priv.375 (verb=0xbfc64b4f "show", bus=bus@entry=0xb7be2870, 
    path=path@entry=0xb7be71a8 "/org/freedesktop/systemd1/unit/proc_2dsys_2dfs_2dbinfmt_5fmisc_2eautomount", show_properties=show_properties@entry=true, 
    new_line=new_line@entry=0xbfc6444a, ellipsized=ellipsized@entry=0xbfc6444b) at ../src/systemctl/systemctl.c:4190
#2  0xb77cc69b in show.lto_priv.324 (bus=0xb7be2870, args=0xbfc64740) at ../src/systemctl/systemctl.c:4459
#3  0xb776fe1d in systemctl_main (bus_error=<optimized out>, argv=0xbfc64724, argc=156, bus=0xb7be2870) at ../src/systemctl/systemctl.c:6682
#4  main (argc=156, argv=0xbfc64724) at ../src/systemctl/systemctl.c:6937

Comment 3 Zbigniew Jędrzejewski-Szmek 2014-10-05 23:46:55 UTC
It seems that the call to 'systemctl show --property CanStart proc-sys-fs-binfmt_misc.automount' crashes. This shouldn't happen. Can you run it from the commandline? Also under valgrind?

Comment 4 nucleo 2014-10-05 23:53:05 UTC
$ valgrind systemctl show --property CanStart proc-sys-fs-binfmt_misc.automount
==20774== Memcheck, a memory error detector
==20774== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==20774== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==20774== Command: systemctl show --property CanStart proc-sys-fs-binfmt_misc.automount
==20774== 
Failed to parse message: Operation not permitted
==20774== 
==20774== Process terminating with default action of signal 11 (SIGSEGV)
==20774==  Bad permissions for mapped region at address 0x4000000
==20774==    at 0x126DAF: sd_bus_message_unref (bus-message.c:802)
==20774==    by 0x15919F: UnknownInlinedFun (bus-util.h:142)
==20774==    by 0x15919F: show_one.lto_priv.375 (systemctl.c:4134)
==20774==    by 0x16E69A: show.lto_priv.324 (systemctl.c:4459)
==20774==    by 0x111E1C: systemctl_main (systemctl.c:6682)
==20774==    by 0x111E1C: main (systemctl.c:6937)
==20774== 
==20774== HEAP SUMMARY:
==20774==     in use at exit: 14,416 bytes in 26 blocks
==20774==   total heap usage: 175 allocs, 149 frees, 19,464 bytes allocated
==20774== 
==20774== LEAK SUMMARY:
==20774==    definitely lost: 0 bytes in 0 blocks
==20774==    indirectly lost: 0 bytes in 0 blocks
==20774==      possibly lost: 0 bytes in 0 blocks
==20774==    still reachable: 14,416 bytes in 26 blocks
==20774==         suppressed: 0 bytes in 0 blocks
==20774== Rerun with --leak-check=full to see details of leaked memory
==20774== 
==20774== For counts of detected and suppressed errors, rerun with: -v
==20774== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
CanStart=yes
Segmentation fault

Comment 5 Zbigniew Jędrzejewski-Szmek 2014-10-09 04:58:59 UTC
Should be fixed with http://cgit.freedesktop.org/systemd/systemd/commit/?id=c2fa048c4a, present in pending update systemd-216-2.fc21.

Comment 6 Fedora Update System 2014-10-09 04:59:39 UTC
initscripts-9.56.1-1.fc21, systemd-216-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/initscripts-9.56.1-1.fc21,systemd-216-2.fc21

Comment 7 Fedora Update System 2014-10-10 23:02:19 UTC
initscripts-9.56.1-1.fc21, systemd-216-3.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/initscripts-9.56.1-1.fc21,systemd-216-3.fc21

Comment 8 Fedora Update System 2014-10-12 05:05:21 UTC
Package initscripts-9.56.1-1.fc21, systemd-216-3.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing initscripts-9.56.1-1.fc21 systemd-216-3.fc21'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12688/initscripts-9.56.1-1.fc21,systemd-216-3.fc21
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2014-10-14 04:33:53 UTC
Package systemd-216-4.fc21, initscripts-9.56.1-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-216-4.fc21 initscripts-9.56.1-2.fc21'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12688/initscripts-9.56.1-2.fc21,systemd-216-4.fc21
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2014-10-21 17:24:58 UTC
Package initscripts-9.56.1-2.fc21, systemd-216-5.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing initscripts-9.56.1-2.fc21 systemd-216-5.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-12688/initscripts-9.56.1-2.fc21,systemd-216-5.fc21
then log in and leave karma (feedback).

Comment 11 Fedora Update System 2014-10-28 21:49:20 UTC
initscripts-9.56.1-2.fc21, systemd-216-5.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.