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

race between dt_try_as_dir() and lod_striping_free_nolock()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      In lod_striping_free_nolock(), if object is directory, its striping is freed, but .ldo_index_ops is not cleared, if a subsequent dt_try_as_dir() is called on this object, the .ldo_index_ops will be called, while its striping is not initialized yet, which may cause crash.

      MDT0000 crashed with the following LBUG:

      LustreError: 18825:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) fs-MDT0000: [0x20002c3a3:0x47:0x0] migrate mdt index mismatch 0 != 4294967295
      LustreError: 18825:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) fs-MDT0000: [0x20002c3a3:0x69:0x0] migrate mdt index mismatch 0 != 4294967295
      LustreError: 18825:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) Skipped 26 previous similar messages
      LustreError: 18832:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) fs-MDT0000: [0x20002c3a3:0xb3:0x0] migrate mdt index mismatch 0 != 4294967295
      LustreError: 18832:0:(mdt_xattr.c:421:mdt_dir_layout_shrink()) Skipped 47 previous similar messages
      LustreError: 18839:0:(mdd_dir.c:4521:mdd_migrate()) fs-MDD0000: 'chrne' migration was interrupted, run 'lfs migrate -m 0 -c 3 -H 2 j4675' to finish migration.
      LustreError: 18828:0:(lod_object.c:383:lod_striped_lookup()) ASSERTION( lo->ldo_dir_stripe_count > 0 ) failed:
      LustreError: 18828:0:(lod_object.c:383:lod_striped_lookup()) LBUG
      Kernel panic - not syncing: LBUG
       CPU: 5 PID: 18828 Comm: mdt01_007  3.10.0-1160.49.1.el7_lustre.x86_64 #1
       Call Trace:
       dump_stack+0x19/0x1b
       panic+0xe8/0x21f
       lbug_with_loc+0x9b/0xa0 [libcfs]
       lod_striped_lookup+0x2ba/0x2f0 [lod]
       __mdd_lookup.isra.17+0x298/0x440 [mdd]
       mdd_lookup+0xaf/0x170 [mdd]
       mdt_getattr_name_lock+0x1353/0x21e0 [mdt]
       mdt_getattr_name+0xc4/0x2b0 [mdt]
       tgt_request_handle+0xaee/0x15f0 [ptlrpc]
       ptlrpc_server_handle_request+0x24b/0xab0 [ptlrpc]
       ptlrpc_main+0xb34/0x1470 [ptlrpc]
       kthread+0xd1/0xe0
      

      Attachments

        Activity

          People

            laisiyao Lai Siyao
            laisiyao Lai Siyao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: