Ok, I reproduced this on a rebuild of 6.5.0-34 with
CONFIG_PROVE_LOCKING. Here are some relevant-looking bits of the logs.
It looks like the wireplumber process and the usb_disconnect process
have deadlocked?
[Thinking about this further, possibly the action that triggers it is to
disconnect the dock while the system is suspended, then resume the
system.]
Apr 29 21:24:36 xps9320 kernel: [280990.641315] INFO: task wireplumber:3263
blocked for more than 241 seconds.
Apr 29 21:24:36 xps9320 kernel: [280990.641334] Tainted: G OE
6.5.13+ #18
Apr 29 21:24:36 xps9320 kernel: [280990.641341] "echo 0 >
/proc/sys/kernel/hung_task_timeout_secs" disables this message.
Apr 29 21:24:36 xps9320 kernel: [280990.641346] task:wireplumber state:D
stack:0 pid:3263 ppid:3253 flags:0x00000002
Apr 29 21:24:36 xps9320 kernel: [280990.641360] Call Trace:
Apr 29 21:24:36 xps9320 kernel: [280990.641367] <TASK>
Apr 29 21:24:36 xps9320 kernel: [280990.641382] __schedule+0x4cc/0x1ad0
Apr 29 21:24:36 xps9320 kernel: [280990.641401] ? trace_hardirqs_on+0x65/0xc0
Apr 29 21:24:36 xps9320 kernel: [280990.641414] ?
_raw_spin_unlock_irqrestore+0x31/0x70
Apr 29 21:24:36 xps9320 kernel: [280990.641424] ?
__wake_up_common_lock+0x8d/0xd0
Apr 29 21:24:36 xps9320 kernel: [280990.641442] schedule+0x68/0x110
Apr 29 21:24:36 xps9320 kernel: [280990.641456]
snd_power_ref_and_wait+0xbd/0x120 [snd]
Apr 29 21:24:36 xps9320 kernel: [280990.641486] ?
__pfx_autoremove_wake_function+0x10/0x10
Apr 29 21:24:36 xps9320 kernel: [280990.641501] snd_ctl_elem_info+0x4f/0x1b0
[snd]
Apr 29 21:24:36 xps9320 kernel: [280990.641532]
snd_ctl_elem_info_user+0x4e/0xb0 [snd]
Apr 29 21:24:36 xps9320 kernel: [280990.641581] snd_ctl_ioctl+0x1ec/0x850 [snd]
Apr 29 21:24:36 xps9320 kernel: [280990.641608] ? __fget_files+0xde/0x1d0
Apr 29 21:24:36 xps9320 kernel: [280990.641625] __x64_sys_ioctl+0x9d/0xe0
Apr 29 21:24:36 xps9320 kernel: [280990.641637] x64_sys_call+0x1fe9/0x2570
Apr 29 21:24:36 xps9320 kernel: [280990.641646] do_syscall_64+0x56/0x90
Apr 29 21:24:36 xps9320 kernel: [280990.641657] ? do_syscall_64+0x63/0x90
Apr 29 21:24:36 xps9320 kernel: [280990.641665] ? do_syscall_64+0x63/0x90
Apr 29 21:24:36 xps9320 kernel: [280990.641675]
entry_SYSCALL_64_after_hwframe+0x73/0xdd
Apr 29 21:24:36 xps9320 kernel: [280990.641683] RIP: 0033:0x70991f71a94f
Apr 29 21:24:36 xps9320 kernel: [280990.641692] RSP: 002b:00007ffc84003090
EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Apr 29 21:24:36 xps9320 kernel: [280990.641701] RAX: ffffffffffffffda RBX:
00007ffc84003100 RCX: 000070991f71a94f
Apr 29 21:24:36 xps9320 kernel: [280990.641707] RDX: 00007ffc84003100 RSI:
00000000c1105511 RDI: 0000000000000022
Apr 29 21:24:36 xps9320 kernel: [280990.641713] RBP: 00007ffc840032e0 R08:
00006231bc666330 R09: 0000000000000004
Apr 29 21:24:36 xps9320 kernel: [280990.641718] R10: fffffffffffff314 R11:
0000000000000246 R12: 00006231bc90dc50
Apr 29 21:24:36 xps9320 kernel: [280990.641723] R13: 00006231bc7c9140 R14:
00007ffc84003280 R15: 00007ffc84003220
Apr 29 21:24:36 xps9320 kernel: [280990.641745] </TASK>
Apr 29 21:24:36 xps9320 kernel: [280990.642222] INFO: task kworker/2:3:67822
blocked for more than 241 seconds.
Apr 29 21:24:36 xps9320 kernel: [280990.642229] Tainted: G OE
6.5.13+ #18
Apr 29 21:24:36 xps9320 kernel: [280990.642234] "echo 0 >
/proc/sys/kernel/hung_task_timeout_secs" disables this message.
Apr 29 21:24:36 xps9320 kernel: [280990.642239] task:kworker/2:3 state:D
stack:0 pid:67822 ppid:2 flags:0x00004000
Apr 29 21:24:36 xps9320 kernel: [280990.642250] Workqueue: usb_hub_wq hub_event
Apr 29 21:24:36 xps9320 kernel: [280990.642262] Call Trace:
Apr 29 21:24:36 xps9320 kernel: [280990.642266] <TASK>
Apr 29 21:24:36 xps9320 kernel: [280990.642274] __schedule+0x4cc/0x1ad0
Apr 29 21:24:36 xps9320 kernel: [280990.642285] ? mark_held_locks+0x4d/0x90
Apr 29 21:24:36 xps9320 kernel: [280990.642303] schedule+0x68/0x110
Apr 29 21:24:36 xps9320 kernel: [280990.642312]
schedule_preempt_disabled+0x15/0x30
Apr 29 21:24:36 xps9320 kernel: [280990.642321]
rwsem_down_write_slowpath+0x2bc/0x820
Apr 29 21:24:36 xps9320 kernel: [280990.642342] down_write+0xde/0xe0
Apr 29 21:24:36 xps9320 kernel: [280990.642353]
snd_pcm_dev_disconnect+0x1cb/0x280 [snd_pcm]
Apr 29 21:24:36 xps9320 kernel: [280990.642386]
snd_device_disconnect_all+0x47/0xa0 [snd]
Apr 29 21:24:36 xps9320 kernel: [280990.642411]
snd_card_disconnect.part.0+0x10d/0x270 [snd]
Apr 29 21:24:36 xps9320 kernel: [280990.642439] snd_card_disconnect+0x13/0x30
[snd]
Apr 29 21:24:36 xps9320 kernel: [280990.642462]
usb_audio_disconnect+0x116/0x290 [snd_usb_audio]
Apr 29 21:24:36 xps9320 kernel: [280990.642504] usb_unbind_interface+0x90/0x280
Apr 29 21:24:36 xps9320 kernel: [280990.642518] device_remove+0x69/0x80
Apr 29 21:24:36 xps9320 kernel: [280990.642528]
device_release_driver_internal+0x20d/0x280
Apr 29 21:24:36 xps9320 kernel: [280990.642539] device_release_driver+0x12/0x20
Apr 29 21:24:36 xps9320 kernel: [280990.642545] bus_remove_device+0xdc/0x150
Apr 29 21:24:36 xps9320 kernel: [280990.642556] device_del+0x160/0x3d0
Apr 29 21:24:36 xps9320 kernel: [280990.642572] usb_disable_device+0xe1/0x280
Apr 29 21:24:36 xps9320 kernel: [280990.642586] usb_disconnect+0xe6/0x2f0
Apr 29 21:24:36 xps9320 kernel: [280990.642600] usb_disconnect+0xcb/0x2f0
Apr 29 21:24:36 xps9320 kernel: [280990.642614] usb_disconnect+0xcb/0x2f0
Apr 29 21:24:36 xps9320 kernel: [280990.642628] hub_event+0xe2d/0x1ce0
Apr 29 21:24:36 xps9320 kernel: [280990.642654] process_one_work+0x2bf/0x5a0
Apr 29 21:24:36 xps9320 kernel: [280990.642663] ? process_one_work+0x260/0x5a0
Apr 29 21:24:36 xps9320 kernel: [280990.642678] worker_thread+0x52/0x3f0
Apr 29 21:24:36 xps9320 kernel: [280990.642689] ? __pfx_worker_thread+0x10/0x10
Apr 29 21:24:36 xps9320 kernel: [280990.642697] kthread+0xf7/0x130
Apr 29 21:24:36 xps9320 kernel: [280990.642704] ? __pfx_kthread+0x10/0x10
Apr 29 21:24:36 xps9320 kernel: [280990.642713] ret_from_fork+0x43/0x70
Apr 29 21:24:36 xps9320 kernel: [280990.642721] ? __pfx_kthread+0x10/0x10
Apr 29 21:24:36 xps9320 kernel: [280990.642729] ret_from_fork_asm+0x1b/0x30
Apr 29 21:24:36 xps9320 kernel: [280990.642748] </TASK>
Apr 29 21:24:36 xps9320 kernel: [280990.642773]
Apr 29 21:24:36 xps9320 kernel: [280990.642773] Showing all locks held in the
system:
Apr 29 21:24:36 xps9320 kernel: [280990.642783] 1 lock held by
rcu_tasks_kthre/12:
Apr 29 21:24:36 xps9320 kernel: [280990.642789] #0: ffffffff9ffa4770
(rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x31/0x490
Apr 29 21:24:36 xps9320 kernel: [280990.642811] 1 lock held by
rcu_tasks_rude_/13:
Apr 29 21:24:36 xps9320 kernel: [280990.642816] #0: ffffffff9ffa44f0
(rcu_tasks_rude.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x31/0x490
Apr 29 21:24:36 xps9320 kernel: [280990.642834] 1 lock held by
rcu_tasks_trace/14:
Apr 29 21:24:36 xps9320 kernel: [280990.642839] #0: ffffffff9ffa4230
(rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x31/0x490
Apr 29 21:24:36 xps9320 kernel: [280990.642865] 1 lock held by khungtaskd/114:
Apr 29 21:24:36 xps9320 kernel: [280990.642870] #0: ffffffff9ffa5260
(rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x37/0x220
Apr 29 21:24:36 xps9320 kernel: [280990.642902] 1 lock held by in:imklog/1824:
Apr 29 21:24:36 xps9320 kernel: [280990.642907] #0: ffff91128a130cc8
(&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x4f/0x80
Apr 29 21:24:36 xps9320 kernel: [280990.642966] 1 lock held by wireplumber/3263:
Apr 29 21:24:36 xps9320 kernel: [280990.642971] #0: ffff911281646698
(&card->controls_rwsem){++++}-{3:3}, at: snd_ctl_elem_info+0x30/0x1b0 [snd]
Apr 29 21:24:36 xps9320 kernel: [280990.643185] 4 locks held by
pipe-connection/11701:
Apr 29 21:24:36 xps9320 kernel: [280990.643191] #0: ffff9116767eb4c8
(&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x4f/0x80
Apr 29 21:24:36 xps9320 kernel: [280990.643206] #1: ffff911282d1c0a0
(&p->lock){+.+.}-{3:3}, at: seq_read_iter+0x6a/0x500
Apr 29 21:24:36 xps9320 kernel: [280990.643220] #2: ffff9112b8e82a88
(&of->mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x2f/0x120
Apr 29 21:24:36 xps9320 kernel: [280990.643237] #3: ffff9112d06ed190
(&dev->mutex){....}-{3:3}, at: bConfigurationValue_show+0x27/0x80
Apr 29 21:24:36 xps9320 kernel: [280990.643405] 11 locks held by
kworker/2:3/67822:
Apr 29 21:24:36 xps9320 kernel: [280990.643410] #0: ffff9112833fb538
((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x260/0x5a0
Apr 29 21:24:36 xps9320 kernel: [280990.643426] #1: ffffb1b164ad3e40
((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x260/0x5a0
Apr 29 21:24:36 xps9320 kernel: [280990.643441] #2: ffff9112d0a5a990
(&dev->mutex){....}-{3:3}, at: hub_event+0x7b/0x1ce0
Apr 29 21:24:36 xps9320 kernel: [280990.643454] #3: ffff9112d0ab0990
(&dev->mutex){....}-{3:3}, at: usb_disconnect+0x7e/0x2f0
Apr 29 21:24:36 xps9320 kernel: [280990.643470] #4: ffff911283742990
(&dev->mutex){....}-{3:3}, at: usb_disconnect+0x7e/0x2f0
Apr 29 21:24:36 xps9320 kernel: [280990.643485] #5: ffff9112d06ed190
(&dev->mutex){....}-{3:3}, at: usb_disconnect+0x7e/0x2f0
Apr 29 21:24:36 xps9320 kernel: [280990.643501] #6: ffff9112d06ec160
(&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0x55/0x280
Apr 29 21:24:36 xps9320 kernel: [280990.643515] #7: ffffffffc18026a8
(register_mutex#3){+.+.}-{3:3}, at: usb_audio_disconnect+0x47/0x290
[snd_usb_audio]
Apr 29 21:24:36 xps9320 kernel: [280990.643553] #8: ffffffffc1709f28
(register_mutex#4){+.+.}-{3:3}, at: snd_pcm_dev_disconnect+0x37/0x280 [snd_pcm]
Apr 29 21:24:36 xps9320 kernel: [280990.643587] #9: ffff91128b14ca60
(&pcm->open_mutex){+.+.}-{3:3}, at: snd_pcm_dev_disconnect+0x41/0x280 [snd_pcm]
Apr 29 21:24:36 xps9320 kernel: [280990.643617] #10: ffff911281646698
(&card->controls_rwsem){++++}-{3:3}, at: snd_pcm_dev_disconnect+0x1cb/0x280
[snd_pcm]
Apr 29 21:24:36 xps9320 kernel: [280990.643656] 2 locks held by less/69421:
Apr 29 21:24:36 xps9320 kernel: [280990.643661] #0: ffff9114065c2898
(&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x25/0x40
Apr 29 21:24:36 xps9320 kernel: [280990.643677] #1: ffffb1b1494832f0
(&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x59f/0x6c0
Apr 29 21:24:36 xps9320 kernel: [280990.643702]
Apr 29 21:24:36 xps9320 kernel: [280990.643707]
=============================================
Apr 29 21:24:36 xps9320 kernel: [280990.643707]
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-signed-hwe-6.5 in Ubuntu.
https://bugs.launchpad.net/bugs/2061091
Title:
Freezing user space processes failed after 20.008 seconds (1 tasks
refusing to freeze, wq_busy=0)
Status in linux-signed-hwe-6.5 package in Ubuntu:
New
Bug description:
Sometimes, when trying to shut down or suspend my laptop, it gets
stuck on the console screen. If I was suspending, it eventually gives
up and goes back to the X session. During a shutdown it hangs forever
and the only solution seems to be to force a reboot with Magic-SysRq.
The following appears in `kern.log`:
```
Apr 12 08:59:54 xps9320 kernel: [173172.510341] Freezing user space processes
failed after 20.008 seconds (1 tasks refusing to freeze, wq_busy=0):
Apr 12 08:59:54 xps9320 kernel: [173172.515669] task:wireplumber state:D
stack:0 pid:2408 ppid:2398 flags:0x00000006
Apr 12 08:59:54 xps9320 kernel: [173172.518923] Call Trace:
Apr 12 08:59:54 xps9320 kernel: [173172.521755] <TASK>
Apr 12 08:59:54 xps9320 kernel: [173172.524099] __schedule+0x2cb/0x750
Apr 12 08:59:54 xps9320 kernel: [173172.526333] schedule+0x63/0x110
Apr 12 08:59:54 xps9320 kernel: [173172.528585]
snd_power_ref_and_wait+0xe5/0x140 [snd]
Apr 12 08:59:54 xps9320 kernel: [173172.530825] ?
__pfx_autoremove_wake_function+0x10/0x10
Apr 12 08:59:54 xps9320 kernel: [173172.533103] snd_ctl_elem_info+0x4f/0x1b0
[snd]
Apr 12 08:59:54 xps9320 kernel: [173172.535354]
snd_ctl_elem_info_user+0x59/0xc0 [snd]
Apr 12 08:59:54 xps9320 kernel: [173172.537598] snd_ctl_ioctl+0x1d4/0x650
[snd]
Apr 12 08:59:54 xps9320 kernel: [173172.539846] ? __fget_light+0xa5/0x120
Apr 12 08:59:54 xps9320 kernel: [173172.542082] __x64_sys_ioctl+0xa0/0xf0
Apr 12 08:59:54 xps9320 kernel: [173172.544334] do_syscall_64+0x58/0x90
Apr 12 08:59:54 xps9320 kernel: [173172.546566] ?
syscall_exit_to_user_mode+0x37/0x60
Apr 12 08:59:54 xps9320 kernel: [173172.548838] ? do_syscall_64+0x67/0x90
Apr 12 08:59:54 xps9320 kernel: [173172.551085] ? do_syscall_64+0x67/0x90
Apr 12 08:59:54 xps9320 kernel: [173172.553342] ?
syscall_exit_to_user_mode+0x37/0x60
Apr 12 08:59:54 xps9320 kernel: [173172.555596] ? do_syscall_64+0x67/0x90
Apr 12 08:59:54 xps9320 kernel: [173172.557828] ? common_interrupt+0x54/0xb0
Apr 12 08:59:54 xps9320 kernel: [173172.560075]
entry_SYSCALL_64_after_hwframe+0x6e/0xd8
Apr 12 08:59:54 xps9320 kernel: [173172.562321] RIP: 0033:0x70f3adb1a94f
Apr 12 08:59:54 xps9320 kernel: [173172.564650] RSP: 002b:00007ffef2072940
EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Apr 12 08:59:54 xps9320 kernel: [173172.566925] RAX: ffffffffffffffda RBX:
00007ffef20729b0 RCX: 000070f3adb1a94f
Apr 12 08:59:54 xps9320 kernel: [173172.569222] RDX: 00007ffef20729b0 RSI:
00000000c1105511 RDI: 0000000000000022
Apr 12 08:59:54 xps9320 kernel: [173172.571501] RBP: 00007ffef2072b90 R08:
000065107d2b6070 R09: 0000000000000004
Apr 12 08:59:54 xps9320 kernel: [173172.573762] R10: fffffffffffff014 R11:
0000000000000246 R12: 000065107d2ee100
Apr 12 08:59:54 xps9320 kernel: [173172.576047] R13: 000065107d1fb400 R14:
00007ffef2072b30 R15: 00007ffef2072ad0
Apr 12 08:59:54 xps9320 kernel: [173172.578308] </TASK>
```
Another point of interest is that, when in this situation:
* `lsusb` hangs after printing out a few lines
* Outgoing SSH connections hang unless I clear SSH_AUTH_SOCK. gpg-agent
appears to be trying to check for smartcards.
So I guess there is some sort of deadlock in the USB subsystem which
is causing all the other problems?
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: linux-image-6.5.0-27-generic 6.5.0-27.28~22.04.1
ProcVersionSignature: Ubuntu 6.5.0-27.28~22.04.1-generic 6.5.13
Uname: Linux 6.5.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 12 09:42:52 2024
InstallationDate: Installed on 2022-06-28 (653 days ago)
InstallationMedia: Xubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64
(20220419)
SourcePackage: linux-signed-hwe-6.5
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux-signed-hwe-6.5/+bug/2061091/+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