Bug 17766 - systemd freeze when physically unplug a usb disc without umounting it first
Summary: systemd freeze when physically unplug a usb disc without umounting it first
Status: RESOLVED WORKSFORME
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal critical
Target Milestone: ---
Assignee: Colin Guthrie
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-14 17:06 CET by Thierry Vignaud
Modified: 2020-09-09 20:45 CEST (History)
1 user (show)

See Also:
Source RPM: systemd-229-1.mga6.src.rpm
CVE:
Status comment:


Attachments
what's relevant in dmesg (2.38 KB, text/plain)
2016-02-14 17:07 CET, Thierry Vignaud
Details
GDB trace (with symbols) (2.33 KB, text/plain)
2016-03-05 13:12 CET, Thierry Vignaud
Details

Description Thierry Vignaud 2016-02-14 17:06:43 CET
Description of problem:
One when a USB disk is physically unplug without umounting it first, systemd froze and reboot/... commands are no more working

On console, one can sees:
Broadcast message from systemd-journald@localhost.localdomain (Sun 2016-02-14 16:54:32 CET):
systemd[1]: Caught <ABRT>, dumped core as pid 12723.

Broadcast message from systemd-journald@localhost.localdomain (Sun 2016-02-14 16:54:32 CET):
systemd[1]: Freezing execution.

Version-Release number of selected component (if applicable):
systemd-229-1.mga6

How reproducible: Always

Steps to Reproduce:
1. physically unplug a usb disc without umounting it first
=> systemd freeze
2. try reboot
3.


Reproducible: 

Steps to Reproduce:
Comment 1 Thierry Vignaud 2016-02-14 17:07:43 CET
Created attachment 7456 [details]
what's relevant in dmesg
Comment 2 Thierry Vignaud 2016-02-14 17:08:13 CET
Example of failling reboot:
[root@localhost ~]# LC_ALL=C reboot
Failed to start reboot.target: Failed to activate service 'org.freedesktop.systemd1': timed out
See system logs and 'systemctl status reboot.target' for details.
Failed to open /dev/initctl: No such device or address
Failed to talk to init daemon.
Florian Hubold 2016-02-14 21:08:58 CET

CC: (none) => doktor5000

Comment 3 Colin Guthrie 2016-02-15 11:21:04 CET
I don't see any commits yet upstream, and I cannot reproduce here.. I presume it's easily reproducible for you? Has anyone else confirmed?
Comment 4 Thierry Vignaud 2016-02-15 13:53:54 CET
Yes.
It's easily reproducible.
Actually it happened for a clean umount/unplug too at least once.

I guess I'll have to attach gdb to systemd tonight in order to get a trace
Comment 5 Thierry Vignaud 2016-02-16 07:12:03 CET
It doesn't happen anymore.
I guess it was fixed by one of glib2/... update

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

Comment 6 Thierry Vignaud 2016-03-05 10:08:41 CET
It happens again for a few days:

Meu  04 17:14:11 systemd[1208]: Assertion 'b' failed at src/basic/path-util.c:390, function path_compare(). Aborting.
Meu  04 17:14:11 systemd[1]: Caught <ABRT>, dumped core as pid 32138.
Meu  04 17:14:11 systemd[1]: Freezing execution.


And then:

# reboot
Failed to start reboot.target: Connection timed out
See system logs and 'systemctl status reboot.target' for details.
Failed to open /dev/initctl: No such device or address
Failed to talk to init daemon.

Summary: systemd freeze when hysically unplug a usb disc without umounting it first => systemd freeze when physically unplug a usb disc without umounting it first
Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 7 Thierry Vignaud 2016-03-05 13:12:51 CET
Created attachment 7513 [details]
GDB trace (with symbols)
Comment 8 Florian Hubold 2016-03-05 14:26:01 CET
You should probably report that upstream: https://github.com/systemd/systemd/issues
Comment 9 Colin Guthrie 2016-03-14 10:49:44 CET
I added a patch and submitted upstream. It should avoid the crash but not sure if it's the "real" fix.

https://github.com/systemd/systemd/pull/2834
Comment 10 Colin Guthrie 2016-03-14 10:52:02 CET
Should be in cauldron shortly.
Comment 11 Aurelien Oudelet 2020-09-09 20:45:38 CEST
In reply to Colin Guthrie from comment #9)
> I added a patch and submitted upstream. It should avoid the crash but not
> sure if it's the "real" fix.
> 
> https://github.com/systemd/systemd/pull/2834

This seems upstream and fixed. Merged pull request.

Trying reproduce: no systemd freeze.

Status: REOPENED => RESOLVED
Resolution: (none) => WORKSFORME


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