-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Lock order violation when calling enif_whereis_pid in a resource down function (ErlNifResourceDown) #8983
Comments
Thanks for the good report. Proposed fix in #9008. |
The lock checker is only enabled in |
sverker
added a commit
that referenced
this issue
Nov 7, 2024
garazdawi
pushed a commit
to garazdawi/otp
that referenced
this issue
Nov 13, 2024
…/OTP-19330' into maint-25 * sverker/erts/nif-monitor-down-lock-conflict/erlangGH-8983/OTP-19330: erts: Fix potential lock order conflict in NIF monitor down callbacks
IngelaAndin
pushed a commit
that referenced
this issue
Dec 5, 2024
…-19330' into maint-26 * sverker/erts/nif-monitor-down-lock-conflict/GH-8983/OTP-19330: erts: Fix potential lock order conflict in NIF monitor down callbacks
IngelaAndin
pushed a commit
that referenced
this issue
Dec 5, 2024
…-19330' into maint-25 * sverker/erts/nif-monitor-down-lock-conflict/GH-8983/OTP-19330: erts: Fix potential lock order conflict in NIF monitor down callbacks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Debug beam (emu type) aborts
enif_whereis_pid
for "Lock order violation" in a resource destructor function.The pid we are looking for is NOT the process which is 'DOWN'.
gdb bt:
To Reproduce
enif_whereis_pid
,caller_env
is from the resource down callback fun input arg orNULL
If this is unexpected behavior, I could write a minimal NIF code to reproduce it.
Expected behavior
Should not abort the execution.
Affected versions
Found in OTP26.2.5.2
Additional context
We have workaround to write that ErlNifPid pid to a global var as in emqx/quic#315
opt
andasan
The text was updated successfully, but these errors were encountered: