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 647016 - take GIL in _pygi_invoke_closure_free ?
take GIL in _pygi_invoke_closure_free ?
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-07 11:05 UTC by Jonathan Matthew
Modified: 2011-08-13 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ensure GIL state in _pygi_invoke_closure_free (1019 bytes, patch)
2011-04-07 11:07 UTC, Jonathan Matthew
none Details | Review

Description Jonathan Matthew 2011-04-07 11:05:24 UTC
Freeing an object reference that was stored as a data item on a GObject, I get this abort:

  • #0 raise
    from /lib64/libc.so.6
  • #1 abort
    from /lib64/libc.so.6
  • #2 Py_FatalError
    at /usr/src/debug/Python-2.7/Python/pythonrun.c line 1678
  • #3 PyEval_SaveThread
    at /usr/src/debug/Python-2.7/Python/ceval.c line 344
  • #4 pygobject_clear
    at pygobject.c line 1126
  • #5 pygobject_dealloc
    at pygobject.c line 1037
  • #6 subtype_dealloc
    at /usr/src/debug/Python-2.7/Objects/typeobject.c line 1002
  • #7 _pygi_invoke_closure_free
    at pygi-closure.c line 406
  • #8 ffi_closure_unix64_inner
    at src/x86/ffi64.c line 620
  • #9 ffi_closure_unix64
    at src/x86/unix64.S line 228
  • #10 g_data_set_internal
    at gdataset.c line 351
  • #11 g_datalist_id_set_data_full
    at gdataset.c line 598

with this message: Fatal Python error: PyEval_SaveThread: NULL tstate

adding PyGILState_Ensure / PyGILState_Release in _pygi_invoke_closure_free fixes this.
Comment 1 Jonathan Matthew 2011-04-07 11:07:16 UTC
Created attachment 185408 [details] [review]
ensure GIL state in _pygi_invoke_closure_free