crash when changing effect unit routing

Bug #1775497 reported by Be
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
In Progress
Critical
Daniel Schürmann

Bug Description

I experienced a crash disabling the routing switches for effect units. I am not sure what state I started Mixxx with. I think I might not have had any state saved in mixxx.cfg for the routing switches because Mixxx started with the default routings (deck 1 to effect unit 1, deck 2 to effect unit 2...). I haven't figured out how to reproduce this yet, but I'll keep trying to figure it out...

Be (be.ing)
Changed in mixxx:
importance: Undecided → Critical
assignee: nobody → Be (be.ing)
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Does this still happen with Mixxx 2.3 alpha?

Changed in mixxx:
milestone: none → 2.3.0
Be (be.ing)
Changed in mixxx:
status: New → Incomplete
milestone: 2.3.0 → none
Revision history for this message
Michael (ehmic) wrote :

I think while creating mappings for my self-built controller I may have experienced the same, or at least a related issue/crash.

Mixxx version in use is the latest 2.3 beta
My default routing for each deck is "crossfader bus through effect unit" (so FX L and FX R enabled)

For each deck I created a button-mapping which does the following if pressed (here for Deck1):

engine.setValue("[EffectRack1_EffectUnit1]", "group_[Channel1]_enable", 1);
engine.setValue("[EffectRack1_EffectUnit1]", "group_[BusLeft]_enable", 0);
engine.setValue("[EffectRack1_EffectUnit1_Effect3]", "enabled", 1);

For the sake of completeness - EffectRack1_EffectUnitX_Effect3 is an echo effect with the following same parameters for each deck:

Time: 0.5
Feedback: 0.7
Ping Pong: 0
Feedback: 0.7

On releasing the button all changes are reverted:

engine.setValue("[EffectRack1_EffectUnit1]", "group_[Channel1]_enable", 0);
engine.setValue("[EffectRack1_EffectUnit1]", "group_[BusLeft]_enable", 1);
engine.setValue("[EffectRack1_EffectUnit1_Effect3]", "enabled", 0);

The setup seemed to work fine, but after a while of just playing around (pressing the buttons for each deck randomly) Mixxx crashed due to a "segmentation fault" or "memory access violation" - the original german message is: Speicherzugriffsfehler (Speicherabzug geschrieben).

This issue is reproducible, even without any tracks loaded (with empty decks) - start Mixxx and use the above-mentioned controller mapping. Usually after 10-100 button presses the crash happens.

I was not able to observe a certain behaviour like "crash happens only if you press buttons for each deck simultaneously" or "if you press button long enough, for x seconds" or similar.

Hope this helps to identify the problem!

Happy Easter everyone!

Revision history for this message
Michael (ehmic) wrote :

Just learned that I could have used used gdb for a more helpful bug-report. Sorry!
Attached you now may find its output.
Still not sure if the problem is related to this bug report, especially when noticing all the other warnings/errors in the debugger output.
So please forgive me if not, just trying to help ;D

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

Thank you very much.

malloc(): unsorted double linked list corrupted

Happens if you have writen over the borders of a memory region allocated on the heap but not pass the borders of the page, leading to a real "segmentation fault". The issue here is that the crash is a symptom of a access violation that has happened before.

Can you install the debug symbols and try to reproduce a real segfault?

If you are using our ppa, you can install it via

Adding

deb http://ppa.launchpad.net/mixxx/mixxxbetas/ubuntu YOUR_UBUNTU_VERSION_HERE main/debug

to

/etc/apt/sources.list.d/mixxx-ubuntu-mixxxbetas-YOUR_UBUNTU_VERSION_HERE.list

sudo apt-get update
sudo apt-get install mixxx-dbgsym

Else you may build mixxx from source
https://github.com/mixxxdj/mixxx/wiki/compiling%20on%20linux

Revision history for this message
Michael (ehmic) wrote :

You're welcome
Thanks for your explanation.

Ok, will try to help.
It just so happened that I built 2.4.0-alpha-pre today anyhow and was also able to reproduce the issue with that specific version.
So after noticing your comment I recompiled mixxx with the CMake flags '-DCMAKE_BUILD_TYPE=Debug -DDEBUG_ASSERTIONS_FATAL=ON' in the hope that the debug symbols were included this way.

