Skip to contentSkip to conversation

System hang issue during hibernation resume due to del_gendisk

DISCUSSION Sunad Bhandary S 2 participants 3 messages Nov 11, 2014 NVMe

lore
Share & tools
lore
#0 lore raw

Hi Keith,

While I was working with NVMe devices I came across a system hang issue. The following are the steps to reproduce the issue:

1) Mounted a NVMe device with Linux NVMe Driver and EXT3 file format .
2) Put the device to hibernate state using pm-hibernate
3) Remove the NVMe device.
4) Resume from hibernation
The system hangs up with a blank screen and the only option is to force reboot.

I suspect this to be a issue with the call of del_gendisk. If i make the call to del_gendisk in the cleanup path in the free_namespaces function the system resumes without any issues for the same scenario.

Also the issue is not observed in EXT4 file format.

The issue seems to be the same as discussed here https://groups.google.com/forum/#!topic/fa.linux.kernel/aHbwSyQdADY . I am keen to know if this issue has been fixed in the latest kernel versions and if it is safe to call del_gendisk when the userspace is frozen in the latest kernel versions.

Regards,
Sunad

#1 lore raw
Quoted 11 lines · Sunad Bhandary S

Hi Keith,

While I was working with NVMe devices I came across a system hang issue. The following are the steps to reproduce the issue:

1) Mounted a NVMe device with Linux NVMe Driver and EXT3 file format .
2) Put the device to hibernate state using pm-hibernate
3) Remove the NVMe device.
4) Resume from hibernation
The system hangs up with a blank screen and the only option is to force reboot.

Quoted 3 lines

I suspect this to be a issue with the call of del_gendisk. If i make the call to del_gendisk in the cleanup path in the free_namespaces function the system resumes without any issues for the same scenario.

I am surprised to hear you can remove a pci device while hibernated.

I knew calling del_gendisk from resume wouldn't work, which is why it's done in a work queue, and removed in another thread if the device is gone. That's still not okay?

I don't think we want to move del_gendisk to free_namespace since it will leave the device available to new opens after it is removed.

Quoted 7 lines

Also the issue is not observed in EXT4 file format.

The issue seems to be the same as discussed here
https://groups.google.com/forum/#!topic/fa.linux.kernel/aHbwSyQdADY . I am keen to know if this issue has been fixed in the latest kernel versions and if it is safe to call del_gendisk when the userspace is frozen in the latest kernel versions.

Thanks for the link! I'm definitely interested to see if there's something better we can do in this area.

Quoted 2 lines

Regards,
Sunad