xhci hangs; reset results in NULL pointer dereference
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HWE Next |
Fix Released
|
Undecided
|
Unassigned | ||
linux (Arch Linux) |
New
|
Undecided
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned | ||
linux-oem (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
===SRU Justification===
[Impact]
xHC stops to work after some time. This happens when the xHC gets
runtime resumed/suspended constantly.
[Test]
User reports this backport fixes the issue.
[Fix]
In addition to check EINT, also check ports' status.
[Regression Potential]
Low. It fixes a known bug and it's in -stable.
===Original Bug Report===
Now and then, my xhci bus will hang, resulting in these kinds of messages in dmesg:
[252220.002102] xhci_hcd 0000:00:14.0: xHC is not running.
[252220.037491] xhci_hcd 0000:00:14.0: xHCI host controller not responding, assume dead
[252220.037500] xhci_hcd 0000:00:14.0: HC died; cleaning up
[252220.133794] usb 1-2: USB disconnect, device number 2
[252220.135042] usb 1-7: USB disconnect, device number 3
[252220.137455] usb 1-8: USB disconnect, device number 4
[252220.243317] usb 1-9: USB disconnect, device number 5
Usually, I can fix this bij resetting the bus by calling a script reset-xhci:
for xhci in /sys/bus/
cd $xhci
echo Resetting devices from $xhci...
for i in ????:??:??.? ; do
echo -n "$i" > unbind
echo -n "$i" > bind
done
done
But doing this today resulted in a kernel bug:
[252243.401814] xhci_hcd 0000:00:14.0: remove, state 4
[252243.401887] usb usb2: USB disconnect, device number 1
[252243.470365] xhci_hcd 0000:00:14.0: USB bus 2 deregistered
[252243.470378] xhci_hcd 0000:00:14.0: remove, state 4
[252243.470383] usb usb1: USB disconnect, device number 1
[252243.470831] xhci_hcd 0000:00:14.0: Host halt failed, -19
[252243.470837] xhci_hcd 0000:00:14.0: Host not accessible, reset failed.
[252243.475918] xhci_hcd 0000:00:14.0: USB bus 1 deregistered
[252243.475938] ------------[ cut here ]------------
[252243.475939] xhci_hcd 0000:00:14.0: disabling already-disabled device
[252243.475951] WARNING: CPU: 2 PID: 1787 at /build/
[252243.475951] Modules linked in: cpuid snd_seq_dummy usb_storage hid_generic hidp ip6t_REJECT nf_reject_ipv6 ip6table_nat nf_nat_ipv6 ip6table_mangle xt_hashlimit ip6table_raw nf_conntrack_ipv6 nf_defrag_ipv6 nf_log_ipv6 xt_recent xt_comment ipt_REJECT nf_reject_ipv4 xt_mark iptable_mangle xt_tcpudp xt_CT iptable_raw xt_multiport xt_NFLOG nfnetlink_log nf_log_ipv4 nf_log_common xt_LOG nf_conntrack_sane nf_conntrack_
[252243.475984] xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype xt_conntrack nf_nat nf_conntrack br_netfilter aufs vhost_net vhost tap ccm rfcomm bridge stp llc devlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter msr cmac bnep binfmt_misc snd_hda_codec_hdmi nls_iso8859_1 arc4 snd_soc_skl snd_hda_
[252243.476023] iwlmvm btbcm btintel mac80211 hid_multitouch uvcvideo joydev input_leds dell_smbios_wmi snd_seq_device dell_wmi bluetooth serio_raw snd_timer videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 dell_smbios videobuf2_core iwlwifi sparse_keymap ecdh_generic snd wmi_bmof dell_wmi_descriptor videodev cfg80211 media soundcore rtsx_pci_ms memstick shpchp mei_me mei processor_
[252243.476067] raid0 multipath linear dm_mirror dm_region_hash dm_log usbhid hid crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc i915 rtsx_pci_sdmmc i2c_algo_bit drm_kms_helper e1000e syscopyarea sysfillrect sysimgblt fb_sys_fops ptp aesni_intel psmouse drm pps_core rtsx_pci aes_x86_64 ahci crypto_simd glue_helper libahci wmi cryptd video
[252243.476089] CPU: 2 PID: 1787 Comm: reset-xhci Tainted: G U W 4.15.0-13-generic #14-Ubuntu
[252243.476090] Hardware name: Dell Inc. Latitude E7470/0T6HHJ, BIOS 1.18.5 12/11/2017
[252243.476092] RIP: 0010:pci_
[252243.476092] RSP: 0018:ffffa61206
[252243.476094] RAX: 0000000000000000 RBX: ffff9356fcc25000 RCX: ffffffffa9862888
[252243.476095] RDX: 0000000000000001 RSI: 0000000000000082 RDI: 0000000000000247
[252243.476096] RBP: ffffa61206edfd50 R08: 0000000000000038 R09: 000000000000c694
[252243.476097] R10: ffffa61206edfcf0 R11: 0000000000000000 R12: ffff9356fced8700
[252243.476098] R13: ffffffffa99d52c0 R14: ffffffffa99d5330 R15: 0000000000000060
[252243.476100] FS: 00007f13a7aea74
[252243.476102] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[252243.476102] CR2: 000055f5dcf9cef0 CR3: 000000011db38006 CR4: 00000000003626e0
[252243.476103] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[252243.476104] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[252243.476105] Call Trace:
[252243.476110] usb_hcd_
[252243.476112] xhci_pci_
[252243.476116] pci_device_
[252243.476124] device_
[252243.476126] device_
[252243.476127] unbind_
[252243.476130] drv_attr_
[252243.476132] sysfs_kf_
[252243.476135] kernfs_
[252243.476138] __vfs_write+
[252243.476140] vfs_write+
[252243.476142] SyS_write+0x55/0xc0
[252243.476145] do_syscall_
[252243.476148] entry_SYSCALL_
[252243.476150] RIP: 0033:0x7f13a71f0154
[252243.476151] RSP: 002b:00007fff8c
[252243.476153] RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f13a71f0154
[252243.476154] RDX: 000000000000000c RSI: 000055ef072cc230 RDI: 0000000000000001
[252243.476155] RBP: 000055ef072cc230 R08: 00007f13a74cd8c0 R09: 00007f13a7aea740
[252243.476156] R10: 00000000fffffff4 R11: 0000000000000246 R12: 00007f13a74cc760
[252243.476157] R13: 000000000000000c R14: 00007f13a74c82a0 R15: 00007f13a74c7760
[252243.476158] Code: 00 c6 05 5a 6f 12 01 01 4d 85 e4 74 36 48 8d bb a0 00 00 00 e8 26 55 15 00 4c 89 e2 48 89 c6 48 c7 c7 28 90 51 a9 e8 e4 11 ba ff <0f> 0b eb 82 48 89 df e8 d8 fe ff ff 80 a3 c1 07 00 00 f7 5b 41
[252243.476192] ---[ end trace abf3a4d94dd3a5a8 ]---
[252243.513857] BUG: unable to handle kernel NULL pointer dereference at 0000000000000128
[252243.513866] IP: check_root_
[252243.513868] PGD 0 P4D 0
[252243.513872] Oops: 0000 [#1] SMP PTI
[252243.513876] Modules linked in: cpuid snd_seq_dummy usb_storage hid_generic hidp ip6t_REJECT nf_reject_ipv6 ip6table_nat nf_nat_ipv6 ip6table_mangle xt_hashlimit ip6table_raw nf_conntrack_ipv6 nf_defrag_ipv6 nf_log_ipv6 xt_recent xt_comment ipt_REJECT nf_reject_ipv4 xt_mark iptable_mangle xt_tcpudp xt_CT iptable_raw xt_multiport xt_NFLOG nfnetlink_log nf_log_ipv4 nf_log_common xt_LOG nf_conntrack_sane nf_conntrack_
[252243.513913] xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype xt_conntrack nf_nat nf_conntrack br_netfilter aufs vhost_net vhost tap ccm rfcomm bridge stp llc devlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter msr cmac bnep binfmt_misc snd_hda_codec_hdmi nls_iso8859_1 arc4 snd_soc_skl snd_hda_
[252243.513954] iwlmvm btbcm btintel mac80211 hid_multitouch uvcvideo joydev input_leds dell_smbios_wmi snd_seq_device dell_wmi bluetooth serio_raw snd_timer videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 dell_smbios videobuf2_core iwlwifi sparse_keymap ecdh_generic snd wmi_bmof dell_wmi_descriptor videodev cfg80211 media soundcore rtsx_pci_ms memstick shpchp mei_me mei processor_
[252243.513989] raid0 multipath linear dm_mirror dm_region_hash dm_log usbhid hid crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc i915 rtsx_pci_sdmmc i2c_algo_bit drm_kms_helper e1000e syscopyarea sysfillrect sysimgblt fb_sys_fops ptp aesni_intel psmouse drm pps_core rtsx_pci aes_x86_64 ahci crypto_simd glue_helper libahci wmi cryptd video
[252243.514007] CPU: 2 PID: 31613 Comm: kworker/2:1 Tainted: G U W 4.15.0-13-generic #14-Ubuntu
[252243.514008] Hardware name: Dell Inc. Latitude E7470/0T6HHJ, BIOS 1.18.5 12/11/2017
[252243.514012] Workqueue: pm pm_runtime_work
[252243.514014] RIP: 0010:check_
[252243.514016] RSP: 0018:ffffa61207
[252243.514017] RAX: 0000000000000000 RBX: ffff9356fcc250a0 RCX: 0000000000000000
[252243.514019] RDX: ffffffffa99d52c0 RSI: 0000000000000001 RDI: ffff9356fcc250a0
[252243.514020] RBP: ffffa61207057cb0 R08: 0000000000000000 R09: ffffa61207057db8
[252243.514021] R10: 0000000000000000 R11: 0000000000000274 R12: 0000000000000001
[252243.514022] R13: ffffffffa92ec040 R14: 0000000000000000 R15: ffffffffa88ec000
[252243.514024] FS: 000000000000000
[252243.514025] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[252243.514026] CR2: 0000000000000128 CR3: 000000009ac0a003 CR4: 00000000003626e0
[252243.514028] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[252243.514029] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[252243.514030] Call Trace:
[252243.514033] suspend_
[252243.514035] hcd_pci_
[252243.514038] pci_pm_
[252243.514040] ? pci_pm_
[252243.514042] __rpm_callback+
[252243.514045] ? __switch_
[252243.514047] ? __switch_
[252243.514050] rpm_callback+
[252243.514051] ? pci_pm_
[252243.514053] rpm_suspend+
[252243.514056] rpm_idle+0x58/0x2a0
[252243.514058] pm_runtime_
[252243.514061] process_
[252243.514062] worker_
[252243.514065] kthread+0x121/0x140
[252243.514067] ? process_
[252243.514069] ? kthread_
[252243.514072] ? do_syscall_
[252243.514074] ? SyS_exit_
[252243.514076] ret_from_
[252243.514077] Code: 48 8d b2 a0 00 00 00 48 81 c7 a0 00 00 00 48 89 e5 e8 65 a0 f1 ff 5d c3 0f 1f 00 0f 1f 44 00 00 48 8b 87 98 00 00 00 55 48 89 e5 <f6> 80 28 01 00 00 20 75 2c 48 8b 90 f8 01 00 00 31 c0 48 85 d2
[252243.514103] RIP: check_root_
[252243.514104] CR2: 0000000000000128
[252243.514106] ---[ end trace abf3a4d94dd3a5a9 ]---
[252243.533589] xhci_hcd 0000:00:14.0: xHCI Host Controller
[252243.533600] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[252243.534713] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x00109810
[252243.534721] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported
[252243.534892] usb usb1: runtime PM trying to activate child device usb1 but parent (0000:00:14.0) is not active
This is a plain linux-image-
For completeness sake:
╰─▶ lsb_release -rd
Description: Ubuntu Bionic Beaver (development branch)
Release: 18.04
╰─▶ uname -a
Linux regan 4.15.0-13-generic #14-Ubuntu SMP Sat Mar 17 13:44:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
╰─▶ dpkg -l linux-image-\*|cat
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-
ii linux-image-generic 4.15.0.13.14 amd64 Generic Linux kernel image
╰─▶ cat /proc/version_
Ubuntu 4.15.0-
╰─▶ cat /proc/cmdline
BOOT_IMAGE=
---
ApportVersion: 2.20.9-0ubuntu4
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
CurrentDesktop: GNOME
DistroRelease: Ubuntu 18.04
HibernationDevice:
RESUME=
#RESUME=/dev/dm-2
#RESUME=
InstallationDate: Installed on 2016-12-22 (476 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
MachineType: Dell Inc. Latitude E7470
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=
ProcVersionSign
RelatedPackageV
linux-
linux-
linux-firmware 1.173
Tags: bionic apport-hook-error
Uname: Linux 4.15.0-13-generic x86_64
UnreportableReason: This report is about a package that is not installed.
UpgradeStatus: Upgraded to bionic on 2017-09-18 (206 days ago)
UserGroups: adm cdrom dialout dip docker libvirt lp lpadmin lxd plugdev sambashare scanner src sudo tss wireshark
_MarkForUpload: False
dmi.bios.date: 12/11/2017
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.18.5
dmi.board.name: 0T6HHJ
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.family: Latitude
dmi.product.name: Latitude E7470
dmi.sys.vendor: Dell Inc.
description: | updated |
tags: | added: originate-from-1776806 somerville |
Changed in linux-oem (Ubuntu Bionic): | |
status: | New → Fix Committed |
tags: | added: kernel-bug-exists-upstream |
Changed in linux (Ubuntu): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu Bionic): | |
status: | Incomplete → Confirmed |
Changed in linux (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in linux (Ubuntu Bionic): | |
status: | Confirmed → Fix Released |
Changed in hwe-next: | |
status: | New → Fix Released |
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1763594
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.