Linux kernel 当我第二次挂载USB内存时进行原子调度

Linux kernel 当我第二次挂载USB内存时进行原子调度,linux-kernel,usb,Linux Kernel,Usb,我正在处理我们的嵌入式系统,当我第二次挂载USB内存时,我得到了这个“原子调度”错误。大约20秒后,装载成功,消息如下所示 我不是专家,我不知道该去哪里找。我应该去哪里看?(linux3.3) 第一座山很好用。我用umount/usb拆下记忆棒 # mount -t vfat /dev/sda0 /usb BUG: scheduling while atomic: scsi_eh_0/328/0x00000003 Modules linked in: [c0384d9c : wait_for

我正在处理我们的嵌入式系统,当我第二次挂载USB内存时,我得到了这个“原子调度”错误。大约20秒后,装载成功,消息如下所示

我不是专家,我不知道该去哪里找。我应该去哪里看?(linux3.3)

第一座山很好用。我用umount/usb拆下记忆棒

# mount -t vfat /dev/sda0 /usb


BUG: scheduling while atomic: scsi_eh_0/328/0x00000003
Modules linked in:
[c0384d9c : wait_for_common+0xcc/0x1a0 ] [c02b0474 : command_abort+0x94/0xe0 ] [c0273a8c : scsi_error_handler+0x3e4/0x524 ] [c00462e8 : kt 
ckim: or mask
ckim: connected 
RESUME int
usb 1-1: reset full-speed USB device number 2 using aldebaran-hcd
ckim: or mask
ckim: connected 
RESUME int
BUG: scheduling while atomic: scsi_eh_0/328/0x00000003
Modules linked in:
[c0384d9c : wait_for_common+0xcc/0x1a0 ] [c02722a8 : scsi_send_eh_cmnd+0x64/0x280 ] [c0272574 : scsi_eh_tur+0x18/0x94 ] [c0272654 : scsi_e 
BUG: scheduling while atomic: scsi_eh_0/328/0x00000003
Modules linked in:
[c00462e8 : kthread+0x78/0x8c ] [c0011540 : kernel_thread+0x34/0x50 ] [c0046530 : kthreadd+0xc8/0x148 ] 

通过修复中断服务例程,问题昨天得到了解决。当我拔出记忆棒时,端口状态未正确报告为已断开连接。通过修复它,这个问题消失了。当我第二次发出mount命令时,设备在不存在的情况下仍然被识别为已连接,我想这会导致长时间无响应的情况

加: 4个月后,我觉得问题已经解决了,几天前,在玩USB键盘时,当我断开USB键盘并重新连接时,我发现同样的问题出现了。下面是这条信息,以防万一有人能告诉我问题出在哪里

usb 1-1: USB disconnect, device number 2
BUG: scheduling while atomic: khubd/12/0x00000002
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c027fc2c : devtmpfs_delete_node+0xa0/0xc8 ] [c027920c : device_del+0x160/0x188 ] 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c027fc2c : devtmpfs_delete_node+0xa0/0xc8 ] [c027920c : device_del+0x160/0x188 ] 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c027fc2c : devtmpfs_delete_node+0xa0/0xc8 ] [c027920c : device_del+0x160/0x188 ] 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c027fc2c : devtmpfs_delete_node+0xa0/0xc8 ] [c027920c : device_del+0x160/0x188 ] 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b7f0c : hub_thread+0xc94/0x11d8 ] [c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_th 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b7f0c : hub_thread+0xc94/0x11d8 ] [c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_th 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b7f0c : hub_thread+0xc94/0x11d8 ] [c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_th 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b7f0c : hub_thread+0xc94/0x11d8 ] [c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_th 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_thread+0x34/0x50 ] [c0046dfc : kthreadd+0xc8/0x148 ] 
INSRMV int
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b7f0c : hub_thread+0xc94/0x11d8 ] [c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_th 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b7f0c : hub_thread+0xc94/0x11d8 ] [c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_th 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b7f0c : hub_thread+0xc94/0x11d8 ] [c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_th 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b7f0c : hub_thread+0xc94/0x11d8 ] [c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_th 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b4758 : hub_port_reset+0x134/0x458 ] [c02b5468 : hub_port_init+0x50/0x7a0 ] [c02b76f0 : 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b49c4 : hub_port_reset+0x3a0/0x458 ] [c02b5468 : hub_port_init+0x50/0x7a0 ] [c02b76f0 : 
usb 1-1: new low-speed USB device number 3 using aldebaran-hcd
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b4758 : hub_port_reset+0x134/0x458 ] [c02b581c : hub_port_init+0x404/0x7a0 ] [c02b76f0  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b49c4 : hub_port_reset+0x3a0/0x458 ] [c02b581c : hub_port_init+0x404/0x7a0 ] [c02b76f0  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0037b78 : msleep+0x18/0x34 ] [c02b560c : hub_port_init+0x1f4/0x7a0 ] [c02b76f0 : hub_thread+0x478/0x11d8 ] [c0046bb4 : k 
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
usb 1-1: New USB device found, idVendor=045e, idProduct=0780
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: Comfort Curve Keyboard 3000
usb 1-1: Manufacturer: Microsoft
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c027fb40 : devtmpfs_create_node+0xd0/0x11c ] [c0279998 : device_add+0x230/0x620  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
input: Microsoft Comfort Curve Keyboard 3000 as /devices/platform/aldebaran-hcd/usb1/1-1/1-1:1.0/input/input2
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c027fb40 : devtmpfs_create_node+0xd0/0x11c ] [c0279998 : device_add+0x230/0x620  
generic-usb 0003:045E:0780.0003: input: USB HID v1.11 Keyboard [Microsoft Comfort Curve Keyboard 3000] on usb-aldebaran-hc0
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c02bcc78 : usb_start_wait_urb+0x98/0xcc ] [c02bceb4 : usb_control_msg+0xd8/0xfc  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c02fcf20 : usbhid_wait_io+0xa8/0x118 ] [c02fcff8 : usbhid_init_reports+0x68/0x110 ] [c02fd5c8 : usbhid_start+0x528/0x648  
input: Microsoft Comfort Curve Keyboard 3000 as /devices/platform/aldebaran-hcd/usb1/1-1/1-1:1.1/input/input3
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c027fb40 : devtmpfs_create_node+0xd0/0x11c ] [c0279998 : device_add+0x230/0x620  
generic-usb 0003:045E:0780.0004: input: USB HID v1.11 Device [Microsoft Comfort Curve Keyboard 3000] on usb-aldebaran-hcd-1
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c03b5824 : wait_for_common+0xcc/0x1a0 ] [c027fb40 : devtmpfs_create_node+0xd0/0x11c ] [c0279998 : device_add+0x230/0x620  
BUG: scheduling while atomic: khubd/12/0x00000003
Modules linked in:
[c0046bb4 : kthread+0x78/0x8c ] [c00115b8 : kernel_thread+0x34/0x50 ] [c0046dfc : kthreadd+0xc8/0x148 ] 

内核似乎有问题。这意味着当内核处于原子上下文中时,内核的某些部分试图执行一些非原子过程。例如,内核试图进入睡眠状态


尝试升级您的内核。

哦,昨天通过修复中断服务例程解决了这个问题。当我拔出记忆棒时,端口状态未正确报告为已断开连接。通过修复它,这个问题消失了。当我第二次发出mount命令时,设备在不存在时仍被识别为已连接,我猜这会导致长时间无响应的情况。最近再次出现相同的问题,这次是一个“else”关键字阻止调用spin\u unlock\u irqrestore函数!所以我去掉了“else”,现在一切都好了。谢谢