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:
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.
Thanks Chris!