polkitd aborts with gnome-shell
Submitted by Canek Peláez
Assigned to David Zeuthen @david
Description
Running Gentoo with polkit 0.107 and gnome-shell 3.4.1. This always happens; sometimes the first time gnome-shell tries to register itself as an authentication agent, sometimes afterwards. The easiest way to reproduce the bug is to restart gnome-shell (Alt-F2 r) and/or close or open an application. Then polkitd will die with the message:
** ERROR:polkitbackendjsauthority.c:730:subject_to_jsval: code should not be reached
I'm able to reproduce this in my desktop machine and in my laptop. The problem is hard to track, since the polkit.service unit file that systemd runs, has polkitd executed with --no-debug, and therefore nothing appears in the logs/journal. Afterwards gnome-shell will try to register itself again as authentication agent, and the dbus activation will launch polkitd again, so it doesn't register as crashed with systemctl status polkit.service.
I detected my problem when I lost the Suspend option from my desktop machine: if polkitd crashes when gnome-shell first tries to register itself as authentication agent, somehow it denies the user to suspend/hibernate (or to mount USB devices, I discovered today).
I got a backtrack from polkitd compiling it with -ggdb; however is not very useful: in line 730 of polkitbackendjsauthority.c, polkitd calls g_assert_not_reached (), and that's it, just as the message says.
Any other info that you need please tell me; I'm able to use my machines since pm-suspend keeps working, but the experience is severely degraded.