13
0
Fork 0

T: fix deadlock when adding tracks

For livetrax, ::add_routes_inner calls ::reassign_track_numbers,
which in turn calls ::livetrax_queue_auto_connect.

This can result in a deadlock:

 * GUI thread, ::add_routes_inner holds the process-lock
   and ::livetrax_queue_auto_connect requests the `_auto_connect_queue_lock`

 * auto-connect thread first takes the `_auto_connect_queue_lock and then
   requests the process-lock
This commit is contained in:
Robin Gareus 2024-05-18 16:25:04 +02:00
parent 28efbd0577
commit 0b6e68869f
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 2 additions and 0 deletions

View File

@ -3681,6 +3681,8 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
r->enable_direct_outs ();
}
}
/* do not take `_auto_connect_queue_lock' while holding the process lock */
lm.release ();
reassign_track_numbers ();
}
}