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

          People

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

            Dates

              Created:
              Updated:
              Resolved: