Skip to content

lsof -b may still cause kernel blocks #181

Description

@propertone

[Linux] I'm not sure if this is a bug, but lsof -b does not entirely avoid blocking calls. While it avoid stat/lstat/readlink calls on the mounted filesystems, strace shows that it still calls lstat and stat on the file descriptor symlinks in /proc/*/fd/*. Unlike lstat, stat will resolve symlinks, so if the open file handle is on a filesystem that's hung, then lsof will hang as well, even with the -b option.

I've tested this on Linux using the latest version of lsof

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions