USB port lost function after unplugging usb drive

Bug #1958850 reported by Kai-Chuan Hsieh
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
HWE Next
Fix Released
Undecided
Unassigned
OEM Priority Project
Fix Released
Critical
Unassigned
linux (Ubuntu)
Fix Released
Undecided
koba
Focal
Invalid
Undecided
Unassigned
Jammy
Fix Released
Undecided
koba
linux-oem-5.14 (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
Undecided
koba
Jammy
Invalid
Undecided
Unassigned

Bug Description

[Impact]
Test the proposed 5.14 oem kernel, and get a failure symptom.

Unplug a usb drive from WD19TB docking and a BUG reported in kernel, then the other embedded usb port can't detect usb drive anymore after a while.

kernel: usb 5-2.3.3: USB disconnect, device number 5
kernel: BUG: kernel NULL pointer dereference, address: 0000000000000030
kernel: #PF: supervisor read access in kernel mode
kernel: #PF: error_code(0x0000) - not-present page
kernel: PGD 0 P4D 0
kernel: Oops: 0000 [#1] SMP NOPTI

[Fix]
2a19b28f7929) blk-mq: cancel blk-mq dispatch work... is the first regression and it lands mainline since v5.16-rc2.

After applied https://<email address hidden>/#r, issue is gone.
the patches has beend landed since v5.15-rc1.

[Test Case]
1. plug usb driver on the machine.
2. unplug usb driver.
3. check the dmesg if the oops would be shown

[Where problems could occur]
Medium
~~~
Test the proposed 5.14 oem kernel, and get a failure symptom.

Unplug a usb drive from WD19TB docking and a BUG reported in kernel, then the other embedded usb port can't detect usb drive anymore after a while.

kernel: usb 5-2.3.3: USB disconnect, device number 5
kernel: BUG: kernel NULL pointer dereference, address: 0000000000000030
kernel: #PF: supervisor read access in kernel mode
kernel: #PF: error_code(0x0000) - not-present page
kernel: PGD 0 P4D 0
kernel: Oops: 0000 [#1] SMP NOPTI
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: u 2205 F.... pulseaudio
 /dev/snd/controlC0: u 2205 F.... pulseaudio
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 21.10
InstallationDate: Installed on 2021-04-29 (270 days ago)
InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420)
MachineType: Dell Inc. Precision 5750
NonfreeKernelModules: nvidia_modeset nvidia
Package: linux (not installed)
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.14.0-1021-oem root=UUID=834a3a4a-65e5-44ed-8f1a-4bdd2df3cce2 ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 5.14.0-1021.23-oem 5.14.21
RelatedPackageVersions:
 linux-restricted-modules-5.14.0-1021-oem N/A
 linux-backports-modules-5.14.0-1021-oem N/A
 linux-firmware 1.201.3
Tags: impish
Uname: Linux 5.14.0-1021-oem x86_64
UpgradeStatus: Upgraded to impish on 2022-01-06 (18 days ago)
UserGroups: adm cdrom dip docker lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 11/18/2021
dmi.bios.release: 1.11
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.11.1
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.11.1:bd11/18/2021:br1.11:svnDellInc.:pnPrecision5750:pvr:rvnDellInc.:rn:rvr:cvnDellInc.:ct10:cvr:sku0990:
dmi.product.family: Precision
dmi.product.name: Precision 5750
dmi.product.sku: 0990
dmi.sys.vendor: Dell Inc.

CVE References

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote :
tags: added: apport-collected impish
description: updated
Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : AlsaInfo.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : CRDA.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : IwConfig.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : Lspci.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : Lspci-vt.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : Lsusb.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : Lsusb-t.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : Lsusb-v.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : PaInfo.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : ProcEnviron.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : ProcModules.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : PulseList.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : RfKill.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : UdevDb.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : WifiSyslog.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : acpidump.txt

apport information

tags: added: originate-from-1958840
summary: - USB port lost function after unplugging usb drive from WD19TB dock
+ USB port lost function after unplugging usb drive
tags: added: somerville
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

could be a regression due to patches from bug 1950974, although there are also >1100 patches from stable@

are you able to bisect?

Changed in linux-oem-5.14 (Ubuntu):
status: New → Invalid
Changed in linux-oem-5.14 (Ubuntu Focal):
status: New → Incomplete
tags: added: block-proposed
Revision history for this message
koba (kobako) wrote :

@Timo, 5.14-oem-1020 is ok, the regression is with 5.14-oem-1021.
im bisecting.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

reverting the patches from bug 1950974 were tested to not help, so bisecting is needed

Revision history for this message
koba (kobako) wrote (last edit ):

the first regression is 2a19b28f7929) blk-mq: cancel blk-mq dispatch work...
with mainline v5.14 and this commit, also could get the same issue.

