大约两周前,我将 Gentoo Linux 系统上的 Linux 内核从 4.9.76 升级到 5.4.38。从那时起,当我插入 DVD 时,我的 DVD 驱动器将停止旋转,并且我的笔记本电脑无法再挂起到 RAM。这在启动后仍然有效,但将在大约一周后开始播放(到目前为止两次)。
我发现进程cdrom_id
和udev
处于不间断睡眠状态(D
由ps
- 我将dmesg
输出添加到本文底部表示)。由于前者是后者的孩子,我怀疑cdrom_id
是罪魁祸首。此外,从 切换到systemd udev
也eudev
没有帮助。 此错误报告从 2011 年开始,显示了类似的内容,与涉及调用的内核错误有关check_disk_change()
。差异显示,这个调用已从drivers/cdrom/cdrom.c
提到的两个内核版本之间的内核源代码中删除,但我没有足够的知识来从该差异中了解更多信息。
这是 Linux 内核中的错误吗?如果是这样,我应该报告吗?在哪里/如何报告?将 scsi cdrom 驱动程序编译为模块 ( sr_mod
) 是否会提供一种解决方法,因为卸载并重新加载该模块将阻止我每周重新启动笔记本电脑? (作为一项运动,我尝试将重新启动的次数保持在最低限度;在此之前的最后一次是在 11 月,每周一次会让我失去积分;-))。
“附录”:尝试挂起到 RAM 时的 dmesg 输出:
Sat May 23 08:30:04 2020 PM: suspend entry (deep)
Sat May 23 08:30:04 2020 Filesystems sync: 0.002 seconds
Sat May 23 08:30:04 2020 Freezing user space processes ...
Sat May 23 08:30:24 2020 Freezing of tasks failed after 20.001 seconds (2 tasks refusing to freeze, wq_busy=0):
Sat May 23 08:30:24 2020 udevd D 0 26961 1837 0x80004006
Sat May 23 08:30:24 2020 Call Trace:
Sat May 23 08:30:24 2020 ? __schedule+0x355/0x750
Sat May 23 08:30:24 2020 schedule+0x3e/0xc0
Sat May 23 08:30:24 2020 schedule_preempt_disabled+0xf/0x20
Sat May 23 08:30:24 2020 __mutex_lock.isra.0+0x25e/0x510
Sat May 23 08:30:24 2020 ? try_to_wake_up+0x75/0x6a0
Sat May 23 08:30:24 2020 ? _raw_spin_unlock+0xd/0x20
Sat May 23 08:30:24 2020 ? __queue_work+0x154/0x430
Sat May 23 08:30:24 2020 sr_block_release+0x18/0x40
Sat May 23 08:30:24 2020 __blkdev_put+0x1b6/0x1d0
Sat May 23 08:30:24 2020 ? disk_flush_events+0x4b/0x60
Sat May 23 08:30:24 2020 blkdev_close+0x1d/0x20
Sat May 23 08:30:24 2020 __fput+0xa9/0x230
Sat May 23 08:30:24 2020 task_work_run+0x7f/0xa0
Sat May 23 08:30:24 2020 do_exit+0x347/0xb00
Sat May 23 08:30:24 2020 ? devkmsg_write.cold+0x24/0x46
Sat May 23 08:30:24 2020 do_group_exit+0x35/0x90
Sat May 23 08:30:24 2020 get_signal+0x13a/0x880
Sat May 23 08:30:24 2020 ? vfs_writev+0xbe/0xf0
Sat May 23 08:30:24 2020 do_signal+0x2b/0x620
Sat May 23 08:30:24 2020 ? recalibrate_cpu_khz+0x10/0x10
Sat May 23 08:30:24 2020 ? ktime_get_ts64+0x41/0xe0
Sat May 23 08:30:24 2020 exit_to_usermode_loop+0x65/0xb0
Sat May 23 08:30:24 2020 do_syscall_64+0xef/0x110
Sat May 23 08:30:24 2020 entry_SYSCALL_64_after_hwframe+0x44/0xa9
Sat May 23 08:30:24 2020 RIP: 0033:0x7f312be2dac3
Sat May 23 08:30:24 2020 Code: Bad RIP value.
Sat May 23 08:30:24 2020 RSP: 002b:00007ffdbe2ab7d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000007
Sat May 23 08:30:24 2020 RAX: fffffffffffffdfc RBX: 00007ffdbe2ab858 RCX: 00007f312be2dac3
Sat May 23 08:30:24 2020 RDX: 00000000000003e8 RSI: 0000000000000001 RDI: 00007ffdbe2ab858
Sat May 23 08:30:24 2020 RBP: 20c49ba5e353f7cf R08: 000000000000c000 R09: 00007ffdbe2ada20
Sat May 23 08:30:24 2020 R10: 0000000000006959 R11: 0000000000000246 R12: 00000000000003e8
Sat May 23 08:30:24 2020 R13: 0000000000000000 R14: 000000000aba9500 R15: 000055bc3b411180
Sat May 23 08:30:24 2020 cdrom_id D 0 26969 26961 0x00000004
Sat May 23 08:30:24 2020 Call Trace:
Sat May 23 08:30:24 2020 ? __schedule+0x355/0x750
Sat May 23 08:30:24 2020 schedule+0x3e/0xc0
Sat May 23 08:30:24 2020 blk_queue_enter+0x15e/0x270
Sat May 23 08:30:24 2020 ? wait_woken+0x70/0x70
Sat May 23 08:30:24 2020 blk_mq_alloc_request+0x59/0xd0
Sat May 23 08:30:24 2020 blk_get_request+0x1e/0x60
Sat May 23 08:30:24 2020 sg_io+0x97/0x3b0
Sat May 23 08:30:24 2020 ? blk_mq_run_hw_queue+0x43/0xe0
Sat May 23 08:30:24 2020 scsi_cmd_ioctl+0x223/0x3c0
Sat May 23 08:30:24 2020 cdrom_ioctl+0x37/0xddd
Sat May 23 08:30:24 2020 ? _raw_spin_unlock_irqrestore+0xf/0x30
Sat May 23 08:30:24 2020 ? __pm_runtime_resume+0x44/0x50
Sat May 23 08:30:24 2020 sr_block_ioctl+0x99/0xc0
Sat May 23 08:30:24 2020 blkdev_ioctl+0x299/0xa10
Sat May 23 08:30:24 2020 block_ioctl+0x34/0x40
Sat May 23 08:30:24 2020 do_vfs_ioctl+0x3e6/0x640
Sat May 23 08:30:24 2020 ? preempt_count_add+0x44/0x90
Sat May 23 08:30:24 2020 ? __fd_install+0x49/0xc0
Sat May 23 08:30:24 2020 ksys_ioctl+0x35/0x70
Sat May 23 08:30:24 2020 ? switch_fpu_return+0x28/0x130
Sat May 23 08:30:24 2020 __x64_sys_ioctl+0x11/0x20
Sat May 23 08:30:24 2020 do_syscall_64+0x43/0x110
Sat May 23 08:30:24 2020 entry_SYSCALL_64_after_hwframe+0x44/0xa9
Sat May 23 08:30:24 2020 RIP: 0033:0x7f3146bbd2b7
Sat May 23 08:30:24 2020 Code: Bad RIP value.
Sat May 23 08:30:24 2020 RSP: 002b:00007fffc77c9e08 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Sat May 23 08:30:24 2020 RAX: ffffffffffffffda RBX: 00007fffc77c9e20 RCX: 00007f3146bbd2b7
Sat May 23 08:30:24 2020 RDX: 00007fffc77c9ea0 RSI: 0000000000002285 RDI: 0000000000000003
Sat May 23 08:30:24 2020 RBP: 0000565531d002a0 R08: 00007fffc77c9e20 R09: 0000000000000000
Sat May 23 08:30:24 2020 R10: fffffffffffffcf2 R11: 0000000000000246 R12: 0000000000000003
Sat May 23 08:30:24 2020 R13: 0000000000000000 R14: 00007fffc77c9fd0 R15: 00007fffc77caed8
Sat May 23 08:30:24 2020 OOM killer enabled.
Sat May 23 08:30:24 2020 Restarting tasks ... done.
Sat May 23 08:30:24 2020 PM: suspend exit