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

LBUG: ASSERTION( buf_size == strlen(secctx_name) + 1 ) failed

Details

    • 3
    • 9223372036854775807

    Description

      While running runtests on RHEL 8.5 client and server with SELinux disabled, the following LBUG occurred:

      Lustre: DEBUG MARKER: -----============= acceptance-small: runtests ============----- Wed Oct 20 10:15:59 PDT 2021
      Lustre: DEBUG MARKER: vm85: executing check_config_client /mnt/lustre
      Lustre: DEBUG MARKER: Using TIMEOUT=20
      Lustre: Modifying parameter general.*.*.lbug_on_grant_miscount in log params
      Lustre: DEBUG MARKER: == runtests test 1: All Runtests ========================= 10:16:00 (1634750160)
      Lustre: DEBUG MARKER: touching /mnt/lustre at Wed Oct 20 10:16:05 PDT 2021 (@1634750165)
      Lustre: DEBUG MARKER: create an empty file /mnt/lustre/hosts.7841
      Lustre: DEBUG MARKER: copying /etc/hosts to /mnt/lustre/hosts.7841
      Lustre: DEBUG MARKER: comparing /etc/hosts and /mnt/lustre/hosts.7841
      Lustre: DEBUG MARKER: renaming /mnt/lustre/hosts.7841 to /mnt/lustre/hosts.7841.ren
      Lustre: DEBUG MARKER: copying /etc/hosts to /mnt/lustre/hosts.7841 again
      LustreError: 8831:0:(pack_generic.c:805:lustre_msg_string()) can't unpack non-NULL terminated string in msg 000000008f1ca60d buffer[8] len 0
      LustreError: 8831:0:(layout.c:2165:__req_capsule_get()) @@@ Wrong buffer for field 'file_secctx_name' (8 of 12) in format 'LDLM_INTENT_OPEN', 0 vs. 0 (client)  req@00000000fd326d4b x1714159751286720/t0(0) o101->lustre-MDT0000-mdc-ffff9ab7ea66e000@0@lo:12/10 lens 656/0 e 0 to 0 dl 0 ref 1 fl New:PQU/0/ffffffff rc 0/-1 job:''
      LustreError: 8831:0:(mdc_lib.c:137:mdc_file_secctx_pack()) ASSERTION( buf_size == strlen(secctx_name) + 1 ) failed:
      LustreError: 8831:0:(mdc_lib.c:137:mdc_file_secctx_pack()) LBUG
      Pid: 8831, comm: cp 4.18.0-339.el8_lustre.x86_64 #1 SMP Tue Oct 19 12:47:57 PDT 2021
      Call Trace TBD:
      [<0>] libcfs_call_trace+0x6f/0x90 [libcfs]
      [<0>] lbug_with_loc+0x43/0x80 [libcfs]
      [<0>] mdc_file_secctx_pack.part.4+0xcb/0x100 [mdc]
      [<0>] mdc_open_pack+0x22d/0x2f0 [mdc]
      [<0>] mdc_intent_open_pack+0x2b6/0x900 [mdc]
      [<0>] mdc_enqueue_base+0x503/0x1420 [mdc]
      [<0>] mdc_intent_lock+0x219/0x560 [mdc]
      [<0>] lmv_intent_open+0x29e/0xb70 [lmv]
      [<0>] lmv_intent_lock+0x19c/0x390 [lmv]
      [<0>] ll_lookup_it+0x6fc/0x1c90 [lustre]
      [<0>] ll_atomic_open+0x256/0x1960 [lustre]
      [<0>] path_openat+0xeff/0x14f0
      [<0>] do_filp_open+0x93/0x100
      [<0>] do_sys_open+0x184/0x220
      [<0>] do_syscall_64+0x5b/0x1a0
      [<0>] entry_SYSCALL_64_after_hwframe+0x65/0xca
      Kernel panic - not syncing: LBUG
      
      # sestatus
      SELinux status:                 disabled
      # getenforce
      Disabled
      # find /usr/include -name selinux.h
      /usr/include/selinux/selinux.h
      # rpm -qf /usr/include/selinux/selinux.h
      libselinux-devel-2.9-5.el8.x86_64
      

      Attached is the config.log while configuring the Lustre codes.
      The issue can be reproduced by just touching a file after the filesystem is mounted.
      After enabling SELinux, the failure didn't occur.

      Attachments

        Issue Links

          Activity

            [LU-15184] LBUG: ASSERTION( buf_size == strlen(secctx_name) + 1 ) failed

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45524/
            Subject: LU-15184 llite: properly detect SELinux disabled case
            Project: fs/lustre-release
            Branch: b2_14
            Current Patch Set:
            Commit: 7904abf2ac28c11345954c6aad0546ee5776860b

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45524/ Subject: LU-15184 llite: properly detect SELinux disabled case Project: fs/lustre-release Branch: b2_14 Current Patch Set: Commit: 7904abf2ac28c11345954c6aad0546ee5776860b
            pjones Peter Jones added a comment -

            Landed for 2.15

            pjones Peter Jones added a comment - Landed for 2.15

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45501/
            Subject: LU-15184 llite: properly detect SELinux disabled case
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 42661f7ba106b7d2e02f85a65880061585ca6ccb

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45501/ Subject: LU-15184 llite: properly detect SELinux disabled case Project: fs/lustre-release Branch: master Current Patch Set: Commit: 42661f7ba106b7d2e02f85a65880061585ca6ccb

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45527/
            Subject: LU-15184 llite: properly detect SELinux disabled case
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set:
            Commit: bce5c5a9e38c41fa4c1ca4edc615380c4d3f453c

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/45527/ Subject: LU-15184 llite: properly detect SELinux disabled case Project: fs/lustre-release Branch: b2_12 Current Patch Set: Commit: bce5c5a9e38c41fa4c1ca4edc615380c4d3f453c

            "Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45527
            Subject: LU-15184 llite: properly detect SELinux disabled case
            Project: fs/lustre-release
            Branch: b2_12
            Current Patch Set: 1
            Commit: c1a4bf3da5fe90cd111eadb9afa473a46ca16980

            gerrit Gerrit Updater added a comment - "Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45527 Subject: LU-15184 llite: properly detect SELinux disabled case Project: fs/lustre-release Branch: b2_12 Current Patch Set: 1 Commit: c1a4bf3da5fe90cd111eadb9afa473a46ca16980

            "Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45524
            Subject: LU-15184 llite: properly detect SELinux disabled case
            Project: fs/lustre-release
            Branch: b2_14
            Current Patch Set: 1
            Commit: 4dc8face582f1b2c0d4ea3a5df22f743add39098

            gerrit Gerrit Updater added a comment - "Jian Yu <yujian@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/45524 Subject: LU-15184 llite: properly detect SELinux disabled case Project: fs/lustre-release Branch: b2_14 Current Patch Set: 1 Commit: 4dc8face582f1b2c0d4ea3a5df22f743add39098
            boggl Bob Glossman added a comment - - edited

            Using the RHEL 8.5 release available on 11/9 I was able to reproduce the failure and verify the fix. With selinux disabled runtests crashes exactly as reported.  Adding just the fix in https://review.whamcloud.com/45501 makes the problem disappear.

             

            kernel version 4.18.0-348.el8

             

            boggl Bob Glossman added a comment - - edited Using the RHEL 8.5 release available on 11/9 I was able to reproduce the failure and verify the fix. With selinux disabled runtests crashes exactly as reported.  Adding just the fix in https://review.whamcloud.com/45501  makes the problem disappear.   kernel version 4.18.0-348.el8  

            "Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45501
            Subject: LU-15184 llite: properly detect SELinux disabled case
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 63aaafad88e65dda8d01ce61aa25b1ec1ba25a71

            gerrit Gerrit Updater added a comment - "Sebastien Buisson <sbuisson@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45501 Subject: LU-15184 llite: properly detect SELinux disabled case Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 63aaafad88e65dda8d01ce61aa25b1ec1ba25a71
            pjones Peter Jones added a comment -

            Sébastien

            Could you please advise!

            Thanks

            Peter

            pjones Peter Jones added a comment - Sébastien Could you please advise! Thanks Peter

            People

              sebastien Sebastien Buisson
              yujian Jian Yu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: