mcvsama/haruhi — Issue #138: One WU in two different WorkPerformers
Author: mcvsama
Created: 2011-12-16 19:58:14+00:00
State: open
Labels: Crasher

As shown below one UpdateWavetableWorkUnit has been taken by two WorkPerformer threads.
Don't know if bug is in code that adds WU to WorkPerformer or in the WorkPerformer itself.

```
Thread 18 (Thread 0x7f595fba4700 (LWP 6590)):
#0 0x00007f596374bdeb in ?? () from /lib/libc.so.6
#1 0x00007f59636e3e4f in ?? () from /lib/libc.so.6
#2 0x00007f59636e2261 in free () from /lib/libc.so.6
#3 0x00000000004d71bf in Haruhi::DSP::Wavetable::drop_tables (this=0x21c3540) at haruhi/dsp/wavetable.cc:56
#4 0x00000000004d4b89 in Haruhi::DSP::FFTFiller::fill (this=0x7f595fba3d50, wavetable=0x21c3540, samples=4096) at haruhi/dsp/fft_filler.cc:55
#5 0x000000000054558b in Yuki::Part::UpdateWavetableWorkUnit::execute (this=0x212d520) at plugins/yuki/part.cc:66
#6 0x0000000000514242 in WorkPerformer::Performer::run (this=0x1f02a30) at haruhi/utility/work_performer.cc:39
#7 0x0000000000513b7c in Thread::callback (arg=0x1f02a30) at haruhi/utility/thread.cc:146
#8 0x00007f5966ce7df0 in start_thread () from /lib/libpthread.so.0
#9 0x00007f596373f2ed in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 13 (Thread 0x7f594b18f700 (LWP 6600)):
#0 leave_data (this=0x7f595025bcc0) at ./haruhi/utility/shared.h:277
#1 ~Shared (this=0x7f595025bcc0, __in_chrg=) at ./haruhi/utility/shared.h:230
#2 _Destroy > (__pointer=0x7f595025bcc0) at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_construct.h:94
#3 __destroy*> (__last=, __first=0x7f595025bcc0) at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_construct.h:104
#4 _Destroy*> (__last=, __first=) at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_construct.h:127
#5 _Destroy*, Shared > (__last=0x7f59502be9d8, __first=0x7f595025bcc0) at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_construct.h:153
#6 _M_erase_at_end (__pos=0x7f595025bcc0, this=) at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_vector.h:1255
#7 clear (this=0x22e7de8) at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_vector.h:1040
#8 Haruhi::EventBuffer::clear (this=0x22e7dd0) at ./haruhi/graph/event_buffer.h:87
#9 0x00000000004e0966 in Haruhi::Port::sync (this=0x20b3820) at haruhi/graph/port.cc:142
#10 0x00000000004e28c9 in Haruhi::Unit::sync_inputs (this=0x22ffac0) at haruhi/graph/unit.cc:141
#11 0x0000000000554d39 in Yuki::Plugin::process (this=0x22ffac0) at plugins/yuki/plugin.cc:71
#12 0x00000000004e26f5 in Haruhi::Unit::sync (this=0x22ffac0) at haruhi/graph/unit.cc:96
#13 0x00000000004e097a in Haruhi::Port::sync (this=0x22a9970) at haruhi/graph/port.cc:145
#14 0x00000000004e28c9 in Haruhi::Unit::sync_inputs (this=0x21aef70) at haruhi/graph/unit.cc:141
#15 0x00000000004e26f5 in Haruhi::Unit::sync (this=0x21aef70) at haruhi/graph/unit.cc:96
#16 0x00000000004e7d01 in Haruhi::Engine::run (this=0x22ff960) at haruhi/session/engine.cc:51
#17 0x0000000000513b7c in Thread::callback (arg=0x22ff960) at haruhi/utility/thread.cc:146
#18 0x00007f5966ce7df0 in start_thread () from /lib/libpthread.so.0
#19 0x00007f596373f2ed in clone () from /lib/libc.so.6
#20 0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7f59672e3760 (LWP 6577)):
#0 Haruhi::DSP::ParametricWaves::Triangle::operator() (this=0x7f5944014300, x=) at ./haruhi/dsp/functions.h:123
#1 0x000000000052da48 in Haruhi::DSP::HarmonicsWave::operator() (this=0x7f59440008b0, phase=0.109333336, frequency=0) at ./haruhi/dsp/harmonics_wave.h:120
#2 0x0000000000547cc3 in Haruhi::DSP::ModulatedWave::value_for_ring (this=0x7f5944086eb0, phase=, frequency=) at ./haruhi/dsp/modulated_wave.h:140
#3 0x0000000000527d6f in Haruhi::WavePlot::resample_wave (this=0x229d070) at haruhi/widgets/wave_plot.cc:235
#4 0x0000000000527e5d in Haruhi::WavePlot::plot_shape (this=0x229d070) at haruhi/widgets/wave_plot.cc:100
#5 0x000000000054d042 in update_phase_marker (this=0x220f270) at plugins/yuki/part_widget.cc:509
#6 Yuki::PartWidget::update_wave_plots (this=0x220f270) at plugins/yuki/part_widget.cc:555
#7 0x00000000004774f4 in operator() (this=) at /usr/include/boost/function/function_template.hpp:760
#8 call_out (this=) at haruhi/application/services.h:82
#9 Haruhi::P::CallOutDispatcher::customEvent (this=, event=) at haruhi/application/services.cc:47
#10 0x00007f596407f1ec in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#11 0x00007f5964ac7ae4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#12 0x00007f5964acc951 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#13 0x00007f596406889c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#14 0x00007f596406bc2f in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#15 0x00007f5964095ef0 in QEventDispatcherUNIX::processEvents(QFlags) () from /usr/lib/libQtCore.so.4
#16 0x00007f5964b6bd58 in ?? () from /usr/lib/libQtGui.so.4
#17 0x00007f5964067a92 in QEventLoop::processEvents(QFlags) () from /usr/lib/libQtCore.so.4
#18 0x00007f5964067c97 in QEventLoop::exec(QFlags) () from /usr/lib/libQtCore.so.4
#19 0x00007f596406beab in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#20 0x0000000000475ccf in Haruhi::Haruhi::run_ui (this=0x7fff0f562040) at haruhi/application/haruhi.cc:113
#21 0x0000000000475ef0 in Haruhi::Haruhi::Haruhi (this=0x7fff0f562040, argc=, argv=, envp=) at haruhi/application/haruhi.cc:73
#22 0x000000000046bed4 in main (argc=1, argv=0x7fff0f5621d8, envp=0x7fff0f5621e8) at haruhi/application/main.cc:57

Thread 1 (Thread 0x7f595faa3700 (LWP 6591)):
#0 0x00007f596369f905 in raise () from /lib/libc.so.6
#1 0x00007f59636a0d7b in abort () from /lib/libc.so.6
#2 0x00007f59636d847e in ?? () from /lib/libc.so.6
#3 0x00007f59636de396 in ?? () from /lib/libc.so.6
#4 0x00007f59636e226c in free () from /lib/libc.so.6
#5 0x00000000004d71bf in Haruhi::DSP::Wavetable::drop_tables (this=0x21c3540) at haruhi/dsp/wavetable.cc:56
#6 0x00000000004d4b89 in Haruhi::DSP::FFTFiller::fill (this=0x7f595faa2d50, wavetable=0x21c3540, samples=4096) at haruhi/dsp/fft_filler.cc:55
#7 0x000000000054558b in Yuki::Part::UpdateWavetableWorkUnit::execute (this=0x212d520) at plugins/yuki/part.cc:66
#8 0x0000000000514242 in WorkPerformer::Performer::run (this=0x1f02be0) at haruhi/utility/work_performer.cc:39
#9 0x0000000000513b7c in Thread::callback (arg=0x1f02be0) at haruhi/utility/thread.cc:146
#10 0x00007f5966ce7df0 in start_thread () from /lib/libpthread.so.0
#11 0x00007f596373f2ed in clone () from /lib/libc.so.6
#12 0x0000000000000000 in ?? ()
```