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

Implementing mutexes #4

Merged
merged 18 commits into from
Nov 27, 2023
Merged

Implementing mutexes #4

merged 18 commits into from
Nov 27, 2023

Conversation

Thesola10
Copy link
Collaborator

This will likely fix #3 I hope.

@Thesola10 Thesola10 self-assigned this Oct 10, 2023
@Thesola10 Thesola10 changed the title Implementing semaphores Implementing mutexes Nov 6, 2023
@Thesola10
Copy link
Collaborator Author

Promising, but I am hitting a couple apparent deadlocks for some reason. None of the wrapped calls should be blocking afaik...

Turns out getcwd() itself calls stat(), which creates a nested mutex and
deadlocks. Momentarily unlocking before performing getcwd() is perfectly safe
as it doesn't use our preallocated buffers.
@Thesola10
Copy link
Collaborator Author

Thesola10 commented Nov 26, 2023

almost there, now i'm getting a deadlock at nix::drainFD, right as Nix spawns a builder process, but somehow only when lldb isn't attached...? I can't reproduce it in my debugger

@Thesola10 Thesola10 force-pushed the test_sema branch 5 times, most recently from 597dfd0 to 8d84fd1 Compare November 27, 2023 10:09
@Thesola10 Thesola10 marked this pull request as ready for review November 27, 2023 10:36
@Thesola10 Thesola10 merged commit 249ff72 into main Nov 27, 2023
@Thesola10 Thesola10 deleted the test_sema branch November 27, 2023 10:37
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

Successfully merging this pull request may close these issues.

Unstable builds on recent Nix
1 participant