Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless(?) loop following symlinks #13

Closed
chrysn opened this issue Jul 1, 2021 · 4 comments
Closed

Endless(?) loop following symlinks #13

chrysn opened this issue Jul 1, 2021 · 4 comments

Comments

@chrysn
Copy link

chrysn commented Jul 1, 2021

Running the latest lfs does not terminate within several seconds, and produces no output unless invoked with --help.

Under strace I get increasingly long versions of

openat(AT_FDCWD, "/sys/block/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/ng0n1/device/ng0n1/device/nvme0n1/device/ng0n1/device/nvme0n1/device/nvme0n1/device/subsystem/dev", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/sys/block/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/ng0n1/device/ng0n1/device/nvme0n1/device/ng0n1/device/nvme0n1/device/nvme0n1/device/state/dev", O_RDONLY|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
openat(AT_FDCWD, "/sys/block/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/ng0n1/device/ng0n1/device/nvme0n1/device/ng0n1/device/nvme0n1/device/nvme0n1/device/kato/dev", O_RDONLY|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
openat(AT_FDCWD, "/sys/block/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/ng0n1/device/ng0n1/device/nvme0n1/device/ng0n1/device/nvme0n1/device/nvme0n1/device/serial/dev", O_RDONLY|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
getdents64(73, 0x557328fd0a20 /* 0 entries */, 32768) = 0
close(73)                               = 0
openat(AT_FDCWD, "/sys/block/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/nvme0n1/device/ng0n1/device/ng0n1/device/nvme0n1/device/ng0n1/device/nvme0n1/device/nvme0n1/nvme0n1p1/dev", O_RDONLY|O_CLOEXEC) = 73
statx(73, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0444, stx_size=4096, ...}) = 0

which indicate that the tool is trying to traverse the whole tree without regard for the /sys/block/nvme0n1/device symlink pointing to ../../nvme0.

Kernel this was tested on is 5.13.

@Canop
Copy link
Owner

Canop commented Jul 1, 2021

Are you able to check with master ? If so I would appreciate a test of the last commited version.

If not, can you drop by my chat ?

@chrysn
Copy link
Author

chrysn commented Jul 1, 2021

Resolved with latest master, thanks!

@Canop
Copy link
Owner

Canop commented Jul 1, 2021

And does the LVM device properly appear ?

@chrysn
Copy link
Author

chrysn commented Jul 1, 2021

Still testing that (not on my main machine, but there may be other things at play here too).

@Canop Canop closed this as completed in ede129c Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants