ncopa / xfce-polkit

A simple PolicyKit authentication agent for XFCE
GNU General Public License v2.0
36 stars 3 forks source link

Crash with glib2 v2.45 (g_type_check_instance_is_fundamentally_a) #1

Closed rapgro closed 9 years ago

rapgro commented 9 years ago

As backtrace indicates this is a bug in glib2 v2.45 as currently in Fedora 23 Beta. Fedora 22 still has glib2 v2.44 and does not crash. The new glib2 2.46.0 does also not show this crash (as later in F23/testing).

Try this use case:

  1. Ensure no other polkit agent gets started.
  2. Enable xfce-polkit in autostart.
  3. Login into Xfce session.
  4. Open terminal and execute: $ pkexec true
  5. Enter password and click OK.

Truncated backtrace: Thread no. 1 (8 frames)

0 g_type_check_instance_is_fundamentally_a at gtype.c:4028

2 g_task_finalize at gtask.c:627

4 auth_dlg_data_free at xfce-polkit-listener.c:31

5 g_cclosure_marshal_VOID__ENUMv at gmarshal.c:1496

6 _g_closure_invoke_va at gclosure.c:864

8 g_signal_emit_by_name at gsignal.c:3479

9 io_watch_have_data at polkitagentsession.c:498

14 gtk_main at gtkmain.c:1268

See https://retrace.fedoraproject.org/faf/reports/813130/

Possibly related GNOME patch: https://bugzilla.gnome.org/show_bug.cgi?id=730984 Downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1264590

ncopa commented 9 years ago

I was able to reproduce with glib-2.45.5.

relevant comment from downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1264590#c20

Looks like an issue with memory management in the caller code (xfce-polkit). From a quick look, looks like it's unreffing the cancellable that's passed to GTask when it doesn't actually hold a ref to it.