[Pkg-utopia-maintainers] Bug#923046: flatpak segfaults in live-build hook

Simon McVittie smcv at debian.org
Mon Jul 1 13:17:56 BST 2019


Control: retitle -1 flatpak: segfault when no D-Bus system bus is available
Control: reassign -1 libpolkit-agent-1-0 0.105-18
Control: tags -1 + patch fixed-upstream

On Sat, 23 Feb 2019 at 16:23:20 +0100, Ronny Standtke wrote:
> (flatpak remote-add:9603): GLib-GIO-CRITICAL **:
> g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION
> (connection)' failed
> 
> ** (flatpak remote-add:9603): CRITICAL **:
> polkit_authority_register_authentication_agent_with_options_sync:
> assertion 'POLKIT_IS_AUTHORITY (authority)' failed
> 
> Segmentation fault

I've encountered this again in a different environment, and it appears
to be a libpolkit-agent-1-0 bug. A minimal reproducer is to run flatpak
with no D-Bus system bus available, for example by mounting a tmpfs over
/run/dbus on an ordinary desktop system:

    bwrap --dev-bind / / --tmpfs /run/dbus flatpak list --system

resulting in these critical warnings:

    (flatpak list:15619): GLib-GIO-CRITICAL **: 11:45:34.076: g_dbus_connection_register_object: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

    ** (flatpak list:15619): CRITICAL **: 11:45:34.077: polkit_authority_register_authentication_agent_with_options_sync: assertion 'POLKIT_IS_AUTHORITY (authority)' failed

followed by this segmentation fault:

    #0  0x00007f989c459b62 in server_register (server=server at entry=0x55cff362b120, error=error at entry=0x7ffc7a6d95b8)
        at polkitagentlistener.c:157
    #1  0x00007f989c45a281 in polkit_agent_listener_register_with_options
        (listener=0x55cff3621d40, flags=POLKIT_AGENT_REGISTER_FLAGS_RUN_IN_THREAD, subject=0x55cff3620900, object_path=<optimized out>, options=<optimized out>, cancellable=0x0, error=0x7ffc7a6d95b8) at polkitagentlistener.c:457
    #2  0x000055cff2067405 in  ()
    #3  0x00007f989b82a09b in __libc_start_main (main=
        0x55cff2067140, argc=3, argv=0x7ffc7a6d97f8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffc7a6d97e8) at ../csu/libc-start.c:308

This was fixed in polkit 0.108 with the attached patch, which is
unfortunately missing from what is effectively a Debian fork of polkit
0.105 (in recent versions we have been quite thorough about backporting
bugfixes from 0.11x into 0.105, but some of the older changes have still
not been incorporated).

For post-buster, I think we should probably switch to the latest
upstream versions of polkit; and if the JavaScript policy format is still
considered unacceptable by the Debian polkit maintainers, then we should
version the package as 0.105+mostly0.116 or similar, and apply Debian
patches to disable the JavaScript policy engine and reinstate the old
"local authority" policy engine.

    smcv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-PolkitAgent-Avoid-crashing-if-initializing-the-serve.patch
Type: text/x-diff
Size: 1217 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-utopia-maintainers/attachments/20190701/7a6c323f/attachment.patch>


More information about the Pkg-utopia-maintainers mailing list