Bug 12155 - pavucontrol segfaults out when launched in M4RC Live-CD pre-release
Summary: pavucontrol segfaults out when launched in M4RC Live-CD pre-release
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Colin Guthrie
QA Contact:
URL:
Whiteboard: 4RC
Keywords:
Depends on:
Blocks: 11704
  Show dependency treegraph
 
Reported: 2013-12-30 17:35 CET by William Kenney
Modified: 2014-01-14 19:44 CET (History)
2 users (show)

See Also:
Source RPM: pavucontrol
CVE:
Status comment:


Attachments
gdb_result (744 bytes, text/plain)
2013-12-31 02:00 CET, William Kenney
Details
gbd results #2 (2.07 KB, text/plain)
2013-12-31 17:03 CET, William Kenney
Details
pacmd_ls (28.18 KB, text/plain)
2013-12-31 17:21 CET, William Kenney
Details
Backtrace from Phonon/KDE/Qt (1.87 KB, text/plain)
2013-12-31 18:00 CET, Colin Guthrie
Details
my pacmd (20.19 KB, text/plain)
2013-12-31 19:48 CET, Nicolas Pomarède
Details
pavucontrolbacktrace.txt (3.56 KB, text/plain)
2014-01-08 18:39 CET, claire robinson
Details

Description William Kenney 2013-12-30 17:35:50 CET
I'm getting a segmentation fault error when attempting to launch
pavucontrol as either a desktop icon, menu or terminal.

Mageia-4-RC-LiveCD-KDE4-en-i586-CD.iso  12/29/13
MD5: b16b2964bc640365048a652a5dd2a639

This does not occur in the 64-bit Live-DVD
Mageia-4-RC-LiveDVD-KDE4-x86_64-DVD.iso  12/29/13
e9302e6aface47416d090d17216c9864

Reproducible: 

Steps to Reproduce:
William Kenney 2013-12-30 21:54:05 CET

Whiteboard: (none) => 4RC

Comment 1 Thierry Vignaud 2013-12-30 23:14:08 CET
Try running it from gdb.
Just run the following commands:

urpmi gdb
urpmi.update Core\ Release\ Debug
urpmi --media Core\ Release\ Debug {glibc,pavucontrol}-debuginfo
gdb -q pavucontrol

When in gdb, you can type "run" in order to start pavucontrol from the debugger.
Once it segfaults, just type "bt" in order to get the backtrace.
Then copy it in a text file you will attach (NOT paste) to this bug report

Keywords: (none) => NEEDINFO
CC: (none) => thierry.vignaud
Assignee: bugsquad => mageia
Source RPM: (none) => pavucontrol

Comment 2 William Kenney 2013-12-31 02:00:27 CET
Created attachment 4692 [details]
gdb_result

Attached
Comment 3 Colin Guthrie 2013-12-31 12:28:33 CET
You missed the bit where you actually get the backtrace!!

To repeat Thierry's comment:
> Once it segfaults, just type "bt" in order to get the backtrace.
Thierry Vignaud 2013-12-31 12:31:45 CET

Attachment 4692 is obsolete: 0 => 1

Comment 4 William Kenney 2013-12-31 17:03:45 CET
Created attachment 4698 [details]
gbd results #2

Is this better?
Comment 5 Colin Guthrie 2013-12-31 17:06:52 CET
Curious, this seems to be the same issue reported by Nicolas Pomarède in the Cauldron ML in the thread: "segfault when configuring phonon".

Can you attach the output of "pacmd ls"?
Comment 6 William Kenney 2013-12-31 17:21:07 CET
Created attachment 4699 [details]
pacmd_ls

pacmd listing
Comment 7 Colin Guthrie 2013-12-31 17:31:00 CET
Just to confirm, you are using English locale right?
Comment 8 William Kenney 2013-12-31 17:45:20 CET
USA, San Diego, location set to USA, Time Zone Los Angeles.
Comment 9 Colin Guthrie 2013-12-31 17:54:39 CET
Cool, so that rules out some kind of weird utf8 encoding issue.

I wonder if PA is spitting out bad null chars or if there is a larger problem in glibc...
Comment 10 Colin Guthrie 2013-12-31 18:00:52 CET
Created attachment 4701 [details]
Backtrace from Phonon/KDE/Qt

Here is another BT, that avoids the intermediate Glib/stdc++ calls but results in a similar backtrace.

This points at the problem being in either PA or glibc IMO.
Comment 11 Nicolas Pomarède 2013-12-31 19:47:46 CET
Here's the output from pacmd ; there're some french translated in it (eg "Entrée analogique"), maybe this cause the problem.

I ran this from konsole, with fr_FR.UTF-8 locale

CC: (none) => npomarede

Comment 12 Nicolas Pomarède 2013-12-31 19:48:51 CET
Created attachment 4702 [details]
my pacmd

pacmd ls from konsole
Comment 13 Colin Guthrie 2013-12-31 19:50:22 CET
As William is using an English language locale, I don't think that translations actually matter sadly. Bang goes that theory!!

I'll have a poke through the PA code and see what I can find. Although it could still be a GCC/glibc issue.
Comment 14 claire robinson 2014-01-03 10:48:12 CET
Confirmed here with kde install from 4rc livedvd

No backtrace though so not sure it's helpful..

$ gdb pavucontrol
GNU gdb (GDB) 7.6-6.mga4 (Mageia release 4)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-mageia-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/pavucontrol...Reading symbols from /usr/lib/debug/usr/bin/pavucontrol.debug...done.
done.
(gdb) run
Starting program: /usr/bin/pavucontrol 
During startup program terminated with signal SIGSEGV, Segmentation fault.
(gdb) bt
No stack.
(gdb)

Keywords: NEEDINFO => (none)
CC: (none) => eeeemail

Thierry Vignaud 2014-01-03 11:02:37 CET

CC: thierry.vignaud => (none)

William Kenney 2014-01-03 21:14:58 CET

Blocks: (none) => 11704

Comment 15 claire robinson 2014-01-08 18:39:40 CET
Created attachment 4744 [details]
pavucontrolbacktrace.txt

Valid 4RC Classic DVD 32 with default kde installation

full backtrace attached
Comment 16 Nicolas Pomarède 2014-01-08 20:24:00 CET
Comment #15 shows a crash in strcmp_ssse3, my cpu is an athlon 64 X2 with the following flags :
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow pni lahf_lm cmp_legacy

sse3 is not available, could this be the cause of the crash ?

Note that if I run pavucrontrol from gdb, I get a crash too, but later, after the pavucontrol window opens (but the window is empty). This is the log :

Program received signal SIGSEGV, Segmentation fault.
0xb71c0808 in __strcmp_ia32 () from /lib/i686/libc.so.6
(gdb) bt
#0  0xb71c0808 in __strcmp_ia32 () from /lib/i686/libc.so.6
#1  0x0806daa0 in ?? ()
#2  0x08069947 in MainWindow::updateCard(pa_card_info const&) ()
#3  0xb741fe33 in context_get_card_info_callback () from /lib/libpulse.so.0
#4  0xb68870a3 in run_action () from /usr/lib/pulseaudio/libpulsecommon-5.0.so
#5  0xb68874a8 in pa_pdispatch_run () from /usr/lib/pulseaudio/libpulsecommon-5.0.so
#6  0xb7411e74 in pstream_packet_callback () from /lib/libpulse.so.0
#7  0xb688bee9 in do_pstream_read_write () from /usr/lib/pulseaudio/libpulsecommon-5.0.so
#8  0xb6876d0f in callback () from /usr/lib/pulseaudio/libpulsecommon-5.0.so
#9  0xb7457a27 in dispatch_func () from /lib/libpulse-mainloop-glib.so.0
#10 0xb74a26ee in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#11 0xb74a2a98 in g_main_context_iterate.isra.23 () from /lib/libglib-2.0.so.0
#12 0xb74a2efb in g_main_loop_run () from /lib/libglib-2.0.so.0               
#13 0xb775c2dd in gtk_main () from /lib/libgtk-3.so.0                         
#14 0xb7e0e9a4 in Gtk::Main::run_impl() () from /lib/libgtkmm-3.0.so.1        
#15 0xb7e0efb8 in Gtk::Main::run(Gtk::Window&) () from /lib/libgtkmm-3.0.so.1 
#16 0x0805410b in main ()
Comment 17 Colin Guthrie 2014-01-09 10:50:05 CET
(In reply to Nicolas Pomarède from comment #16)
> Comment #15 shows a crash in strcmp_ssse3, my cpu is an athlon 64 X2 with
> the following flags :
> fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36
> clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow
> pni lahf_lm cmp_legacy
> 
> sse3 is not available, could this be the cause of the crash ?

Do you get the same crash on your machine via other means of backtrace saving (i.e. running "ulimit -c unlimited" before launching pavucontrol and then checking the core file? glibc should not use ssse3 functions on your machine if it detects that they are not available.

> Note that if I run pavucrontrol from gdb, I get a crash too, but later,
> after the pavucontrol window opens (but the window is empty). This is the
> log :
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0xb71c0808 in __strcmp_ia32 () from /lib/i686/libc.so.6
> (gdb) bt
> #0  0xb71c0808 in __strcmp_ia32 () from /lib/i686/libc.so.6

Seems to me that something is invalid in the data returned which is causing all the string functions to explode.

I'll have a look and see what I can find.
Comment 18 Colin Guthrie 2014-01-09 10:51:31 CET
This upstream commit looks like a fix :)

commit 85e7fbc196f4424f68e530c2e3a01d9b941f293e
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Mon Nov 4 19:41:22 2013 +0200

    introspect: Fix ABI break introduced by b98a2e1
    
    The size of pa_card_profile_info cannot change even if it just a field
    appended to end because each entry is appended to a contiguous memory
    and accessed by offset this may lead clients to access invalid data.
    
    To fix a new struct called pa_card_profile_info2 is introduced and shall
    be used for now on while pa_card_profile_info shall be considered
    deprecated but it is still mantained for backward compatibility.
    
    A new field called profiles2 is introduced to pa_card_info, this new field
    is an array of pointers to pa_card_profile_info2 so it should be possible
    to append new fields to the end of the pa_card_profile_info2 without
    breaking binary compatibility as the entries are not accessed by offset.
Comment 19 Colin Guthrie 2014-01-09 10:53:31 CET
Actually that commit looks like the breakage, not the fix :(
Comment 20 Colin Guthrie 2014-01-09 12:40:18 CET
OK, I've pushed a potential fix to core/updates_testing. It *shouldn't* make a difference but it restores the only material change between v4.0 introspection and the current code. I'm maybe missing something in the code but the variables being explicitly nulled out here *should* already be null after initialisation, so this patch should do nothing, but I have a feeling it will actually magically fix things.

Can you guys test with -2.mga4 from core/updates_testing? I cannot reproduce here so your testing would be appreciated. Also can you say which architecture you are on?
Comment 21 claire robinson 2014-01-09 13:54:57 CET
# rpm -qa --last 
pulseaudio-utils-5.0-0.20131220.2.mga4.i586   Thu 09 Jan 2014 12:50:42 GMT
pulseaudio-module-x11-5.0-0.20131220.2.mga4.i586 Thu 09 Jan 2014 12:50:42 GMT
pulseaudio-module-gconf-5.0-0.20131220.2.mga4.i586 Thu 09 Jan 2014 12:50:42 GMT
pulseaudio-5.0-0.20131220.2.mga4.i586         Thu 09 Jan 2014 12:50:42 GMT
libpulseglib20-5.0-0.20131220.2.mga4.i586     Thu 09 Jan 2014 12:50:42 GMT
pulseaudio-client-config-5.0-0.20131220.2.mga4.i586 Thu 09 Jan 2014 12:50:41 GMT
libpulsecore5.0-5.0-0.20131220.2.mga4.i586    Thu 09 Jan 2014 12:50:41 GMT
libpulsecommon5.0-5.0-0.20131220.2.mga4.i586  Thu 09 Jan 2014 12:50:41 GMT
libpulseaudio0-5.0-0.20131220.2.mga4.i586     Thu 09 Jan 2014 12:50:41 GMT


Still a segfault but I'll reboot the machine and check again.
Comment 22 claire robinson 2014-01-09 13:59:38 CET
Same after a reboot. The backtrace looks identical.
Comment 23 Colin Guthrie 2014-01-09 14:29:57 CET
Gah! It's actually very obvious.

pavucontrol and KCM phonon was built against a PA snapshot before the fix mentioned in comment:18, This was then fixed in a later PA build, but pavucontrol still contained the buggy API.

Simple rebuilds of pavucontrol and kcm_phonon should fix it up. Might need to rebuild other things too, but I don't think much else uses it, but might look into it to be on the safe side.
Comment 24 claire robinson 2014-01-09 14:40:13 CET
Nice! Well done, cross another one off the list \o/
Comment 25 Colin Guthrie 2014-01-09 14:42:42 CET
OK, I have requested that pavucontrol, kdebase4-runtime and kmix be rebuilt against latest PA. This should fix it.
Comment 26 Nicolas Pomarède 2014-01-11 19:26:53 CET
Hello,
with updated cauldron, I confirm pavucontrol and multimedia config in kcm don't crash anymore.

Except if others still have problem, I think you can mark the bug as 'resolved'

Thanks for the fix.
Comment 27 William Kenney 2014-01-11 20:29:06 CET
So far this has been resolved for me.
Comment 28 Colin Guthrie 2014-01-12 12:01:54 CET
Closing then.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 29 Colin Guthrie 2014-01-14 19:44:26 CET
FWIW: Seems I missed gnome-settings-daemon, gnome-control-center and mate-settings-daemon-pulse. Have requested they all be pushed now.

Note You need to log in before you can comment on or make changes to this bug.