View Issue Details

IDCategoryLast Update
0008301bugs2020-07-13 13:42
ReportersamthursfieldAssigned Tox42 
Reproducibilityhave not tried 
Status resolvedResolutionfixed 
PlatformGNUOSLinuxOS Version(any)
Product Version6.2 
Fixed in Version 
Summary0008301: Crash when removing a-compressor stereo from a bus
DescriptionI added a-compressor stereo to a bus. This worked fine. I removed the plugin (while playing the track) and Ardour crashed.

full backtrace attached, but the interesting part seems to be this:

Thread 1 (Thread 0x7f32e26f8a00 (LWP 24254)):
#0 0x00007f32e5763a25 in raise () at /lib64/libc.so.6
0000001 0x00007f32e574c895 in abort () at /lib64/libc.so.6
#2 0x00007f32e574c769 in _nl_load_domain.cold () at /lib64/libc.so.6
#3 0x00007f32e575be86 in annobin_assert.c_end () at /lib64/libc.so.6
0000004 0x00007f32e992b831 in ARDOUR::Route::setup_invisible_processors() (this=0x9dab7b0) at ../libs/ardour/route.cc:4908
0000005 0x00007f32e991a08d in ARDOUR::Route::configure_processors_unlocked(ARDOUR::Route::ProcessorStreams*, Glib::Threads::RWLock::WriterLock*) (this=0x9dab7b0, err=0x0, lm=0x7ffe1f1a58c0) at ../libs/ardour/route.cc:1875
#6 0x00007f32e9917807 in ARDOUR::Route::remove_processor(boost::shared_ptr<ARDOUR::Processor>, ARDOUR::Route::ProcessorStreams*, bool) (this=0x9dab7b0, processor=..., err=0x0, need_process_lock=true) at ../libs/ardour/route.cc:1481
#7 0x0000000000f70617 in ProcessorBox::delete_processors(std::vector<boost::shared_ptr<ARDOUR::Processor>, std::allocator<boost::shared_ptr<ARDOUR::Processor> > > const&) (this=0x587c6c8, targets=std::vector of length 1, capacity 1 = {...}) at ../gtk2_ardour/processor_box.cc:3333
0000008 0x0000000000f6aba3 in ProcessorBox::processor_operation(ProcessorBox::ProcessorOperation) (this=0x587c6c8, op=ProcessorBox::ProcessorsDelete) at ../gtk2_ardour/processor_box.cc:2453
0000009 0x0000000000f759d8 in ProcessorBox::rb_delete() () at ../gtk2_ardour/processor_box.cc:4079
0000010 0x0000000000f91edb in sigc::pointer_functor0<void>::operator()() const (this=0x3f9b408) at /usr/include/sigc++-2.0/sigc++/functors/ptr_fun.h:77
0000011 0x0000000000f8f184 in sigc::adaptor_functor<sigc::pointer_functor0<void> >::operator()() const (this=0x3f9b400) at /usr/include/sigc++-2.0/sigc++/adaptors/adaptor_trait.h:256
0000012 0x0000000000f8b5dd in sigc::internal::slot_call0<sigc::pointer_functor0<void>, void>::call_it(sigc::internal::slot_rep*) (rep=0x3f9b3d0) at /usr/include/sigc++-2.0/sigc++/functors/slot.h:136
0000013 0x00007f32e78ea4cc in Glib::SignalProxyNormal::slot0_void_callback(_GObject*, void*) () at /lib64/libglibmm-2.4.so.1
0000014 0x00007f32e783688a in g_closure_invoke () at /lib64/libgobject-2.0.so.0
TagsNo tags attached.

Activities

samthursfield

2020-07-10 15:51

reporter  

a-compressor-removal.log (43,304 bytes)

samthursfield

2020-07-10 15:54

reporter   ~0024676

I can reproduce this project by adding and removing a-compressor again in the same project file.

I've taken a snapshot of the project, so please let me know what I can do to debug further.

samthursfield

2020-07-10 15:57

reporter   ~0024677

Here's also a screenshot of the project in case that's useful. The problematic channel is named 'DnB'.

I haven't yet found a way to reproduce the issue in a different project.

mixer.png (142,385 bytes)
mixer.png (142,385 bytes)

x42

2020-07-10 16:26

administrator   ~0024678

According to the backtrace, this should be impossible.
Route::remove_processor(..., need_process_lock=true) takes the process and processor-lock.

The only explanation I currently have is that some broken plugin causes memory-corruption, overwriting some of Ardour's memory space with garbage, and effectively causing this crash.

x42

2020-07-10 16:28

administrator   ~0024679

Can you share the snapshot file that cause this issue?

samthursfield

2020-07-11 14:18

reporter   ~0024698

Sure. As you can see, there are various 3rd party plugins so it's entirely possible that there's a memory corruption bug in one of them. I will see if my PC can manage running the whole thing under Valgrind, since the issue does seem reproducible...

crash-bug-8301.ardour.gz (157,316 bytes)

samthursfield

2020-07-11 17:40

reporter   ~0024707

I removed all 3rd party plugins, and can still reproduce the crash. Adding and then removing a-compressor-stereo on the 'DnB' channel in the attached session file triggers a crash for me.

crash-bug-8301-minimal.ardour.gz (108,127 bytes)

samthursfield

2020-07-11 17:43

reporter   ~0024708

Tested with a few other plugins. Only a-compressor and a-expander (mono and stereo) trigger the crash. Other Ardour plugins (a-eq, a-amplifier) don't trigger the crash. Other compressors (x42-comp, Calf compressor) don't trigger the crash.

x42

2020-07-11 20:14

administrator   ~0024713

Fixed in Ardour 6.2-8

The key was that the bus was implicitly soled!

This caused a recursive lock when the sidechain was removed.
https://github.com/Ardour/ardour/commit/156c1e354a240d744e7001ed5e3b6405fc47d6e8

samthursfield

2020-07-13 13:42

reporter   ~0024725

Thanks for looking at this so quickly.

I tested with commit 398101ad92c944604760492d9237971f756beeab and found a new segfault issue, reproducible by following the same steps. I had MALLOC_PERTURB_=5 set in the process environment when this happened, and I can only reproduce the segfault with this set. Since it's triggered the same way as the original issue, I wonder if the fix in commit 156c1e354a240d744e7001e has introduced or uncovered a memory access problem.

Debug log attached

8301-test.log (29,509 bytes)

Issue History

Date Modified Username Field Change
2020-07-10 15:51 samthursfield New Issue
2020-07-10 15:51 samthursfield File Added: a-compressor-removal.log
2020-07-10 15:54 samthursfield Note Added: 0024676
2020-07-10 15:57 samthursfield File Added: mixer.png
2020-07-10 15:57 samthursfield Note Added: 0024677
2020-07-10 16:26 x42 Note Added: 0024678
2020-07-10 16:28 x42 Note Added: 0024679
2020-07-11 14:18 samthursfield File Added: crash-bug-8301.ardour.gz
2020-07-11 14:18 samthursfield Note Added: 0024698
2020-07-11 17:40 samthursfield File Added: crash-bug-8301-minimal.ardour.gz
2020-07-11 17:40 samthursfield Note Added: 0024707
2020-07-11 17:43 samthursfield Note Added: 0024708
2020-07-11 20:14 x42 Assigned To => x42
2020-07-11 20:14 x42 Status new => resolved
2020-07-11 20:14 x42 Resolution open => fixed
2020-07-11 20:14 x42 Note Added: 0024713
2020-07-13 13:42 samthursfield File Added: 8301-test.log
2020-07-13 13:42 samthursfield Note Added: 0024725