Skip to content

🐛 fix(soft-rw): treat FreeBSD's EMLINK as a symlink refusal - #866

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
pacocartones:fix/freebsd-soft-rw-symlink
Oct 28, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
pacocartones:fix/freebsd-soft-rw-symlink

Conversation

@pacocartones

@pacocartones pacocartones commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

On FreeBSD, a soft reader/writer lock whose protocol tree another process swapped for a symlink kept reporting a transient refresh error from its heartbeat instead of a lost hold, so a holder there kept trusting a tree it no longer owned. 🐛 FreeBSD's open(2) reports EMLINK where POSIX specifies ELOOP when O_NOFOLLOW meets a symlink in the final component, and the directory guard only knew ELOOP, ENOTDIR and NetBSD's EFTYPE.

The guard that opens each protocol directory without following symlinks now counts EMLINK among the refusals it turns into a replaced-tree error, so the heartbeat classifies it as lost on FreeBSD as it does elsewhere. This is the FreeBSD counterpart of the NetBSD handling from #859 and closes the symlink group of failures in #864; the other items in that report stay open.

@gaborbernat gaborbernat changed the title fix(soft-rw): recognize FreeBSD symlink refusal 🐛 fix(soft-rw): treat FreeBSD's EMLINK as a symlink refusal Oct 28, 2026
@gaborbernat gaborbernat reopened this Oct 28, 2026
@gaborbernat
gaborbernat merged commit 193c7dd into tox-dev:main Oct 28, 2026
67 of 100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants