** Also affects: linux (Ubuntu Cosmic)
Importance: Medium
Status: Confirmed
** Also affects: linux (Ubuntu Bionic)
Importance: Undecided
Status: New
** Changed in: linux (Ubuntu Bionic)
Status: New => Fix Committed
** Changed in: linux (Ubuntu Cosmic)
Status: Confirmed => In Progress
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1768852
Title:
Kernel bug when unplugging Thunderbolt 3 cable, leaves xHCI host
controller dead
Status in linux package in Ubuntu:
In Progress
Status in linux source package in Bionic:
Fix Committed
Status in linux source package in Cosmic:
In Progress
Bug description:
===SRU Justification===
[Impact]
When unplugging the Thunderbolt 3 cable from the TBT controller, kernel
oops.
[Test]
The user confirms this patch works.
[Fix]
tty_unregister_driver may be called more than 1 time in some
hotplug cases,it will cause the kernel oops. This patch checked
dbc_tty_driver to make sure it is unregistered only 1 time.
[Regression Potential]
Low. The change is to guard against null pointer, so it's the correct
behavior.
===Original Bugreport===
When unplugging the Thunderbolt 3 cable that was connected to a Lenovo
Thunderbolt 3 Dock:
[78402.194718] xhci_hcd 0000:0f:00.0: remove, state 4
[78402.194726] usb usb8: USB disconnect, device number 1
[78402.194727] usb 8-2: USB disconnect, device number 2
[78402.195072] xhci_hcd 0000:0f:00.0: USB bus 8 deregistered
[78402.195077] xhci_hcd 0000:0f:00.0: xHCI host controller not responding,
assume dead
[78402.195086] xhci_hcd 0000:0f:00.0: remove, state 1
[78402.195091] usb usb7: USB disconnect, device number 1
[78402.195092] usb 7-2: USB disconnect, device number 2
[78402.195094] usb 7-2.1: USB disconnect, device number 3
[78402.242648] usb 7-2.2: USB disconnect, device number 4
[78402.246827] xhci_hcd 0000:0f:00.0: Host halt failed, -19
[78402.246829] xhci_hcd 0000:0f:00.0: Host not accessible, reset failed.
[78402.246917] xhci_hcd 0000:0f:00.0: USB bus 7 deregistered
[78402.247998] pcieport 0000:0a:03.0: Refused to change power state,
currently in D3
[78402.255841] xhci_hcd 0000:0d:00.0: remove, state 1
[78402.255847] usb usb6: USB disconnect, device number 1
[78402.255849] usb 6-1: USB disconnect, device number 2
[78402.255900] xhci_hcd 0000:0d:00.0: xHCI host controller not responding,
assume dead
[78402.255920] r8152 5-3.4.3:1.0 enx00e04c6814c6: Stop submitting intr,
status -108
[78402.302674] xhci_hcd 0000:0d:00.0: USB bus 6 deregistered
[78402.302679] xhci_hcd 0000:0d:00.0: remove, state 1
[78402.302685] usb usb5: USB disconnect, device number 1
[78402.302687] usb 5-3: USB disconnect, device number 2
[78402.302688] usb 5-3.4: USB disconnect, device number 3
[78402.302689] usb 5-3.4.1: USB disconnect, device number 4
[78402.430677] usb 5-3.4.2: USB disconnect, device number 5
[78402.470512] usb 5-3.4.3: USB disconnect, device number 6
[78402.506481] usb 5-3.4.4: USB disconnect, device number 7
[78402.507533] BUG: unable to handle kernel NULL pointer dereference at
0000000000000034
[78402.507540] IP: tty_unregister_driver+0xd/0x70
[78402.507542] PGD 0 P4D 0
[78402.507544] Oops: 0000 [#1] SMP PTI
[78402.507546] Modules linked in: xt_nat xt_tcpudp veth rfcomm ipt_MASQUERADE
nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo
iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype
iptable_filter xt_conntrack nf_nat nf_conntrack libcrc32c br_netfilter bridge
stp llc ccm cmac bnep binfmt_misc nls_iso8859_1 intel_rapl x86_pkg_temp_thermal
intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul
ghash_clmulni_intel pcbc arc4 aesni_intel aes_x86_64 crypto_simd glue_helper
cryptd intel_cstate intel_rapl_perf snd_hda_codec_hdmi snd_soc_skl
snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc
snd_hda_codec_conexant snd_soc_acpi snd_hda_codec_generic snd_soc_core joydev
snd_compress serio_raw ac97_bus snd_pcm_dmaengine wmi_bmof intel_wmi_thunderbolt
[78402.507582] snd_hda_intel snd_hda_codec snd_hda_core iwlmvm input_leds
mac80211 snd_usb_audio snd_usbmidi_lib cdc_ether snd_hwdep r8152 iwlwifi
snd_pcm uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2
videobuf2_core videodev thinkpad_acpi media cfg80211 nvram cdc_mbim qcserial
cdc_wdm cdc_ncm snd_seq_midi usb_wwan snd_seq_midi_event usbnet rtsx_pci_ms
btusb snd_rawmidi btrtl memstick btbcm usbserial mii btintel snd_seq bluetooth
snd_seq_device snd_timer mei_me ucsi_acpi mei shpchp intel_pch_thermal
typec_ucsi ecdh_generic snd typec soundcore acpi_pad mac_hid sch_fq_codel
parport_pc ppdev lp parport ip_tables x_tables autofs4 zfs(PO) zunicode(PO)
zavl(PO) icp(PO) zcommon(PO) znvpair(PO) spl(O) hid_generic usbhid
rtsx_pci_sdmmc i915 psmouse i2c_algo_bit e1000e drm_kms_helper syscopyarea
[78402.507629] ptp sysfillrect sysimgblt pps_core nvme rtsx_pci fb_sys_fops
thunderbolt nvme_core drm wmi i2c_hid video hid
[78402.507639] CPU: 0 PID: 15421 Comm: kworker/u8:3 Tainted: P O
4.15.0-20-generic #21-Ubuntu
[78402.507640] Hardware name: LENOVO 20HRCTO1WW/20HRCTO1WW, BIOS N1MET38W
(1.23 ) 08/30/2017
[78402.507644] Workqueue: kacpi_hotplug acpi_hotplug_work_fn
[78402.507648] RIP: 0010:tty_unregister_driver+0xd/0x70
[78402.507649] RSP: 0018:ffffa16e94de3af0 EFLAGS: 00010246
[78402.507651] RAX: 0000000000000000 RBX: 0000000000000000 RCX:
0000000000000000
[78402.507652] RDX: ffff8c4e4e972f00 RSI: fffff687520f9380 RDI:
0000000000000000
[78402.507654] RBP: ffffa16e94de3af8 R08: ffff8c4e43e4e110 R09:
00000001801e0013
[78402.507655] R10: fffff687512bfa00 R11: 0000000000000000 R12:
ffff8c4e43e0e230
[78402.507656] R13: ffff8c4e43e0e27c R14: ffff8c4e43e0e390 R15:
0000000000000060
[78402.507658] FS: 0000000000000000(0000) GS:ffff8c4e61400000(0000)
knlGS:0000000000000000
[78402.507659] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[78402.507661] CR2: 0000000000000034 CR3: 00000003ef40a001 CR4:
00000000003606f0
[78402.507662] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[78402.507664] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
0000000000000400
[78402.507665] Call Trace:
[78402.507671] xhci_dbc_tty_unregister_driver+0x15/0x30
[78402.507673] xhci_dbc_exit+0x2e/0x50
[78402.507676] xhci_stop+0x5b/0x1e0
[78402.507679] usb_remove_hcd+0x105/0x250
[78402.507681] usb_hcd_pci_remove+0x74/0x130
[78402.507683] xhci_pci_remove+0x6b/0x70
[78402.507686] pci_device_remove+0x3e/0xb0
[78402.507694] device_release_driver_internal+0x15b/0x220
[78402.507696] device_release_driver+0x12/0x20
[78402.507699] pci_stop_bus_device+0x7f/0xa0
[78402.507701] pci_stop_bus_device+0x30/0xa0
[78402.507703] pci_stop_bus_device+0x41/0xa0
[78402.507705] pci_stop_and_remove_bus_device+0x12/0x20
[78402.507708] trim_stale_devices+0x11d/0x150
[78402.507711] trim_stale_devices+0xa9/0x150
[78402.507713] trim_stale_devices+0xbb/0x150
[78402.507715] ? get_slot_status+0xa3/0xe0
[78402.507718] acpiphp_check_bridge.part.7+0x100/0x140
[78402.507720] acpiphp_hotplug_notify+0x18e/0x220
[78402.507723] ? free_bridge+0x100/0x100
[78402.507725] acpi_device_hotplug+0xa4/0x4b0
[78402.507727] acpi_hotplug_work_fn+0x1e/0x30
[78402.507730] process_one_work+0x1de/0x410
[78402.507732] worker_thread+0x32/0x410
[78402.507735] kthread+0x121/0x140
[78402.507737] ? process_one_work+0x410/0x410
[78402.507739] ? kthread_create_worker_on_cpu+0x70/0x70
[78402.507742] ? do_syscall_64+0x73/0x130
[78402.507744] ? SyS_exit_group+0x14/0x20
[78402.507746] ret_from_fork+0x35/0x40
[78402.507748] Code: c2 bf 2c 94 b6 48 c7 c7 90 0d e4 b6 e8 ed 92 ee ff 48 89
df e8 85 c7 c6 ff 5b 5d c3 66 90 0f 1f 44 00 00 55 48 89 e5 53 48 89 fb <8b> 77
34 8b 7f 2c c1 e7 14 0b 7b 30 e8 22 15 ca ff 48 c7 c7 e0
[78402.507776] RIP: tty_unregister_driver+0xd/0x70 RSP: ffffa16e94de3af0
[78402.507777] CR2: 0000000000000034
[78402.507779] ---[ end trace 5ed527061c666404 ]---
[78402.808128] thinkpad_acpi: EC reports that Thermal Table has changed
Some time later (cable *not* plugged back in yet):
[79559.939390] xhci_hcd 0000:0b:00.0: xHCI host controller not responding,
assume dead
[79559.939423] xhci_hcd 0000:0b:00.0: HC died; cleaning up
[79559.939448] xhci_hcd 0000:0b:00.0: Timeout while waiting for configure
endpoint command
[79559.939494] usb 3-1: Not enough bandwidth for altsetting 1
[79559.939504] usb 3-1: 2:1: usb_set_interface failed (-62)
[79559.940534] usb 3-1: Not enough bandwidth for altsetting 1
[79559.940546] usb 3-1: 2:1: usb_set_interface failed (-19)
[79559.940777] usb 3-1: Not enough bandwidth for altsetting 1
[79559.940787] usb 3-1: 2:1: usb_set_interface failed (-19)
[79559.941181] usb 3-1: Not enough bandwidth for altsetting 1
[79559.941188] usb 3-1: 2:1: usb_set_interface failed (-19)
[79559.941510] usb 3-1: Not enough bandwidth for altsetting 1
[79559.941517] usb 3-1: 2:1: usb_set_interface failed (-19)
[79559.941863] usb 3-1: USB disconnect, device number 2
[79560.000039] usb 3-4: USB disconnect, device number 3
When I plug the Thunderbolt 3 cable back in, the monitor ports of
Thunderbolt 3 Dock are working, but USB is not.
Hardware is a Lenovo ThinkPad X1 from 2017. This started happening after
updating to Ubuntu 18.04. It did not happen on Ubuntu 17.10.
---
ApportVersion: 2.20.9-0ubuntu7
Architecture: amd64
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/controlC1: alfred 5177 F.... pulseaudio
/dev/snd/controlC0: alfred 5177 F.... pulseaudio
CurrentDesktop: MATE
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2017-10-04 (210 days ago)
InstallationMedia: Ubuntu-MATE 17.04 "Zesty Zapus" - Release amd64 (20170412)
MachineType: LENOVO 20HRCTO1WW
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
Package: linux (not installed)
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/root/default@/boot/vmlinuz-4.15.0-20-generic
root=ZFS=zroot/root/default ro quiet splash vt.handoff=1
ProcVersionSignature: Ubuntu 4.15.0-20.21-generic 4.15.17
RelatedPackageVersions:
linux-restricted-modules-4.15.0-20-generic N/A
linux-backports-modules-4.15.0-20-generic N/A
linux-firmware 1.173
Tags: bionic
Uname: Linux 4.15.0-20-generic x86_64
UpgradeStatus: Upgraded to bionic on 2018-05-02 (1 days ago)
UserGroups: adm cdrom dip docker lpadmin plugdev sambashare sudo
WifiSyslog:
_MarkForUpload: True
dmi.bios.date: 08/30/2017
dmi.bios.vendor: LENOVO
dmi.bios.version: N1MET38W (1.23 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20HRCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: SDK0J40697 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.modalias:
dmi:bvnLENOVO:bvrN1MET38W(1.23):bd08/30/2017:svnLENOVO:pn20HRCTO1WW:pvrThinkPadX1Carbon5th:rvnLENOVO:rn20HRCTO1WW:rvrSDK0J40697WIN:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad X1 Carbon 5th
dmi.product.name: 20HRCTO1WW
dmi.product.version: ThinkPad X1 Carbon 5th
dmi.sys.vendor: LENOVO
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1768852/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp