-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
heap corruption/crash when pulseaudio audio device is removed #39
Comments
I tried to reproduce that with a simple usb c-media 2.0 chanel device but i couldn't trigger a crash. |
Looking at the code in pulse-backend.c, we have these functions:
in which we call
|
https://www.unix.com/red-hat/233292-free-corrupted-unsorted-chunks.html "The most common causes for this type of corruption are (1) using an uninitialized pointer and (2) writing more data into memory than was allocated for the buffer into which the data is being written. Also in |
The crash is pretty consistent, I think it happens every time. valgrind gives the exact same stacktrace for both mate-settings-daemon and mate-volume-control-status-icon. I compiled and installed libmatemixer 1.27 with debug symbols, and the error prints whenever I unplug the device. It's not specific to the usb audio device; I have two, and removing either one triggers a crash.
|
This kind of issue will be reported very often in fedora.
Full stacktrace: |
Please test #40 |
As the author of the PR, I have tested against mate-volume-control-status-icon many times (verifying under valgrind to be sure) and have tested with mate-settings-daemon as well. I'm not sure which local factors are triggering the crash exactly, but to help with reproduction, you could try this:
The more stuff that is recreated or loaded, the more it should disturb the heap enough to trigger an assertion. |
I myself have never, ever had this crash, thus the call for others on the team to review
|
I am using fedora 38 with pipewire in result pulseaudio commands like
|
Do the inputs show up in mate-volume-control? I don't know much about this but maybe it only shows up in use? On my setup with this installed I have
but recording works fine. If I have something recording sound, I get
If not recording sound I get
|
Expected behaviour
Using a USB audio device, if the audio device disconnects, MATE software should handle the device removal gracefully.
Actual behaviour
If the audio device vanishes, applications which integrate libmatemixer will error or crash. In mate-settings-daemon, the corruption is detected by malloc:
free(): corrupted unsorted chunks
corrupted double-linked list
malloc_consolidate(): unaligned fastbin chunk detected
In mate-volume-control-status-icon, it presents as so:
malloc(): unaligned tcache chunk detected
../glib/glib/gmem.c:207: failed to allocate 103079215112 bytes
Steps to reproduce the behaviour
The mate settings daemon backtrace shows the "device-removed" signal being fired and a device name string being removed from a hash table, I think because of on_connection_card_removed, while in mate-volume-control-status-icon, the error seems to occur in pulse_ext_stream_update->g_object_freeze_notify for some reason.
crashes.tar.gz
MATE general version
1.26.0
Package version
1.26.0 (no patches)
Linux Distribution
Arch Linux (rolling)
The text was updated successfully, but these errors were encountered: