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

Journal replay: Ensure full reuse of file descriptor space #4991

Open
theduke opened this issue Aug 7, 2024 · 0 comments
Open

Journal replay: Ensure full reuse of file descriptor space #4991

theduke opened this issue Aug 7, 2024 · 0 comments

Comments

@theduke
Copy link
Contributor

theduke commented Aug 7, 2024

#4990 fixed a bug in the journal replay logic which led to invalidly re-used file descriptors.

That PR implements a "quick fix" though, and breaks the convention of always re-using the lowest available FD number.
It instead just sets the next available FD to the highest used FD value.

To conform to the regular behaviour of "always use the lowest available FD number", the logic needs to be augmented to properly restore the FD number free list (freed_fds, located here:

pub freed_fds: Arc<RwLock<BinaryHeap<Reverse<WasiFd>>>>,
).

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

1 participant