Bugzilla – Bug 439473
PolicyKit aborts if AuthenticationAgent is missing
Last modified: 2008-11-05 15:24:40 UTC
kupdateapplet crashed on startup today. Some details that might be important: - Factory as of beta3 - I use KDE 3 - for whatever reason (still searching for it...), kupdateapplet can't connect to packagekit - but until today this resulted in an error message in the tooltip, not a crash Backtrace: Anwendung: Updater Applet (kupdateapplet), Signal SIGABRT [?1034h(no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] ... 53 lines saying "(no debugging symbols found)" ... [KCrash handler] #5 0xffffe430 in __kernel_vsyscall () #6 0xb662b9b0 in raise () from /lib/libc.so.6 #7 0xb662d2e8 in abort () from /lib/libc.so.6 #8 0xb63eb205 in ?? () from /lib/libdbus-1.so.3 #9 0xb63e6c19 in ?? () from /lib/libdbus-1.so.3 #10 0xb63d07c4 in dbus_set_error () from /lib/libdbus-1.so.3 #11 0xb49cd6dd in ?? () from /usr/lib/libpolkit-dbus.so.2 #12 0xb49cd95b in polkit_auth_obtain () from /usr/lib/libpolkit-dbus.so.2 #13 0xb4a383cc in ?? () from /usr/lib/kde4/kupdateapplet_packagekit.so #14 0xb4a2c96c in ?? () from /usr/lib/kde4/kupdateapplet_packagekit.so #15 0xb4a260c2 in ?? () from /usr/lib/kde4/kupdateapplet_packagekit.so #16 0xb4a296dc in ?? () from /usr/lib/kde4/kupdateapplet_packagekit.so #17 0xb7e4f480 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4 #18 0xb7e50202 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #19 0x08056801 in _start ()
Could you please tell me the package versions of: - PolicyKit - dbus - glibc - libqt4 - kde4-kupdateapplet
# rpm -q PolicyKit dbus-1 glibc libqt4 kde4-kupdateapplet PolicyKit-0.9-12.6 dbus-1-1.2.4-2 glibc-2.8.90-14.2 libqt4-4.4.3-2.3 kde4-kupdateapplet-0.8.10-2.7
Interestingly, kupdateapplet crashes at every startup since I opened this bug. I _think_ I know the reason: In bug 435776, Ludwig recommendet to run set_polkit_default_privs once. I did this, and since then kupdateapplet crashes.
I improved the policykit-get-auth mechanism in kupdateapplet. Could you please try the latest version of kupdateapplet: https://build.opensuse.org/package/show?package=kde4-kupdateapplet&project=home%3Atgoettlicher Note: kde4-kupdateapplet-zypp depends on a zypper version that might not be available yet. But that's not a problem because only kde4-kupdateapplet and kde4-kupdateapplet-packagekit are needed for testing.
Created attachment 249067 [details] console output The packages from home:tgoettcher (I updated kde4-updateapplet and kde4-updateapplet-packagekit) don't crash :-) But I still get a permission denied message: User is not permitted: org.freedesktop.packagekit.system-sources-refresh The full console output is attached, maybe you find the reason for the problem. Note: I use permissions.secure - and have more permission problems, like failing automounting of usb storage devices.
(In reply to comment #5 from Christian Boltz) > The packages from home:tgoettcher (I updated kde4-updateapplet and > kde4-updateapplet-packagekit) don't crash :-) Great! Thanks for testing. > But I still get a permission denied message: > User is not permitted: org.freedesktop.packagekit.system-sources-refresh If PolicyKit-kde 0.2 is installed a popup should ask for permission. As far as I know this version isn't available as package yet. The package 'PolicyKit-gnome' contains 'polkit-gnome-authorization' that can be used to modify the permissions in the meantime. I close this bug because the crash is fixed. Note: Bug 389415 is more related.
(In reply to comment #6 from Thomas Goettlicher) > (In reply to comment #5 from Christian Boltz) > > The packages from home:tgoettcher (I updated kde4-updateapplet and > > kde4-updateapplet-packagekit) don't crash :-) > Great! Thanks for testing. Unfortunately things are more "interesting" ;-) If I start the applet in konsole, it doesn't crash. This was also what I tested when reporting that it does no longer crash. But: When the applet is auto-started after boot/login, it crashes again. Hmmm, could there be a race condition (like a required service not yet running at login time)? Another option might be the "don't check updates when system load is high" - around login, I typically have a load of 5. The backtrace looks different now: Anwendung: Updater Applet (kupdateapplet), Signal SIGABRT [?1034h(no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] ... 53x (no debugging symbols found) ... [KCrash handler] #5 0xffffe430 in __kernel_vsyscall () #6 0xb65ac9b0 in raise () from /lib/libc.so.6 #7 0xb65ae2e8 in abort () from /lib/libc.so.6 #8 0xb636c205 in ?? () from /lib/libdbus-1.so.3 #9 0xb6367c19 in ?? () from /lib/libdbus-1.so.3 #10 0xb63517c4 in dbus_set_error () from /lib/libdbus-1.so.3 #11 0xb494a6dd in ?? () from /usr/lib/libpolkit-dbus.so.2 #12 0xb494a95b in polkit_auth_obtain () from /usr/lib/libpolkit-dbus.so.2 #13 0xb49b554a in PackageKit::PolkitClient::getAuth(QString const&) () from /usr/lib/kde4/kupdateapplet_packagekit.so #14 0xb49a973b in QPackageKitConnector::refreshCache(bool) () from /usr/lib/kde4/kupdateapplet_packagekit.so #15 0xb49a3012 in PackageKitUpdater::doCheckForUpdates() () from /usr/lib/kde4/kupdateapplet_packagekit.so #16 0xb49a662c in PackageKitUpdater::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/kde4/kupdateapplet_packagekit.so #17 0xb7dd0480 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4 #18 0xb7dd1202 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #19 0x08056591 in Logics::checkUpdates(QTreeWidget*, QTreeWidget*, QTreeWidget*) () #20 0x08057ddd in Logics::slotAutoCheckForUpdates() () #21 0x0805b805 in Logics::qt_metacall(QMetaObject::Call, int, void**) () #22 0xb7dd0480 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/libQtCore.so.4 #23 0xb7dd1202 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #24 0xb7dd6847 in ?? () from /usr/lib/libQtCore.so.4 #25 0xb7dd696c in ?? () from /usr/lib/libQtCore.so.4 #26 0xb7dcaf4f in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4 #27 0xb712e8fc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #28 0xb713675e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #29 0xb6e2c07d in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5 #30 0xb7dbb861 in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #31 0xb7de9a86 in ?? () from /usr/lib/libQtCore.so.4 #32 0xb7de5f60 in ?? () from /usr/lib/libQtCore.so.4 #33 0xb64139c8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #34 0xb6417083 in ?? () from /usr/lib/libglib-2.0.so.0 #35 0xb6417241 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0 #36 0xb7de5eb8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #37 0xb71c7795 in ?? () from /usr/lib/libQtGui.so.4 #38 0xb7db9f1a in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #39 0xb7dba0da in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #40 0xb7dbc795 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4 #41 0xb712e777 in QApplication::exec() () from /usr/lib/libQtGui.so.4 #42 0x0804e5a6 in main ()
The function that causes the crash looks like this: bool PolkitClient::getAuth(const QString &action) { DBusError e; dbus_error_init(&e); if(polkit_check_auth(QCoreApplication::applicationPid(), action.toAscii().data(), NULL)) return true; bool auth = polkit_auth_obtain(action.toAscii().data(), 0, QCoreApplication::applicationPid(), &e); if(!auth) { qDebug() << "Authentification error :" << e.name << ":" << e.message; } return auth; }
Ludwig, do you have an idea what's wrong with the polkit_auth_obtain() call within this function?
Your code looks good AFAICT. It's a bug in PolicyKit and I suspect this is the culprit: if (reply == NULL || dbus_error_is_set (error)) { ret = _auth_show_dialog_text (action_id, pid, error); _auth_show_dialog_text uses dbus_error_set itself and if the error already is set abort() gets called.
please try home:lnussel:Factory/PolicyKit when it's done building
Christian, does the package from home:lnussel:Factory/PolicyKit fix the problem?
(In reply to comment #12 from Thomas Goettlicher) > Christian, does the package from home:lnussel:Factory/PolicyKit fix the > problem? At least kupdateapplet doesn't crash anymore (I really tested by rebooting this time ;-) The remaining part: kupdateapplet more or less hangs displaying "checking for updates" with the progressbar at "100%, finished" while it should probably display a "permission denied" message. Console output: # kupdateapplet, manually clicked "check for updates" Attempting to obtain authorization for org.freedesktop.packagekit.refresh-cache. polkit-grant-helper: given auth type (1 -> no) is bogus Failed to obtain authorization for org.freedesktop.packagekit.refresh-cache. Authentification error : : Attempting to obtain authorization for org.freedesktop.packagekit.refresh-cache. polkit-grant-helper: given auth type (1 -> no) is bogus Failed to obtain authorization for org.freedesktop.packagekit.refresh-cache. Authentification error : : Things that make me wonder in the messages above: - the "given auth type (...) is bogus" message - the empty "Authentification error" line (and I still don't like the fact that permissions.secure doesn't allow the user to check for updates - but that's a very old discussion...)
ok, so the PolicyKit related crash is fixed. I've opened a new bug for the permission denied issue.