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

Executing binary stored on Lustre results in " (deleted)" appended to /proc/self/exec

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • None
    • None
    • 3
    • 8520

    Description

      We have reports that when running an executable stored on Lustre, the symlink /proc/self/exec will have " (deleted)" appended to it. This can be normal behavior under Linux, if the executable has in fact been overwritten or deleted. But I have been told this is not the case, and I would not be surprised if there is a Lustre bug here. Digging into the kernel sources, it appears the following snippets are relevant:

      __d_path
       if (d_unlinked(dentry) &&
               (prepend(&end, &buflen, " (deleted)", 10) != 0))
                       goto Elong;
      
      static inline int d_unhashed(struct dentry *dentry)
      {
              return (dentry->d_flags & DCACHE_UNHASHED);
      }
      
      static inline int d_unlinked(struct dentry *dentry)
      {
              return d_unhashed(dentry) && !IS_ROOT(dentry);
      }
      

      So, the string " (deleted)" is appended when the dentry in question has the DCACHE_UNHASHED flag set. Perhaps there's a situation where Lustre fails to take a reference on the dentry, allowing it to be dropped from the cache when it shouldn't be?

      Also note, I haven't been able to reproduce this issue so it's been difficult to debug, or even determine exactly where the issue lies.

      Attachments

        Activity

          [LU-1234] Executing binary stored on Lustre results in " (deleted)" appended to /proc/self/exec
          pjones Peter Jones added a comment -

          Thanks Chris!

          pjones Peter Jones added a comment - Thanks Chris!

          Patch landed on b2_1. I assume this can be closed.

          morrone Christopher Morrone (Inactive) added a comment - Patch landed on b2_1. I assume this can be closed.

          Patch 2400 is getting stale, and conflicts on b2_1 are growing. Can you please rebase patch 2400 onto 2.1.4?

          morrone Christopher Morrone (Inactive) added a comment - Patch 2400 is getting stale, and conflicts on b2_1 are growing. Can you please rebase patch 2400 onto 2.1.4?

          Patch for 2.1 is still in limbo.

          morrone Christopher Morrone (Inactive) added a comment - Patch for 2.1 is still in limbo.

          LU-506 closed without this landing on b2_1. The b2_1 patch has two +1 reviews, but is just sitting. We are running the patch in production at LLNL on our 2.1 systems.

          morrone Christopher Morrone (Inactive) added a comment - - edited LU-506 closed without this landing on b2_1. The b2_1 patch has two +1 reviews, but is just sitting. We are running the patch in production at LLNL on our 2.1 systems.
          pjones Peter Jones added a comment -

          Thanks Chris

          pjones Peter Jones added a comment - Thanks Chris
          pjones Peter Jones added a comment -

          Chris

          We will track landing this patch under LU-506. I gather that you are running this patch in production now so is it ok to close this as a duplicate of LU-506?

          Peter

          pjones Peter Jones added a comment - Chris We will track landing this patch under LU-506 . I gather that you are running this patch in production now so is it ok to close this as a duplicate of LU-506 ? Peter

          Someone needs to attend to the Maloo failure.

          morrone Christopher Morrone (Inactive) added a comment - Someone needs to attend to the Maloo failure.

          Integrated in lustre-reviews » x86_64,server,el6,inkernel #4594
          LU-1234 dcache: don't drop invalid dentry arbitrarily (Revision c7619a3c9c0b5ddc040612169402f6ab75bb3a49)

          Result = SUCCESS
          Lai Siyao : c7619a3c9c0b5ddc040612169402f6ab75bb3a49
          Files :

          • lustre/llite/namei.c
          • lustre/llite/llite_internal.h
          • lustre/include/linux/lustre_patchless_compat.h
          • lustre/llite/statahead.c
          • lustre/include/linux/lustre_compat25.h
          • lustre/llite/dcache.c
          • lustre/llite/file.c
          hudson Build Master (Inactive) added a comment - Integrated in lustre-reviews » x86_64,server,el6,inkernel #4594 LU-1234 dcache: don't drop invalid dentry arbitrarily (Revision c7619a3c9c0b5ddc040612169402f6ab75bb3a49) Result = SUCCESS Lai Siyao : c7619a3c9c0b5ddc040612169402f6ab75bb3a49 Files : lustre/llite/namei.c lustre/llite/llite_internal.h lustre/include/linux/lustre_patchless_compat.h lustre/llite/statahead.c lustre/include/linux/lustre_compat25.h lustre/llite/dcache.c lustre/llite/file.c

          People

            laisiyao Lai Siyao
            prakash Prakash Surya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: