After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640069 - Crash on invoking closure from Gio.bus_own_name()
Crash on invoking closure from Gio.bus_own_name()
Status: RESOLVED DUPLICATE of bug 643192
Product: pygobject
Classification: Bindings
Component: introspection
Git master
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-20 14:24 UTC by Martin Pitt
Modified: 2011-03-04 08:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
crash reproducer (612 bytes, text/x-python)
2011-01-20 14:24 UTC, Martin Pitt
Details

Description Martin Pitt 2011-01-20 14:24:22 UTC
Created attachment 178842 [details]
crash reproducer

I am currently trying to use GDBus with pygi for implementing a dbus server. Calling Gio.bus_own_name() (which really calls g_bus_own_name_with_closures()) works, but as soon as it tries to invoke the first closure (on_bus_acquired()), I get a crash. It also spits out a warning:

$ ./gdbus-server.py 
gdbus-server.py:21: Warning: g_closure_invoke: assertion `closure->marshal || closure->meta_marshal' failed
  mainloop.run()


This is running against gtk, glib, pygobject, and gobject-introspection git master heads as from this hour, but it also happens when running against their latest upstream releases.


  • #0 g_closure_invoke
    at gclosure.c line 757
  • #1 own_with_closures_on_bus_acquired
    at gdbusnameowning.c line 688
  • #2 connection_get_cb
    at gdbusnameowning.c line 440
  • #3 g_simple_async_result_complete
    at gsimpleasyncresult.c line 747
  • #4 complete_in_idle_cb
    at gsimpleasyncresult.c line 757
  • #5 g_idle_dispatch
    at gmain.c line 4536
  • #6 g_main_dispatch
    at gmain.c line 2440
  • #7 g_main_context_dispatch
    at gmain.c line 3013
  • #8 g_main_context_iterate
    at gmain.c line 3091
  • #9 g_main_loop_run
    at gmain.c line 3299
  • #10 _wrap_g_main_loop_run
    at pygmainloop.c line 331
  • #11 call_function
    at ../Python/ceval.c line 3996
  • #12 PyEval_EvalFrameEx
    at ../Python/ceval.c line 2665
  • #13 PyEval_EvalCodeEx
    at ../Python/ceval.c line 3252
  • #14 PyEval_EvalCode
    at ../Python/ceval.c line 666
  • #15 run_mod
    at ../Python/pythonrun.c line 1346
  • #16 PyRun_FileExFlags
    at ../Python/pythonrun.c line 1332
  • #17 PyRun_SimpleFileExFlags
    at ../Python/pythonrun.c line 936
  • #18 Py_Main
    at ../Modules/main.c line 599
  • #19 __libc_start_main
    at libc-start.c line 226
  • #20 _start

Comment 1 Martin Pitt 2011-03-01 22:42:05 UTC
With current git head it now gets a tad faster. I get an assertion, and a slightly different trace:

$ PYTHONPATH=. python /tmp/gdbus-server.py 
/tmp/gdbus-server.py:21: Warning: g_closure_invoke: assertion `closure->marshal || closure->meta_marshal' failed

  • #0 closure_invoke_notifiers
    at /build/buildd/glib2.0-2.28.1/./gobject/gclosure.c line 280
  • #1 g_closure_invoke
    at /build/buildd/glib2.0-2.28.1/./gobject/gclosure.c line 766
  • #2 own_with_closures_on_name_acquired
    at /build/buildd/glib2.0-2.28.1/./gio/gdbusnameowning.c line 708
  • #3 call_acquired_handler
    at /build/buildd/glib2.0-2.28.1/./gio/gdbusnameowning.c line 225
  • #4 request_name_cb
    at /build/buildd/glib2.0-2.28.1/./gio/gdbusnameowning.c line 312
  • #5 g_dbus_connection_call_done
    at /build/buildd/glib2.0-2.28.1/./gio/gdbusconnection.c line 4998
  • #6 complete_in_idle_cb
    at /build/buildd/glib2.0-2.28.1/./gio/gsimpleasyncresult.c line 757
  • #7 g_main_dispatch
    at /build/buildd/glib2.0-2.28.1/./glib/gmain.c line 2440
  • #8 g_main_context_dispatch
    at /build/buildd/glib2.0-2.28.1/./glib/gmain.c line 3013
  • #9 g_main_context_iterate
    at /build/buildd/glib2.0-2.28.1/./glib/gmain.c line 3091
  • #10 g_main_loop_run
    at /build/buildd/glib2.0-2.28.1/./glib/gmain.c line 3299
  • #11 _wrap_g_main_loop_run
    at pygmainloop.c line 331
  • #12 call_function
    at ../Python/ceval.c line 3997
  • #13 PyEval_EvalFrameEx
    at ../Python/ceval.c line 2666
  • #14 PyEval_EvalCodeEx
    at ../Python/ceval.c line 3253
  • #15 PyEval_EvalCode
    at ../Python/ceval.c line 667
  • #16 run_mod
  • #17 PyRun_FileExFlags
  • #18 PyRun_SimpleFileExFlags
    at ../Python/pythonrun.c line 936
  • #19 Py_Main
    at ../Modules/main.c line 599
  • #20 __libc_start_main
    at libc-start.c line 226
  • #21 _start

Comment 2 Martin Pitt 2011-03-01 22:42:35 UTC
Sorry, I meant to say "a tad further", not "faster".
Comment 3 johnp 2011-03-03 18:45:03 UTC
Martin, did you try the patch in bug #643192?
Comment 4 johnp 2011-03-03 19:30:07 UTC
From my tests that fixes it

*** This bug has been marked as a duplicate of bug 643192 ***
Comment 5 Martin Pitt 2011-03-04 08:28:27 UTC
Works wonderfully, thanks! Once that hits master as well, I'm happy to commit a few test cases for server into tests_gdbus.py; with that we can replace the external notification-daemon test case with an internal synthetic one.