diff options
author | Lukas Larsson <[email protected]> | 2017-10-12 09:52:14 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-10-12 09:52:14 +0200 |
commit | becaa0972e42bb0ecedae3aeaba5be221a551fa4 (patch) | |
tree | 2b7db4074f94593dba5655757d76a1bfcbf8f86e /erts/emulator/beam | |
parent | 1de63778d932f7ffdc72696fccfd825dbf457acd (diff) | |
parent | 5204e619ecc8394f399c6e40f15639dd379a9b91 (diff) | |
download | otp-becaa0972e42bb0ecedae3aeaba5be221a551fa4.tar.gz otp-becaa0972e42bb0ecedae3aeaba5be221a551fa4.tar.bz2 otp-becaa0972e42bb0ecedae3aeaba5be221a551fa4.zip |
Merge branch 'lukas/erts/tracing/recv_exit_signal_deadlock/OTP-14678' into maint
* lukas/erts/tracing/recv_exit_signal_deadlock/OTP-14678:
erts: Fix lock order when recv tracing trapped exit signal
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index b72bac00c1..1ce2b5071c 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -13307,9 +13307,9 @@ send_exit_signal(Process *c_p, /* current process if and only if ((state & ERTS_PSFLG_TRAP_EXIT) && (reason != am_kill || (flags & ERTS_XSIG_FLG_IGN_KILL))) { - /* have to release the status lock in order to send the exit message */ - erts_smp_proc_unlock(rp, *rp_locks & ERTS_PROC_LOCKS_XSIG_SEND); - *rp_locks &= ~ERTS_PROC_LOCKS_XSIG_SEND; + /* have to release the status and trace lock in order to send the exit message */ + erts_smp_proc_unlock(rp, *rp_locks & (ERTS_PROC_LOCKS_XSIG_SEND|ERTS_PROC_LOCK_TRACE)); + *rp_locks &= ~(ERTS_PROC_LOCKS_XSIG_SEND|ERTS_PROC_LOCK_TRACE); if (have_seqtrace(token) && token_update) seq_trace_update_send(token_update); if (is_value(exit_tuple)) |