Bug 21356 - systemctl segmentation fault while changing default target
Summary: systemctl segmentation fault while changing default target
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA6-64-OK MGA6-32-OK advisory
Keywords: validated_update
: 19645 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-07-26 11:56 CEST by Paul Bichis
Modified: 2017-08-21 13:32 CEST (History)
9 users (show)

See Also:
Source RPM: systemd-230-12.mga6
CVE:
Status comment:


Attachments
On behalf of Ulrich Beckmann (1.74 KB, text/plain)
2017-08-17 20:32 CEST, Frédéric "LpSolit" Buclin
Details

Description Paul Bichis 2017-07-26 11:56:23 CEST
Description of problem:
After installing Mageia 6 rc, if you try to change default target with systemctl from runlevel5 to multi-user, a segmentation fault will appear.


Version-Release number of selected component (if applicable):

Linux devel-mga6.lan 4.9.28-desktop-1.mga6 #1 SMP Sun May 14 16:03:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
>> systemctl set-default multi-user.target 

Steps to Reproduce:
[root@localhost ~]# ls -al /etc/systemd/system/default.target
lrwxrwxrwx 1 root root 36 Jul 26 03:13 /etc/systemd/system/default.target -> /lib/systemd/system/runlevel5.target
[root@localhost ~]# systemctl set-default multi-user.target 
 Segmentation fault (core dumped)
[root@localhost ~]# ls -al /etc/systemd/system/default.target
lrwxrwxrwx 1 root root 41 Jul 26 05:12 /etc/systemd/system/default.target -> /usr/lib/systemd/system/multi-user.target
[root@localhost ~]# 
[root@localhost ~]# uname -a
Linux devel-mga6.lan 4.9.28-desktop-1.mga6 #1 SMP Sun May 14 16:03:28 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#

[afk@devel-mga6 ~]$ systemctl --version
systemd 230
+PAM +AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN
[afk@devel-mga6 ~]$
Rémi Verschelde 2017-07-26 12:00:15 CEST

Assignee: bugsquad => mageia
CC: (none) => pkg-bugs
Source RPM: (none) => systemd-230-12.mga6

Comment 1 Rémi Verschelde 2017-07-28 09:43:44 CEST
Assigning to basesystem@ group as Colin is AWOL ;)

CC: (none) => mageia
Assignee: mageia => basesystem

Comment 2 Florian Hubold 2017-08-05 18:25:42 CEST
This seems to be an upstream issue: https://github.com/systemd/systemd/issues/3339
and seems to be fixed by https://github.com/systemd/systemd/commit/acc0269cad31d1aaef2034a055b34c07c88a353d

Tested locally, this fixes the issue. Are there other systemd bugs open for mga6 systemd?

Status: NEW => ASSIGNED
CC: (none) => doktor5000
Assignee: basesystem => doktor5000

Comment 3 Rémi Verschelde 2017-08-07 11:22:34 CEST
(In reply to Florian Hubold from comment #2)
> Tested locally, this fixes the issue. Are there other systemd bugs open for
> mga6 systemd?

I guess you could have a quick look through: https://bugs.mageia.org/buglist.cgi?f1=cf_rpmpkg&list_id=81681&o1=substring&query_format=advanced&resolution=---&v1=systemd
Comment 4 Florian Hubold 2017-08-08 21:51:17 CEST
*** Bug 19645 has been marked as a duplicate of this bug. ***

CC: (none) => laidlaws

Comment 5 Doug Laidlaw 2017-08-09 01:20:05 CEST
It seems to be fixed for me.  Recently, in 6 Official, I was able to change the default target with no problems.  I had forgotten I even reported it.
Comment 6 José Jorge 2017-08-09 09:07:31 CEST
I had this bug 5 days ago with an updated system. Still, the default target was changed, as if the segfault happens after the change is done.

CC: (none) => lists.jjorge

Comment 7 Florian Hubold 2017-08-14 18:37:00 CEST
Well the segfault should not happen at all. And during my tests the target was unchanged. Anyways, should be fixed with systemd-230-12.1.mga6 which I just submitted to core/updates_testing.


test case as follows:

# query default runlevel (target) - usually graphical.target which equals 5
systemctl get-default
# try to change default runlevel, e.g. to multiuser.target which equals 3
systemctl set-default multi-user.target
# no segfault should be observed
# query default runlevel again, it should reflect to what it has been set to
systemctl get-default


@QA: I believe this should be sufficient for an advisory, feel free to reassign if something is missing.


i586
================
libsystemd0-230-12.1.mga6.i586
libudev1-230-12.1.mga6.i586
libudev-devel-230-12.1.mga6.i586
nss-myhostname-230-12.1.mga6.i586
systemd-230-12.1.mga6.i586
systemd-devel-230-12.1.mga6.i586
systemd-units-230-12.1.mga6.i586

x86_64
================
lib64systemd0-230-12.1.mga6.x86_64
lib64udev1-230-12.1.mga6.x86_64
lib64udev-devel-230-12.1.mga6.x86_64
nss-myhostname-230-12.1.mga6.x86_64
systemd-230-12.1.mga6.x86_64
systemd-devel-230-12.1.mga6.x86_64
systemd-units-230-12.1.mga6.x86_64

src
================
systemd-230-12.1.mga6.src

Component: Backports => RPM Packages
Assignee: doktor5000 => qa-bugs

Comment 8 Florian Hubold 2017-08-14 18:38:32 CEST
(In reply to Florian Hubold from comment #7)
> test case as follows:
> 
> # query default runlevel (target) - usually graphical.target which equals 5
> systemctl get-default
> # try to change default runlevel, e.g. to multiuser.target which equals 3
> systemctl set-default multi-user.target
> # no segfault should be observed
> # query default runlevel again, it should reflect to what it has been set to
> systemctl get-default
>

Err, in case this is not obvious afterwards you probably want to switch back the runlevel to the previous value :)

systemctl set-default graphical.target
Comment 9 Doug Laidlaw 2017-08-14 19:52:58 CEST
I have set mine to "runlevel5.target."  Is that a temporary, transitional option?
Comment 10 Ulrich Beckmann 2017-08-17 20:25:25 CEST
I tested on both x86_64 qemu_kvm VM and real hardware. Real hardware: systemd already upgraded 3 days ago.
Everything looks ok. No regression found.

Ulrich

I tried to paste the cli output of the test as attechment and upload a file without success.
Here you find the content: http://paste.debian.net/981724/

CC: (none) => bequimao.de

Comment 11 Frédéric "LpSolit" Buclin 2017-08-17 20:32:25 CEST
Created attachment 9609 [details]
On behalf of Ulrich Beckmann
Comment 12 Frédéric "LpSolit" Buclin 2017-08-17 20:35:03 CEST
(In reply to Ulrich Beckmann from comment #10)
> I tried to paste the cli output of the test as attechment and upload a file
> without success.

Problem fixed.
Comment 13 Len Lawrence 2017-08-19 00:26:25 CEST
mga6  x86_64

Ran these commands as root.

# systemctl get-default
graphical.target
# systemctl set-default multi-user.target
Segmentation fault (core dumped)
# systemctl get-default
multi-user.target
# systemctl set-default graphical.target
Segmentation fault (core dumped)
# systemctl get-default
graphical.target

After updating...

# systemctl set-default multi-user.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/multi-user.target.

and rebooting...

Deliberately left the runlevel at 3 to make sure that runlevel 5 could be recovered from the command line.  I am not recommending this to any other testers.  Logged in as root in the console after booting and ran the recovery commands.
# systemctl set-default graphical.target
# systemctl default

That brought up the display manager.  Logged in.

$ systemctl get-default
graphical.target

So this is OK for 64-bits.  This is one update which should definitely be tested in 32-bits as well, real hardware.

CC: (none) => tarazed25

Len Lawrence 2017-08-19 00:27:27 CEST

Whiteboard: (none) => MGA6-64-OK

Comment 14 Lewis Smith 2017-08-20 11:05:52 CEST
Advisory from comments 0  & 7.

Whiteboard: MGA6-64-OK => MGA6-64-OK advisory

Comment 15 Herman Viaene 2017-08-21 10:53:29 CEST
MGA6-32 on Asus A6000VM MATE
No installation issues.
Could replicate the problem with the stable SW before installation.
Test with new at CLI:
# systemctl get-default
graphical.target
# systemctl set-default multi-user.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/multi-user.target.
# systemctl get-default
multi-user.target
# systemctl set-default graphical.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.
# systemctl get-default
graphical.target

So seems OK.

CC: (none) => herman.viaene, sysadmin-bugs
Whiteboard: MGA6-64-OK advisory => MGA6-64-OK MGA6-32-OK advisory
Keywords: (none) => validated_update

Comment 16 Mageia Robot 2017-08-21 13:32:16 CEST
An update for this issue has been pushed to the Mageia Updates repository.

http://advisories.mageia.org/MGAA-2017-0063.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


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