After applied these patches, issue would be gone. the patches has been landed since v5.15-rc1
https://<email address hidden>/#r

koba (kobako)
Changed in linux-oem-5.14 (Ubuntu Focal):
status: Incomplete → In Progress
assignee: nobody → koba (kobako)
koba (kobako)
description: updated
description: updated
Revision history for this message
koba (kobako) wrote (last edit ):
Changed in linux (Ubuntu Jammy):
status: New → In Progress
assignee: nobody → koba (kobako)
Timo Aaltonen (tjaalton)
Changed in linux-oem-5.14 (Ubuntu Focal):
status: In Progress → Fix Committed
Alex Tu (alextu)
Changed in oem-priority:
importance: Undecided → Critical
Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote :

test on 5.14.0-1024-oem, not kernel bug reported, they system can work normally after plug/unplug usb drive.

Revision history for this message
David Chen (david.chen) wrote :

@KC, where can I get 1024 kernel? Just checked, not available in proposed yet.

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote :

you can have 5.14.0-1024-oem here, https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/ppa

however, it is prebuild from kernel team, so you have to disable secure boot for it.

Revision history for this message
David Chen (david.chen) wrote :

@kc, thanks for sharing

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

in hindsight, I think the correct action for oem-5.14 would've been instead to just revert the offending commit:

345399bbc5c8a42 blk-mq: cancel blk-mq dispatch work in both blk_cleanup_queue and disk_release()

and I might still do that for the next cycle, and also revert the patchset that was added for this bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu Focal):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-5.14 - 5.14.0-1024.26

---------------
linux-oem-5.14 (5.14.0-1024.26) focal; urgency=medium

  * focal/linux-oem-5.14: 5.14.0-1024.26 -proposed tracker (LP: #1961191)

  * Packaging resync (LP: #1786013)
    - [Config] Update config to match upstream stable release
    - [Packaging] update variants

  * CVE-2022-0435
    - tipc: improve size validations for received domain records

  * CVE-2022-0492
    - cgroup-v1: Require capabilities to set release_agent

  * Use EC GPE for s2idle wakeup on AMD platforms (LP: #1960771)
    - ACPI: PM: Revert "Only mark EC GPE for wakeup on Intel systems"

  * USB port lost function after unplugging usb drive (LP: #1958850)
    - block: add disk sequence number
    - mm: hide laptop_mode_wb_timer entirely behind the BDI API
    - block: pass a gendisk to blk_queue_update_readahead
    - block: add a queue_has_disk helper
    - block: move the bdi from the request_queue to the gendisk
    - block: remove the bd_bdi in struct block_device
    - nvme: use blk_mq_alloc_disk
    - st: do not allocate a gendisk
    - sg: do not allocate a gendisk
    - block: cleanup the lockdep handling in *alloc_disk
    - block: remove alloc_disk and alloc_disk_node
    - block: remove the minors argument to __alloc_disk_node
    - block: pass a request_queue to __blk_alloc_disk
    - block: hold a request_queue reference for the lifetime of struct gendisk
    - block: add an explicit ->disk backpointer to the request_queue
    - writeback: make the laptop_mode prototypes available unconditionally
    - sg: pass the device name to blk_trace_setup
    - block: factor out a blk_try_enter_queue helper
    - block: drain file system I/O on del_gendisk
    - block: keep q_usage_counter in atomic mode after del_gendisk
    - block: drain queue after disk is removed from sysfs
    - nvdimm/pmem: stop using q_usage_count as external pgmap refcount
    - nvdimm/pmem: cleanup the disk if pmem_release_disk() is yet assigned

  * Focal update: upstream stable patchset 2022-01-31 (LP: #1959569)
    - iommu/amd: Restore GA log/tail pointer on host resume

 -- Timo Aaltonen <email address hidden> Thu, 17 Feb 2022 13:23:43 +0200

Changed in linux-oem-5.14 (Ubuntu Focal):
status: Fix Committed → Fix Released
Andy Whitcroft (apw)
tags: added: block-proposed-focal
removed: block-proposed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

included in 5.15.4

Changed in linux (Ubuntu Jammy):
status: In Progress → Fix Released
Changed in linux (Ubuntu):
status: In Progress → Fix Released
Changed in hwe-next:
status: New → Fix Released
Changed in oem-priority:
status: New → Fix Released
Changed in linux (Ubuntu Focal):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.