Bug 291977 - polkit-kde-authentication-agent-1 will crash with G_SLICE=always-malloc set in the environment
Summary: polkit-kde-authentication-agent-1 will crash with G_SLICE=always-malloc set i...
Status: RESOLVED FIXED
Alias: None
Product: policykit-kde-agent-1
Classification: Plasma
Component: polkit-kde-authentication-agent-1 (show other bugs)
Version: KDE4.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Martin Bříza
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-19 18:27 UTC by Danny Auble
Modified: 2013-03-25 10:59 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Auble 2012-01-19 18:27:16 UTC
Version:           KDE4.3 (using KDE 4.7.4) 
OS:                Linux

in my .bashrc I have 

export G_SLICE=always-malloc

With that set everytime I try to update packages with Muon polkit crashes when it tries to bring up a list of users to authenticate as root.  If I comment out the line in my .bashrc everything works out just fine.

I have a backtrace, but I couldn't figure out which debug packages were needed and the crash assistant couldn't ether.  It is very reproducible though, so if you can't get it to happen like I describe tell me the debug packages to install and I will. 

Reproducible: Always

Steps to Reproduce:
1. put 'export G_SLICE=always-malloc' in your .bashrc file.
2. try to install something with Muon as a regular user.


Actual Results:  
the authentication crashes and you are unable to install anything.

Expected Results:  
Window pops up and asks you to state which user to install something as.

Qt Version: 4.7.4
Operating System: Linux 3.0.0-14-generic x86_64
Distribution: Ubuntu 11.10
Compiler: gcc
Comment 1 Jekyll Wu 2012-08-16 13:52:06 UTC
Can't reproduce it in ubuntu 12.04. 

If the crash is still reproduciable, please paste the backtrace in the comment. Without seeing the imcompelte backtrace first, it is hard to tell which debug package you need to install
Comment 2 Danny Auble 2012-08-17 17:46:19 UTC
here is the backtrace as done with 12.04.  It is still very reproducable in my environment.  Let me know if you need anything else.  Simply unsetting the G_SLICE env var fixes the scenario.

Application: PolicyKit1-KDE (polkit-kde-authentication-agent-1), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f9a574b1840 (LWP 12438))]

Thread 2 (Thread 0x7f9a4540c700 (LWP 12445)):
#0  0x00007f9a54970b03 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007f9a52a60036 in g_main_context_poll (n_fds=3, fds=0x7f9a40001100, timeout=-1, context=0x1b4a1d0, priority=<optimized out>) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3440
#2  g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x1b4a1d0, self=<optimized out>) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3141
#3  g_main_context_iterate (context=0x1b4a1d0, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3083
#4  0x00007f9a52a6049a in g_main_loop_run (loop=0x1b4a360) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3340
#5  0x00007f9a52543406 in gdbus_shared_thread_func (user_data=<optimized out>) at /build/buildd/glib2.0-2.32.3/./gio/gdbusprivate.c:277
#6  0x00007f9a52a819e5 in g_thread_proxy (data=0x1b4a3b0) at /build/buildd/glib2.0-2.32.3/./glib/gthread.c:801
#7  0x00007f9a517fbe9a in start_thread (arg=0x7f9a4540c700) at pthread_create.c:308
#8  0x00007f9a5497c4bd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f9a574b1840 (LWP 12438)):
[KCrash Handler]
#6  0x00007f9a527ddcfa in g_object_unref (_object=<optimized out>) at /build/buildd/glib2.0-2.32.3/./gobject/gobject.c:2910
#7  0x00007f9a5205f963 in ?? () from /usr/lib/x86_64-linux-gnu/libpolkit-agent-1.so.0
#8  0x00007f9a525343eb in call_in_idle_cb (user_data=0x7f9a40003cb0) at /build/buildd/glib2.0-2.32.3/./gio/gdbusconnection.c:4687
#9  0x00007f9a52a5fd53 in g_main_dispatch (context=0x19a6a80) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:2539
#10 g_main_context_dispatch (context=0x19a6a80) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3075
#11 0x00007f9a52a600a0 in g_main_context_iterate (dispatch=1, block=<optimized out>, context=0x19a6a80, self=<optimized out>) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3146
#12 g_main_context_iterate (context=0x19a6a80, block=<optimized out>, dispatch=1, self=<optimized out>) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3083
#13 0x00007f9a52a60164 in g_main_context_iteration (context=0x19a6a80, may_block=1) at /build/buildd/glib2.0-2.32.3/./glib/gmain.c:3207
#14 0x00007f9a55dbf3bf in QEventDispatcherGlib::processEvents (this=0x1990250, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#15 0x00007f9a551bad5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#16 0x00007f9a55d8ec82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#17 0x00007f9a55d8eed7 in QEventLoop::exec (this=0x7fff9452d6b0, flags=...) at kernel/qeventloop.cpp:204
#18 0x00007f9a55d93f67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#19 0x0000000000408506 in ?? ()
#20 0x00007f9a548ab76d in __libc_start_main (main=0x408260, argc=1, ubp_av=0x7fff9452d978, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff9452d968) at libc-start.c:226
#21 0x000000000040856d in _start ()
Comment 3 Jekyll Wu 2012-08-20 06:19:24 UTC
Thanks for the backtrace
Comment 4 Martin Bříza 2013-03-25 10:59:31 UTC
Git commit 4ed9c3fa043b70ee50176c4baacc07d1c73f1fce by Martin Briza.
Committed on 22/03/2013 at 15:52.
Pushed by mbriza into branch 'master'.

Fixed reference counting of GObjects

Gets us rid of some crashes and reduces memory leaking. There's a change it fixes crashes~
Related: bug 257802, bug 286935, bug 307323

M  +4    -0    agent/polkitqt1-agent-listener.cpp
M  +3    -0    agent/polkitqt1-agent-session.cpp
M  +10   -2    core/polkitqt1-details.cpp
M  +7    -0    core/polkitqt1-subject.cpp

http://commits.kde.org/polkit-qt-1/4ed9c3fa043b70ee50176c4baacc07d1c73f1fce