13
0
Go to file
Robin Gareus ead883302f
Don't use shared-pointers in cross thread event structs
This fixes a deadlock when closing the session.

Session::destroy() takes the engine-lock while removing
unhandled session-events. In [1], the event-queue held a last
reference to a Track, and releasing that object triggered
events (here ~IO) that required the lock.

---
[1]

#2  0x0041743a in Glib::Threads::Mutex::Lock::Lock at /home/ardour/linux-armhf/stack/include/glibmm-2.4/glibmm/threads.h:643
#3  0xb67433ba in ARDOUR::IO::~IO at ../libs/ardour/io.cc:105
#4  0xb6743612 in ARDOUR::IO::~IO at ../libs/ardour/io.cc:111
#5  0xb6758e66 in boost::checked_delete<ARDOUR::IO> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34
#6  0xb675912c in boost::detail::sp_counted_impl_p<ARDOUR::IO>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92
#7  0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129
#8  0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426
#9  0xb662343a in boost::shared_ptr<ARDOUR::IO>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341
#10 0xb6a4af7a in ARDOUR::Route::~Route at ../libs/ardour/route.cc:282
#11 0xb6b9404c in ARDOUR::Track::~Track at ../libs/ardour/track.cc:71
#12 0xb697164a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:94
#13 0xb697177a in ARDOUR::MidiTrack::~MidiTrack at ../libs/ardour/midi_track.cc:96
#14 0xb6ac525a in boost::checked_delete<ARDOUR::MidiTrack> at /home/ardour/linux-armhf/stack/include/boost/core/checked_delete.hpp:34
#15 0xb6acde00 in boost::detail::sp_counted_impl_p<ARDOUR::MidiTrack>::dispose at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_impl.hpp:92
#16 0x004178d8 in boost::detail::sp_counted_base::release at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/sp_counted_base_sync.hpp:129
#17 0x00417986 in boost::detail::shared_count::~shared_count at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/detail/shared_count.hpp:426
#18 0xb664dca6 in boost::shared_ptr<ARDOUR::Track>::~shared_ptr at /home/ardour/linux-armhf/stack/include/boost/smart_ptr/shared_ptr.hpp:341
#19 0xb6aaf67e in ARDOUR::SessionEvent::~SessionEvent at ../libs/ardour/ardour/session_event.h:42
#20 0xb6a91a88 in ARDOUR::Session::destroy at ../libs/ardour/session.cc:753
#21 0xb6a8fb20 in ARDOUR::Session::~Session at ../libs/ardour/session.cc:460
#22 0xb6a9075e in ARDOUR::Session::~Session at ../libs/ardour/session.cc:46
2020-03-28 17:31:12 +01:00
doc Source-tree consistency (headless tools at top-level) 2020-03-26 19:00:41 +01:00
gtk2_ardour Grid: explicitly check for empty marker list (fixes: grid fails if no start+end markers yet) 2020-03-28 08:10:36 -05:00
headless Fix cross-compile linking (arm-linux ld) 2020-02-14 00:20:45 +01:00
libs Don't use shared-pointers in cross thread event structs 2020-03-28 17:31:12 +01:00
luasession Allow to pass arguments to ardour-lua 2020-03-26 21:55:04 +01:00
msvc_extra_headers Some initial changes (currently for libpbd only) to help a new contributer who's trying to build with MSVC2017 2020-03-26 10:40:36 +00:00
MSVCardour3 Add/remove source(s) in our MSVC project (gtk2_ardour) 2020-03-18 09:24:13 +00:00
MSVCMixbus3
MSVCvst_scan
nutemp
session_utils fix error in multiple calls to SourceFactory::createWritable() 2020-03-23 21:47:13 -06:00
share Fix typo in script 2020-03-15 11:24:55 +01:00
tools Source-tree consistency (headless tools at top-level) 2020-03-26 19:00:41 +01:00
us2400
vst
.dir-locals.el
.gitattributes
.gitignore Update gitignore, clean up git status 2020-02-23 21:11:47 +01:00
ardour.1
ardour.1.es Update ardour.1.es 2020-03-26 10:06:55 -06:00
ardour.1.fr
ardour.1.ru
COPYING
instant.xml.sae
msvc32-fixup.pl
PACKAGER_README
README
README-GITHUB.txt
system_config
testfile.flac
testfile.ogg
TRANSLATORS
waf Update waf to v2.0.19 2020-01-25 04:07:41 +01:00
wscript Automatic backend selection, and fix backend option parsing 2020-03-28 14:56:29 +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