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

Fix potential lock order conflict in NIF monitor down callbacks #9008

Conversation

sverker
Copy link
Contributor

@sverker sverker commented Oct 30, 2024

Fix #8983.

Problem

Calling enif_whereis_pid in NIF monitor down callback would cause lock order violation detected by lock checker in debug build.

Solution

Release main lock of the exiting process while calling NIF down callback.

by releasing main lock of the exiting process.
@sverker sverker added team:VM Assigned to OTP team VM fix testing currently being tested, tag is used by OTP internal CI labels Oct 30, 2024
@sverker sverker self-assigned this Oct 30, 2024
Copy link
Contributor

github-actions bot commented Oct 30, 2024

CT Test Results

    3 files    143 suites   49m 1s ⏱️
1 595 tests 1 545 ✅ 49 💤 1 ❌
2 339 runs  2 264 ✅ 74 💤 1 ❌

For more details on these failures, see this check.

Results for commit 520edad.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@sverker sverker merged commit cff9e06 into erlang:maint Nov 7, 2024
19 of 21 checks passed
@sverker
Copy link
Contributor Author

sverker commented Nov 7, 2024

Merged to maint for OTP 27.2, also in pipe for next OTP 25 and 26 patch releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lock order violation when calling enif_whereis_pid in a resource down function (ErlNifResourceDown)
2 participants