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

client oops in lov_lsme_pack_v1v3() for a layout component with an unknown pattern

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

      A client that reads the layout of a file with a component whose pattern it does not recognize oopses in lov_lsme_pack_v1v3(), e.g. "lfs getstripe" of such a file:

      lov: unrecognized striping pattern: rc = 0
      lov_dump_lmm_common()) objid 0x5:1026, magic 0x0bd10bd0, pattern 0x5
      lov_init_composite()) lustre-clilov-...: unknown layout entry 1 pattern 0x5 could be an unrecognizable component set by other clients, skip to initialize the next component.
      BUG: kernel NULL pointer dereference, address: 0000000000000000
      RIP: 0010:lov_lsme_pack_v1v3+0x90/0x120 [lov]
       lov_lsm_pack+0x1d8/0x450 [lov]
       lov_object_layout_get+0x157/0x2f0 [lov]
       ll_getxattr_lov+0x1de/0x410 [lustre]
       ll_xattr_get+0x129/0x1a0 [lustre]
       __vfs_getxattr+0x7e/0xb0
       do_getxattr+0x129/0x180
      

      LU-16837 (https://review.whamcloud.com/51060, "llite: handle unknown layout component") made lsme_unpack() allocate no lsme_oinfo[] for a component whose pattern is not lov_pattern_available(), but it keeps lsme_stripe_count and the INIT flag. lsme_free() and dump_lsm() skip the objects of such a component (and https://review.whamcloud.com/52826 fixed lov_delete_composite()), but lov_lsme_pack_v1v3() still packs lsme_stripe_count objects from lsme_oinfo[].

      Seen on master v2_17_62 with an EC parity component that LFSCK rebuilt with the RAID0|PARITY pattern, which master no longer accepts since LOV_PATTERN_PARITY stands alone (LU-20690). The same applies to any pattern a newer server or client sets that this client does not know.

      Parsing the objects of such a component regardless of its pattern would let getxattr return them, so that copying the layout (e.g. lfs migrate, mirror split) does not drop them.

            wc-triage WC Triage
            adilger Andreas Dilger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: