13
0
Go to file
Robin Gareus 634d325e5d
Prevent deadlock when disconnecting
The backend holds `_port_callback_mutex` while disconnecting ports.
In some cases disconnecting a port can drop the last reference
resulting in a port-deletion from the connection handler.
This in turn will eventually aquire the `_port_callback_mutex`
and deadlock.

This is now circumvented by using atomic operations instead of
taking a lock to set the `_port_change_flag`.

The flag is also used to trigger a latency update in some cases,
atomic is preferable to taking a lock to set this flag.

--

Full bt: https://paste.debian.net/1184056/
Short:

#1  in pthread_mutex_lock ()
#2  in ARDOUR::PortEngineSharedImpl::port_connect_add_remove_callback()
#3  in ARDOUR::BackendPort::~BackendPort()
#4  in ARDOUR::DummyPort::~DummyPort()
#6  in ARDOUR::DummyAudioPort::~DummyAudioPort()
#7  in boost::checked_delete<ARDOUR::BackendPort>(ARDOUR::BackendPort*)
#12 in boost::shared_ptr<ARDOUR::ProtoPort>::reset()
#13 in ARDOUR::Port::drop()
#14 in ARDOUR::Port::~Port()
#15 in ARDOUR::AudioPort::~AudioPort()
#17 in ARDOUR::AudioEngine::add_pending_port_deletion(ARDOUR::Port*)
#20 in boost::detail::sp_counted_base::release()
#37 in ARDOUR::PortManager::connect_callback() at libs/ardour/port_manager.cc:788
#38 in ARDOUR::DummyAudioBackend::main_process_thread() at libs/backends/dummy/dummy_audiobackend.cc:1018
2021-02-04 21:06:20 +01:00
doc Clarify source-tree doc: libsmf is used inside libevoral 2020-04-28 21:27:16 +02:00
gtk2_ardour Hide hidden ports in port-matrix 2021-02-01 23:49:39 +01:00
headless Transmitter::Debug implementation 1/2 2020-10-13 21:58:26 +02:00
libs Prevent deadlock when disconnecting 2021-02-04 21:06:20 +01:00
luasession Luasession: load default session snapshot 2020-11-30 22:18:09 +01:00
msvc_extra_headers A few extra changes needed to support the latest version of libpthread for Windows 2021-01-30 13:59:22 +00:00
MSVCardour3 Add/remove source(s) in our MSVC project (gtk2_ardour) 2021-01-30 14:00:39 +00:00
MSVCMixbus3 Initial changes needed for building Mixbus (with MSVC) as version 5 2018-09-10 07:14:59 +01:00
MSVCvst_scan Correct a typo in my MSVC project file (vst3_scan) 2020-10-16 11:30:00 +01:00
nutemp additional changes to follow library name change from timecode -> temporal 2017-09-25 12:13:54 -04:00
session_utils Bail out if export cannot be started 2020-12-08 01:10:00 +01:00
share Add option to skip MIDI track input auto-connect 2021-01-08 22:50:45 +01:00
tools Tweak icon-tool output image 2021-01-30 23:24:03 +01:00
vst fix vamp path: 2016-06-25 00:44:04 +02:00
.dir-locals.el Only use .dir-locals.el to set tab indentation (or not, for python). 2011-04-06 16:33:43 +00:00
.gitattributes Add a Readme pertaining to GH release tarballs 2017-04-22 16:04:35 +02:00
.gitignore Ignore generaed translation files 2020-10-18 17:45:32 +02:00
ardour.1 Update man-page 2020-07-06 21:36:12 +02:00
COPYING update GPL (formatting and update FSF address) 2014-10-26 02:24:35 +01:00
instant.xml.sae most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet 2008-12-12 14:43:24 +00:00
msvc32-fixup.pl Build 'ardour-vst3-scanner.exe' with MSVC 2020-09-22 12:15:09 +01:00
PACKAGER_README fixes for various consistency/settings issues in monitor section; minor edit to PACKAGER_README 2010-03-17 16:01:58 +00:00
README another trivial change to test hooks 2013-03-13 14:35:39 -04:00
README-GITHUB.txt Add a Readme pertaining to GH release tarballs 2017-04-22 16:04:35 +02:00
system_config Empty system_config (pre-seed XML nodes, use built-in settings) 2017-03-02 19:37:36 +01:00
testfile.flac ogg/flac support bits and pieces; fix up MIDI note dragging and front-edge trims; BROKEN IN PERCUSSIVE MODE FOR NOW 2009-10-06 22:07:10 +00:00
testfile.ogg ogg/flac support bits and pieces; fix up MIDI note dragging and front-edge trims; BROKEN IN PERCUSSIVE MODE FOR NOW 2009-10-06 22:07:10 +00:00
TRANSLATORS add text to TRANSLATORS file explaining how contextual translation msgids work and should be translated 2020-05-20 14:40:10 -06:00
waf Update waf to v2.0.19 2020-01-25 04:07:41 +01:00
wscript Fix boost 1.74 + gcc 10.2 warnings 2021-01-26 01:54:37 +01:00

Please see the Ardour web site at http://ardour.org/ for all documentation..

For information on building ardour: 
      
     http://ardour.org/development.html