momo zone

调核人的blog

copy 一个文件也能让内核挂掉?!

把某个1.6G 的文件copy到 USB -> SCIS 设备(PATA 硬盘) ,文件系统是FAT32, 大概到630 MB 的时候 内核会挂掉,但如果是另外一个文件,copy全程无问题。试过其他文件系统也是同样情况。

Jul 17 22:59:52 dekernel kernel: [11660.092862] usb 2-6: USB disconnect, device number 26
Jul 17 22:59:52 dekernel kernel: [11660.096871] sd 31:0:0:0: [sdg] Unhandled error code
Jul 17 22:59:52 dekernel kernel: [11660.096874] sd 31:0:0:0: [sdg]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 17 22:59:52 dekernel kernel: [11660.096877] sd 31:0:0:0: [sdg] CDB: Write(10): 2a 00 00 73 6c d8 00 00 f0 00
Jul 17 22:59:52 dekernel kernel: [11660.096885] end_request: I/O error, dev sdg, sector 7564504
Jul 17 22:59:52 dekernel kernel: [11660.098355] sd 31:0:0:0: [sdg] Unhandled error code
Jul 17 22:59:52 dekernel kernel: [11660.098358] sd 31:0:0:0: [sdg]  Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Jul 17 22:59:52 dekernel kernel: [11660.098360] sd 31:0:0:0: [sdg] CDB: Write(10): 2a 00 00 73 6d c8 00 00 f0 00
Jul 17 22:59:52 dekernel kernel: [11660.098367] end_request: I/O error, dev sdg, sector 7564744
Jul 17 22:59:52 dekernel kernel: [11660.124608] FAT: FAT read failed (blocknr 1930)
Jul 17 22:59:52 dekernel kernel: [11660.124835] FAT: FAT read failed (blocknr 1656)
Jul 17 22:59:52 dekernel kernel: [11660.124854] FAT: FAT read failed (blocknr 1930)
Jul 17 22:59:52 dekernel kernel: [11660.124871] FAT: FAT read failed (blocknr 1602)
Jul 17 22:59:52 dekernel kernel: [11660.154598] BUG: unable to handle kernel paging request at 36391000
Jul 17 22:59:52 dekernel kernel: [11660.154642] IP: [<c042271f>] __percpu_counter_add+0x1f/0xd0
Jul 17 22:59:52 dekernel kernel: [11660.154678] *pdpt = 0000000021a7c001 *pde = 0000000000000000
Jul 17 22:59:52 dekernel kernel: [11660.154714] Oops: 0000 [#1] PREEMPT SMP
Jul 17 22:59:52 dekernel kernel: [11660.154743] last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/class
Jul 17 22:59:52 dekernel kernel: [11660.154779] Modules linked in: nls_iso8859_1 nls_cp437 vfat fat tun af_packet snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device edd vboxnetadp vboxnetflt vboxdrv mperf binfmt_misc fuse ext4 jbd2 crc16 loop snd_hda_codec_analog arc4 ecb rtl8187 iwlagn snd_hda_intel snd_hda_codec mac80211 snd_hwdep snd_pcm cfg80211 snd_timer firewire_ohci snd firewire_core sr_mod eeprom_93cx6 skge iTCO_wdt sg 8139too cdrom pcspkr i2c_i801 floppy 8139cp sky2 soundcore asus_atk0110 snd_page_alloc rfkill iTCO_vendor_support crc_itu_t button reiserfs radeon ttm drm_kms_helper drm i2c_algo_bit dm_snapshot dm_mod fan thermal processor thermal_sys ata_generic pata_jmicron [last unloaded: speedstep_lib]
Jul 17 22:59:52 dekernel kernel: [11660.155003]
Jul 17 22:59:52 dekernel kernel: [11660.155003] Pid: 17, comm: bdi-default Not tainted 2.6.39.11-2-desktop #1 System manufacturer System Product Name/P5B-Deluxe
Jul 17 22:59:52 dekernel kernel: [11660.155003] EIP: 0060:[<c042271f>] EFLAGS: 00010002 CPU: 0
Jul 17 22:59:52 dekernel kernel: [11660.155003] EIP is at __percpu_counter_add+0x1f/0xd0
Jul 17 22:59:52 dekernel kernel: [11660.155003] EAX: 00000000 EBX: f661f374 ECX: ffffffff EDX: ffffffff
Jul 17 22:59:52 dekernel kernel: [11660.155003] ESI: f2c7be40 EDI: 00000000 EBP: f3531d2c ESP: f3531d14
Jul 17 22:59:52 dekernel kernel: [11660.155003]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Jul 17 22:59:52 dekernel kernel: [11660.155003] Process bdi-default (pid: 17, ti=f3530000 task=f34db2c0 task.ti=f3530000)
Jul 17 22:59:52 dekernel kernel: [11660.155003] Stack:
Jul 17 22:59:52 dekernel kernel: [11660.155003]  ffffffec c0a766f4 00000000 00000292 f2c7be40 00000000 f3531d40 c02dd5d0
Jul 17 22:59:52 dekernel kernel: [11660.155003]  00000018 f4b5b5a0 00000000 f3531dd0 c02dd861 00000000 0000000e 00000001
Jul 17 22:59:52 dekernel kernel: [11660.155003]  00001747 00000001 00000000 f3531db4 c0355ad0 00000a83 0002914a 00000002
Jul 17 22:59:52 dekernel kernel: [11660.155003] Call Trace:
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c02dd5d0>] clear_page_dirty_for_io+0xb0/0xe0
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c02dd861>] write_cache_pages+0x141/0x370
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c035515a>] mpage_writepages+0x5a/0xa0
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<f84d75fd>] fat_writepages+0xd/0x10 [fat]
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c02de997>] do_writepages+0x17/0x30
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c0346bd9>] writeback_single_inode+0xc9/0x200
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c0346f42>] writeback_sb_inodes+0xb2/0x180
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c0347885>] wb_writeback+0x155/0x3e0
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c0347ba3>] wb_do_writeback+0x93/0x1f0
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c02ee0e9>] bdi_forker_thread+0x89/0x3d0
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c02655d4>] kthread+0x74/0x80
Jul 17 22:59:52 dekernel kernel: [11660.155003]  [<c069a8e6>] kernel_thread_helper+0x6/0xd
Jul 17 22:59:52 dekernel kernel: [11660.155003] Code: c3 8d 74 26 00 8d bc 27 00 00 00 00 55 89 e5 83 ec 18 89 5d f4 89 c3 89 e0 25 00 e0 ff ff 89 75 f8 89 7d fc 83 40 14 01 8b 43 14
Jul 17 22:59:52 dekernel kernel: [11660.155003] EIP: [<c042271f>] __percpu_counter_add+0x1f/0xd0 SS:ESP 0068:f3531d14
Jul 17 22:59:52 dekernel kernel: [11660.155003] CR2: 0000000036391000
Jul 17 22:59:52 dekernel kernel: [11660.168399] ---[ end trace f0a2c1711cf79bb9 ]---

没错,这块盘是有坏道,但坏道能让内核挂掉还真是奇怪,而且只有copy 这个文件会发生问题

2011/07/22 update:

发现好像是硬盘盒造成的,主控是国内的一家名叫super top , 可是是有bug 。 传输的数据内容触发了主控的bug 然后造成内核崩溃 ~ ??!!

Bus 002 Device 009: ID 14cd:6600 Super Top USB 2.0 IDE DEVICE
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x14cd Super Top
  idProduct          0x6600 USB 2.0 IDE DEVICE
  bcdDevice            2.01
  iManufacturer           1 Super Top
  iProduct                3 USB 2.0  IDE DEVICE
  iSerial                 2 ??????????
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

这难道就是传说中的杂牌? 序列号是一串问号

#################################################################

再来看JMicron的JM20337

Bus 002 Device 010: ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x152d JMicron Technology Corp. / JMicron USA Technology Corp.
  idProduct          0x2338 JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
  bcdDevice            1.00
  iManufacturer           1 JMicron
  iProduct                2 USB to ATA/ATAPI bridge
  iSerial                 5 8020A4C30450
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 USB Mass Storage
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              6 MSC Bulk-Only Transfer
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: