Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-2706

blockdev_attach fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Blocker
    • None
    • Lustre 2.1.4
    • None
    • 3
    • 6311

    Description

      block device driver doesn't work.

      to reproduce:

      # /usr/lib64/lustre/tests/llmount.sh
      # dd if=/dev/zero of=/mnt/lustre/virtualfs bs=1024 count=30720
      # lctl blockdev_attach /mnt/lustre/virtualfs /dev/virtblock
      

      Kernel crash dump:

      BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
      IP: [<ffffffffa00765b3>] lo_ioctl+0x43/0x120 [llite_lloop]
      PGD 76704067 PUD 76703067 PMD 0 
      Oops: 0000 [#1] SMP 
      last sysfs file: /sys/devices/virtual/block/lloop0/removable
      Lustre: 2476:0:(lloop.c:717:lloop_ioctl()) Enter llop_ioctl
      CPU 1 
      Modules linked in: llite_lloop(U) netconsole configfs lustre(U) obdfilter(U) ost(U) osd_ldiskfs(U) cmm(U) fsfilt_ldiskfs(U) exportfs mdt(U) mdd(U) mds(U) mgs(U) ldiskfs(U) jbd mgc(U) lov(U) osc(U) mdc(U) lmv(U) fid(U) fld(U) lquota(U) ptlrpc(U) obdclass(U) lvfs(U) ksocklnd(U) lnet(U) libcfs(U) ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 virtio_balloon virtio_console snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore snd_page_alloc virtio_net i2c_piix4 i2c_core sg ext4 mbcache jbd2 virtio_blk sr_mod cdrom virtio_pci virtio_ring virtio pata_acpi ata_generic ata_piix dm_mirror dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan]
      
      Pid: 2490, comm: blkid Not tainted 2.6.32-279.14.1.el6_lustre.x86_64 #1 Bochs Bochs
      RIP: 0010:[<ffffffffa00765b3>]  [<ffffffffa00765b3>] lo_ioctl+0x43/0x120 [llite_lloop]
      RSP: 0018:ffff880076623d68  EFLAGS: 00010282
      RAX: 0000000000000000 RBX: ffff88007c250100 RCX: 0000000000000000
      RDX: 0000000000005331 RSI: 000000000000101d RDI: ffffffffa0078cc0
      RBP: ffff880076623db8 R08: ffffffffa00780c0 R09: 0000000000000100
      R10: 00007fff14198e00 R11: 0000000000000246 R12: ffff8800758f2a78
      R13: ffff8800767e11d8 R14: 0000000000000000 R15: 0000000000005331
      FS:  00007f79dfe83740(0000) GS:ffff880002300000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000018 CR3: 0000000076701000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process blkid (pid: 2490, threadinfo ffff880076622000, task ffff88007b7d0040)
      Stack:
       00007f79df604480 ffff8800765fd7d8 ffff8800376c44a8 00003ffffffff000
      <d> ffff880076623df8 ffff8800721e7000 ffff8800758f2a78 0000000000000000
      <d> 0000000000000003 0000000000000000 ffff880076623df8 ffffffff8125eb37
      Call Trace:
       [<ffffffff8125eb37>] __blkdev_driver_ioctl+0x27/0x80
       [<ffffffff8125effd>] blkdev_ioctl+0x1ed/0x6e0
       [<ffffffff811b3e2c>] block_ioctl+0x3c/0x40
       [<ffffffff8118e4f2>] vfs_ioctl+0x22/0xa0
       [<ffffffff8118e694>] do_vfs_ioctl+0x84/0x580
       [<ffffffff8118ec11>] sys_ioctl+0x81/0xa0
       [<ffffffff8100b0f2>] system_call_fastpath+0x16/0x1b
      Code: 4c 89 7d f8 0f 1f 44 00 00 48 8b 87 90 00 00 00 41 89 d7 48 89 fb 48 c7 c7 c0 8c 07 a0 49 89 ce 4c 8b a8 c8 02 00 00 49 8b 45 28 <48> 8b 40 18 48 8b 40 10 48 89 45 b8 e8 3c 1a 02 e1 41 81 ff aa 
      RIP  [<ffffffffa00765b3>] lo_ioctl+0x43/0x120 [llite_lloop]
       RSP <ffff880076623d68>
      CR2: 0000000000000018
      BUG: unable to handle kernel 
      ---[ end trace 14d4218c937fd43c ]---
      Kernel panic - not syncing: Fatal exception
      Pid: 2490, comm: blkid Tainted: G      D    ---------------    2.6.32-279.14.1.el6_lustre.x86_64 #1
      Call Trace:
       [<ffffffff814fdcba>] ? panic+0xa0/0x168
       [<ffffffff81501e54>] ? oops_end+0xe4/0x100
       [<ffffffff81043bfb>] ? no_context+0xfb/0x260
       [<ffffffff81043e85>] ? __bad_area_nosemaphore+0x125/0x1e0
       [<ffffffff81043fae>] ? bad_area+0x4e/0x60
       [<ffffffff81044760>] ? __do_page_fault+0x3d0/0x480
       [<ffffffff81115783>] ? filemap_fault+0xd3/0x500
       [<ffffffff81114537>] ? unlock_page+0x27/0x30
       [<ffffffff8113f369>] ? __do_fault+0x449/0x510
       [<ffffffff81503e0e>] ? do_page_fault+0x3e/0xa0
       [<ffffffff815011c5>] ? page_fault+0x25/0x30
       [<ffffffffa00765b3>] ? lo_ioctl+0x43/0x120 [llite_lloop]
       [<ffffffff8125eb37>] ? __blkdev_driver_ioctl+0x27/0x80
       [<ffffffff8125effd>] ? blkdev_ioctl+0x1ed/0x6e0
       [<ffffffff811b3e2c>] ? block_ioctl+0x3c/0x40
       [<ffffffff8118e4f2>] ? vfs_ioctl+0x22/0xa0
       [<ffffffff8118e694>] ? do_vfs_ioctl+0x84/0x580
       [<ffffffff8118ec11>] ? sys_ioctl+0x81/0xa0
       [<ffffffff8100b0f2>] ? system_call_fastpath+0x16/0x1b
      NULL pointer dereference at 0000000000000018
      IP: [<ffffffffa00765b3>] lo_ioctl+0x43/0x120 [llite_lloop]
      PGD 78df5067 PUD 79870067 PMD 0 
      Oops: 0000 [#2] SMP 
      last sysfs file: /sys/devices/virtual/block/lloop13/removable
      CPU 0 
      Modules linked in: llite_lloop(U) netconsole configfs lustre(U) obdfilter(U) ost(U) osd_ldiskfs(U) cmm(U) fsfilt_ldiskfs(U) exportfs mdt(U) mdd(U) mds(U) mgs(U) ldiskfs(U) jbd mgc(U) lov(U) osc(U) mdc(U) lmv(U) fid(U) fld(U) lquota(U) ptlrpc(U) obdclass(U) lvfs(U) ksocklnd(U) lnet(U) libcfs(U) ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 virtio_balloon virtio_console snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore snd_page_alloc virtio_net i2c_piix4 i2c_core sg ext4 mbcache jbd2 virtio_blk sr_mod cdrom virtio_pci virtio_ring virtio pata_acpi ata_generic ata_piix dm_mirror dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan]
      
      Pid: 2520, comm: blkid Tainted: G      D    ---------------    2.6.32-279.14.1.el6_lustre.x86_64 #1 Bochs Bochs
      RIP: 0010:[<ffffffffa00765b3>]  [<ffffffffa00765b3>] lo_ioctl+0x43/0x120 [llite_lloop]
      RSP: 0018:ffff880078e05d68  EFLAGS: 00010282
      RAX: 0000000000000000 RBX: ffff880075552900 RCX: 0000000000000000
      RDX: 0000000000005331 RSI: 000000000000101d RDI: ffffffffa0078cc0
      RBP: ffff880078e05db8 R08: ffffffffa00780c0 R09: 0000000000000100
      R10: 00007fff7ddb1080 R11: 0000000000000246 R12: ffff8800758a3438
      R13: ffff8800767e8ec0 R14: 0000000000000000 R15: 0000000000005331
      FS:  00007fd7cc5a4740(0000) GS:ffff880002200000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000018 CR3: 000000007a61c000 CR4: 00000000000006f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process blkid (pid: 2520, threadinfo ffff880078e04000, task ffff88007a65aaa0)
      Stack:
       00007fd7cbd25480 ffff88007a7912f0 ffff880036ca09e0 00003ffffffff000
      <d> ffff880078e05df8 ffff88007aba5400 ffff8800758a3438 0000000000000000
      <d> 0000000000000003 0000000000000000 ffff880078e05df8 ffffffff8125eb37
      Call Trace:
       [<ffffffff8125eb37>] __blkdev_driver_ioctl+0x27/0x80
       [<ffffffff8125effd>] blkdev_ioctl+0x1ed/0x6e0
       [<ffffffff811b3e2c>] block_ioctl+0x3c/0x40
       [<ffffffff8118e4f2>] vfs_ioctl+0x22/0xa0
       [<ffffffff8118e694>] do_vfs_ioctl+0x84/0x580
       [<ffffffff8118ec11>] sys_ioctl+0x81/0xa0
       [<ffffffff8100b0f2>] system_call_fastpath+0x16/0x1b
      Code: 4c 89 7d f8 0f 1f 44 00 00 48 8b 87 90 00 00 00 41 89 d7 48 89 fb 48 c7 c7 c0 8c 07 a0 49 89 ce 4c 8b a8 c8 02 00 00 49 8b 45 28 <48> 8b 40 18 48 8b 40 10 48 89 45 b8 e8 3c 1a 02 e1 41 81 ff aa 
      RIP  [<ffffffffa00765b3>] lo_ioctl+0x43/0x120 [llite_lloop]
       RSP <ffff880078e05d68>
      CR2: 0000000000000018
      

      Notes, there is a test for the block device in sanity: 68a

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              rhenwood Richard Henwood (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: