Bug 1579046 - Using "udisksctl power-off" for usb HDD causes hard hang
Summary: Using "udisksctl power-off" for usb HDD causes hard hang
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: udev
Version: 28
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-16 21:13 UTC by Eric M
Modified: 2018-05-30 21:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-30 21:01:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
console crash message (1.43 MB, image/jpeg)
2018-05-20 14:23 UTC, Eric M
no flags Details

Description Eric M 2018-05-16 21:13:38 UTC
Description of problem:

Powering off an external USB hard drive using Device Notifier causes a system crash.



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

Fedora 28, all updates as of 16 May 2018. It only started happening after the updates on either the 14th or 15th of May.

I'm using KDE desktop if that's at all relevant.

$ uname -a
Linux localhost.localdomain 4.16.8-300.fc28.x86_64 #1 SMP Wed May 9 20:23:40 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:  100% for me


Steps to Reproduce:

1. Plug in USB drive, mount it with Device Notifier. Use it as usual.
2. Then go to Device Notifier and select "power off device" device.

The system hangs a few seconds after it powers off the drive. I can get to a log in screen outside of X11, but there is a CPU hang message that repeats over and over again. 


Actual results: system hang


Expected results: drive powers off normally and system is OK


Additional info:
Let me know how I can provide a log that's helpful.

Comment 1 Eric M 2018-05-16 21:14:52 UTC
Forgot to mention. This only happens on my laptop (DELL XPS 15). It does not happen on my desktop with the (nearly exact) same configuration.

Comment 2 Eric M 2018-05-17 00:30:42 UTC
I tried 'unmount'ing the device before trying power off. Works fine. Then used

$ udiskctl power-off -b /dev/sda1

Interestingly I still get the hang, but:

1. The mouse couldn't move the cursor. 
2. The trackpad *could* move the cursor, but the click was not responsive.

Comment 3 Eric M 2018-05-17 12:24:31 UTC
Does not hang for SD cards or usb flash drives.

Only seems to be external usb hard drives (HDD).

Comment 4 Eric M 2018-05-17 12:35:45 UTC
Watching the daemon with "udisksctl monitor" doesn't seem to show anything unusual, but I can't capture it because of the hang.

The hang is severe and doesn't seem to be limited to usb devices. It hangs the touch screen response as well.

Comment 5 Eric M 2018-05-17 14:20:57 UTC
Could it be this update?

systemd-udev-238-8.git0e0aa59.fc28.x86_64     Mon May 14 10:35:44 2018
systemd-container-238-8.git0e0aa59.fc28.x86_64 Mon May 14 10:35:44 2018

Comment 6 Eric M 2018-05-20 14:23:22 UTC
Created attachment 1439167 [details]
console crash message

I finally caught the important crash message. I could only snap a picture of it.

Comment 7 forkski 2018-05-25 22:06:59 UTC
(In reply to Eric M from comment #5)
> Could it be this update?
> 
> systemd-udev-238-8.git0e0aa59.fc28.x86_64     Mon May 14 10:35:44 2018
> systemd-container-238-8.git0e0aa59.fc28.x86_64 Mon May 14 10:35:44 2018

I have the same issue. I've got the crashing when powering down external drives after a full update. I'm using DELL XPS 13. 

I think this crash is related to the kernel but not systemd-udev. I downgraded systemd-udev but the problem is still there. The crash went away when I switched back to an older kernel (4.16.6).

Comment 8 Eric M 2018-05-30 16:25:16 UTC
One of the kernel updates may have fixed it for me. I don't have the issue any longer and I'm on kernel 4.16.12-300.fc28.x86_64.

forkski, is it gone for you with the updates? If so we should maybe close the bug.

Comment 9 forkski 2018-05-30 18:55:41 UTC
(In reply to Eric M from comment #8)
> One of the kernel updates may have fixed it for me. I don't have the issue
> any longer and I'm on kernel 4.16.12-300.fc28.x86_64.
> 
> forkski, is it gone for you with the updates? If so we should maybe close
> the bug.

I've updated the kernel to 4.16.12. The crash is gone for me as well.

Comment 10 Eric M 2018-05-30 21:01:24 UTC
OK. I'll mark it as closed and if someone comes along with the problem they can reopen it.


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