Started mixxx manually (compiled it without installation) with 'gdb --args ./mixxx -debugAssertBreak'
Typed 'thread apply all bt' into the gdb command prompt after the 'segfault' and copied the results. I then repeated the procedure two more times. First time because I forgot 'set height 0' and wanted to see the difference. The second time I disabled the 'Bessel4' effect on both decks, which I usually use for my MIDI controller. Just wanted to be sure that the self created scripts for said effect were not the cause of the 'segfault'. Turned out they were not.

So now I got three debugger outputs and tried to make sense out of them, or to learn something. I was expecting that a certain problem would stand out / could be identified, or isolated by the debugger, but the output for each run seems to be slightly different. The last one even indicates that a file is missing? Hope that the 'segfault' does not stem from a misconfiguration here on my computer.

I'm now posting three instead of just one compiler outputs. Hope that is ok.

Revision history for this message
Michael (ehmic) wrote :

Run #2

Revision history for this message
Michael (ehmic) wrote :

Run #3

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

gdb1.txt happens here:

https://github.com/mixxxdj/mixxx/blob/f2d670edeb483efb066bf7f00255d01df2f0017c/src/engine/filters/enginefilterdelay.h#L21
This function is only accessing it's objects memory, a memory issue here is unlikely.
So the whole object "m_low2" might be void here: https://github.com/mixxxdj/mixxx/blob/main/src/effects/builtin/lvmixeqbase.h#L189
It is stored here:
https://github.com/mixxxdj/mixxx/blob/3085bbe95107fd789a8a966dfeb341cfe74cfad8/src/effects/effectprocessor.h#L143

gdb2.txt
gdb3.txt

is the same cause. An invalid group state. I will have a look.

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

I presume you mean it is a good idea to test whether the issue is still present in 'Be-ing:effects_refactoring'?
Ok, tried that. But with all this git-stuff being new to me, please let me explain what I did, more or less step-by-step. This way we can be sure that this test was meaningful.

'git clone https://github.com/Be-ing/mixxx.git .'
'cd mixxx'
'git switch effects_refactoring'
'cmake -S . -B ../build -DCMAKE_BUILD_TYPE=Debug -DDEBUG_ASSERTIONS_FATAL=ON'
'cmake --build ../build --parallel 8'
'cd ../build'
'gdb --args ./mixxx -debugAssertBreak'

Then I checked the version under 'Help->About'.
Version was '2.4.0-alpha-pre (build effects_refactoring r7086)', so I assumed everything worked as expected.

Switched interface from 'Shade' to 'Tango' and started experimenting.

I had the impression that it took me way longer to reproduce, but finally can confirm that the (or an) issue still exists.

Changed in mixxx:
milestone: none → 2.3.0
Revision history for this message
Daniel Schürmann (daschuer) wrote :

This was more like a remainder to myself.

But testing is also a good idea.
Your git sequence is looking good.
Thank you for confirming.

Changed in mixxx:
status: Incomplete → Confirmed
assignee: Be (be.ing) → nobody
Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
Revision history for this message
Daniel Schürmann (daschuer) wrote :

This PR should lint the issue
https://github.com/mixxxdj/mixxx/pull/3882

@schleichmichel: please verify if it makes a difference to you.

Revision history for this message
Uwe Klotz (uklotzde) wrote :

Merged

Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
Michael (ehmic) wrote :

Sorry, I'm a little bit late here. E-Mail notifications were disabled, so I saw your request just yesterday.

Checked version 2.3-beta-4120-g9e7e0c7066 today and, while this version seems to be more stable, I was unfortunately still able to crash Mixxx when experimenting with effects. The error seems to be different though.

Changed in mixxx:
milestone: 2.3.0 → 2.3.1
ronso0 (ronso0)
Changed in mixxx:
milestone: 2.3.1 → 2.3.2
Revision history for this message
Daniel Schürmann (daschuer) wrote :

I have no longer work in progress, sorry.

Changed in mixxx:
status: In Progress → Confirmed
milestone: 2.3.2 → none
assignee: Daniel Schürmann (daschuer) → nobody
Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
milestone: none → 2.4.0
Changed in mixxx:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers