MIxxx 2.1 crash on startup

Bug #1758189 reported by Daniel Schürmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Critical
Daniel Schürmann

Bug Description

This was tested on Ubuntu Trusty 64 bit

Debug [Main]: BaseTrackPlayerImpl::slotLoadTrack "[Sampler59]"
[New Thread 0x7ffea27d4700 (LWP 16179)]
Debug [Main]: BaseTrackPlayerImpl::slotLoadTrack "[Sampler60]"

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffee17fa700 (LWP 16127)]
EngineMaster::processChannels (this=this@entry=0x14493c0, iBufferSize=8192)
    at src/engine/enginemaster.cpp:351
351 EngineChannel* pChannel = pChannelInfo->m_pChannel;
(gdb) bt
#0 EngineMaster::processChannels (this=this@entry=0x14493c0, iBufferSize=8192)
    at src/engine/enginemaster.cpp:351
#1 0x00000000007f0086 in EngineMaster::process (this=0x14493c0,
    iBufferSize=iBufferSize@entry=8192) at src/engine/enginemaster.cpp:397
#2 0x0000000000b2a4cb in SoundManager::onDeviceOutputCallback (
    this=<optimized out>, iFramesPerBuffer=iFramesPerBuffer@entry=4096)
    at src/soundio/soundmanager.cpp:597
#3 0x0000000000b20159 in SoundDevicePortAudio::callbackProcessClkRef (
    this=0x1e2bdb0, framesPerBuffer=4096, out=0x13770c70, in=<optimized out>,
    timeInfo=<optimized out>, statusFlags=<optimized out>)
    at src/soundio/sounddeviceportaudio.cpp:941
#4 0x00007ffff7675e63 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libportaudio.so.2
#5 0x00007ffff7677f0b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libportaudio.so.2
#6 0x00007ffff768066e in ?? ()
   from /usr/lib/x86_64-linux-gnu/libportaudio.so.2
#7 0x00007ffff2a19184 in start_thread (arg=0x7ffee17fa700)
    at pthread_create.c:312
#8 0x00007ffff0aba03d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
(gdb) A

Revision history for this message
Daniel Schürmann (daschuer) wrote :

(gdb) print pChannelInfo
$1 = (EngineMaster::ChannelInfo *) 0x0

i is 4

Revision history for this message
Be (be.ing) wrote :

Maybe there is something going wrong with the initialization of samplers?

Changed in mixxx:
importance: Undecided → Critical
milestone: none → 2.1.0
Revision history for this message
Be (be.ing) wrote :

Have you been able to reproduce this?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

No, I will have a look tonight.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Yes, this looks like a race condition around m_activeChannels. We need to skip processing if we change anything with the channels.

Revision history for this message
Be (be.ing) wrote :

I think I see what you mean. BaseTrackPlayerImpl::BaseTrackPlayerImpl calls EngineMaster::addChannel. PlayerManager::addSamplerInner creates a new Sampler instance, which is a subclass of BaseTrackPlayerImpl. PlayerManager::slotNumSamplersControlChanged calls PlayerManager::addSamplerInner when the [Master], num_samplers ControlObject changes. How can we work around this?

Revision history for this message
Be (be.ing) wrote :

Augh, the lack of comment editing on Launchpad is annoying. PlayerManager::slotNumSamplersControlChanged is called from the main thread, so EngineMaster's m_activeChannels member variable may be accessed by both threads at once.

Have you figured out how to reproduce this reliably?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

No, I have not managed to reproduce it at all.
The backtrace was a lucky catch, while debugging an other issue.

Revision history for this message
Daniel Schürmann (daschuer) wrote :
Changed in mixxx:
status: New → In Progress
assignee: nobody → Daniel Schürmann (daschuer)
Changed in mixxx:
status: In Progress → Fix Committed
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/9188

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.