Bug 249000

Summary: Polkit crashes during shutdown
Product: [Plasma] policykit-kde-agent-1 Reporter: Carth Onasi <Carth_Onasi>
Component: polkit-kde-authentication-agent-1Assignee: Jaroslav Reznik <jreznik>
Status: RESOLVED DUPLICATE    
Severity: crash CC: gokcen.eraslan, rad.n
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Carth Onasi 2010-08-25 15:52:11 UTC
Application: polkit-kde-authentication-agent-1 (0.1)
KDE Platform Version: 4.5.00 (KDE 4.5.0)
Qt Version: 4.7.0
Operating System: Linux 2.6.35.2-desktop-1mnb x86_64
Distribution: "Mandriva Linux 2010.1"

-- Information about the crash:
- What I was doing when the application crashed:
When I choose to shutdown my laptop, everything is OK, but when I get black screen (X is running, but there is no window manager - windows are without title), I get info about crash of Polkit and computer did not shutdown before I choose Cancel in Bug reporter.

The crash can be reproduced every time.

-- Backtrace:
Application: PolicyKit1-KDE (polkit-kde-authentication-agent-1), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fd9d4537720 (LWP 10374))]

Thread 2 (Thread 0x7fd9c4065710 (LWP 10377)):
#0  0x00007fd9d0381c64 in __lll_lock_wait () from /lib64/libpthread.so.0
#1  0x00007fd9d037d0c5 in _L_lock_824 () from /lib64/libpthread.so.0
#2  0x00007fd9d037cf97 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3  0x00007fd9cfa1bbfa in g_datalist_id_set_data_full () from /usr/lib64/libglib-2.0.so.0
#4  0x00007fd9cf7b842f in ?? () from /usr/lib64/libgobject-2.0.so.0
#5  0x00007fd9cf7b86ba in g_object_unref () from /usr/lib64/libgobject-2.0.so.0
#6  0x00007fd9cf53b996 in ?? () from /usr/lib64/libgio-2.0.so.0
#7  0x00007fd9cf7b8744 in g_object_unref () from /usr/lib64/libgobject-2.0.so.0
#8  0x00007fd9cf537dfa in ?? () from /usr/lib64/libgio-2.0.so.0
#9  0x00007fd9cf54770a in ?? () from /usr/lib64/libgio-2.0.so.0
#10 0x00007fd9cf547775 in ?? () from /usr/lib64/libgio-2.0.so.0
#11 0x00007fd9cfa306f0 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#12 0x00007fd9cfa34638 in ?? () from /usr/lib64/libglib-2.0.so.0
#13 0x00007fd9cfa34b4d in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
#14 0x00007fd9cf546a34 in ?? () from /usr/lib64/libgio-2.0.so.0
#15 0x00007fd9cfa59da4 in ?? () from /usr/lib64/libglib-2.0.so.0
#16 0x00007fd9d037aa5d in start_thread () from /lib64/libpthread.so.0
#17 0x00007fd9d1f3a15d in clone () from /lib64/libc.so.6
#18 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fd9d4537720 (LWP 10374)):
[KCrash Handler]
#6  0x00007fd9cfa1b668 in ?? () from /usr/lib64/libglib-2.0.so.0
#7  0x00007fd9cfa1bb81 in g_datalist_id_set_data_full () from /usr/lib64/libglib-2.0.so.0
#8  0x00007fd9cf7b870a in g_object_unref () from /usr/lib64/libgobject-2.0.so.0
#9  0x00007fd9d3af2630 in PolkitQt1::Agent::Listener::~Listener (this=0x2563380, __in_chrg=<value optimized out>) at /usr/src/debug/polkit-qt-1-0.96.1/agent/polkitqt1-agent-listener.cpp:69
#10 0x00000000004079c5 in PolicyKitListener::~PolicyKitListener (this=0x2563380, __in_chrg=<value optimized out>) at /usr/src/debug/polkit-kde-1-0.95.1/agent/policykitlistener.cpp:42
#11 0x00007fd9d331518f in QObjectPrivate::deleteChildren (this=0x23b7be0) at kernel/qobject.cpp:1949
#12 0x00007fd9d331c18b in QObject::~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:945
#13 0x00007fd9d2695753 in QApplication::~QApplication (this=0x7fff262468b0, __in_chrg=<value optimized out>) at kernel/qapplication.cpp:1156
#14 0x000000000040893e in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/debug/polkit-kde-1-0.95.1/agent/main.cpp:42

Reported using DrKonqi
Comment 1 Radek Novacek 2010-09-01 11:00:30 UTC
I'm unable to reproduce this bug. Can you please provide your versions of polkit and polkit-qt. Thank you.
Comment 2 Carth Onasi 2010-09-01 18:25:25 UTC
I have this packages:

[root@KotOR carth]# rpm -qa *polkit*
lib64polkit1-devel-0.98-1mdv2011.0
lib64polkit-devel-0.9-7mdv2010.1
lib64polkit-qt-agent-10-0.96.1-1mdv2011.0
polkit-qt-devel-0.9.3-1mdv2010.1
polkit-qt-debug-0.9.3-1mdv2010.1
lib64polkit-qt-core-10-0.96.1-1mdv2011.0
lib64polkit-qt-core0-0.9.3-1mdv2010.1
polkit-kde-1-debug-0.95.1-3mdv2010.1
lib64polkit2-0.9-7mdv2010.1
lib64polkit-qt-gui-10-0.96.1-1mdv2011.0
lib64polkit1_0-0.98-1mdv2011.0
lib64polkit-qt-gui0-0.9.3-1mdv2010.1
polkit-qt-1-debug-0.96.1-1mdv2011.0
polkit-kde-1-0.95.1-3mdv2010.1
polkit-qt-1-devel-0.96.1-1mdv2011.0
polkit-0.98-1mdv2011.0
lib64polkitkdeprivate4-4.5.0-3mdv2011.0
polkit-gnome-0.97-1mdv2011.0
polkit-debug-0.98-1mdv2011.0

Thanks.
Comment 3 Gökçen Eraslan 2010-09-08 09:45:21 UTC
I can also reproduce the bug with latest polkit(0.98), polkit-qt-1 and polkit-kde-1. I can say that Polkit KDE agent is not working with new polkit at all.

When I print the content of m_userModelSIM before and after the AuthDialog is shown, everything is OK, I can see user names with identity->toString(). 

But, when I try to print identity->toString() method of userModelSIM items at the beginning of AuthDialog::on_userCB_currentIndexChanged slot, just after I clik on a user on the AuthDialog, polkit says:

** (process:18090): CRITICAL **: polkit_identity_to_string: assertion `POLKIT_IS_IDENTITY (identity)' failed

I couldn't figure out the reason behind.
Comment 4 Radek Novacek 2010-09-08 17:29:35 UTC
Can you try it with snapshot of polkit-qt-1 from kde repository? For me it prints: 

GLib:ERROR:gvarianttypeinfo.c:186:g_variant_type_info_check: assertion failed: (0 <= index && index < 24)

After manual restart of polkit-kde it work normally for me. I'll have to dig deeper to find what is wrong with it.
Comment 6 Christoph Feck 2010-09-25 20:10:47 UTC

*** This bug has been marked as a duplicate of bug 248636 ***