summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/route.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-28 21:15:26 +0200
committerRobin Gareus <robin@gareus.org>2016-04-28 21:15:26 +0200
commit633f2189111be18cb03fe847707b0f598e453abe (patch)
tree87f4211ed7027b8ec9983b2b01fc5480c8633180 /libs/ardour/ardour/route.h
parentd81547efb4e70c51d993e43aff99aa0585ed7f6e (diff)
fix a deadlock with jack2 when inserting a plugin adds ports.
When adding a processor, the processor may add ports leading to a call to jack_port_register(). while Ardour holds a WritertLock on the processor-list (this commit removes this WriterLock). with jack2 that results in a graph-reorder callback (WHY?) jack2 issues that graph-reorder in a separate thread BUT port-registration does not return until the graph-reorder is complete. On Ardour's side, graph_reordered() calls Session::resort_routes () which eventually checks Route::direct_feeds_according_to_reality() which needs a ReadLock on the processor-list to check I/O. Since jack_port_register() does not return, this constitutes a deadlock. THE ACTUAL PROBLEM IS JACK2's THREAD DESIGN! Why does jack_port_register() trigger a graph-order in jack2? No connections are made. ..and why does it block jack_port_register() from returning if that graph-order callback is in a different thread? http://pastebin.com/DZANXJLz
Diffstat (limited to 'libs/ardour/ardour/route.h')
-rw-r--r--libs/ardour/ardour/route.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 66a83cf67d..bac33ae7a1 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -848,7 +848,7 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
bool _initial_io_setup;
bool _in_sidechain_setup;
- int configure_processors_unlocked (ProcessorStreams*);
+ int configure_processors_unlocked (ProcessorStreams*, Glib::Threads::RWLock::WriterLock*);
bool set_meter_point_unlocked ();
void apply_processor_order (const ProcessorList& new_order);