Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FusedFunctionObject half-initialized during GC tracking #3215

Open
achernomorov opened this issue Oct 28, 2019 · 0 comments

Comments

@achernomorov
Copy link

@achernomorov achernomorov commented Oct 28, 2019

There are new CPython behavior about GC tracking of half initialized objects https://bugs.python.org/issue38392.

FusedFunctionObject is about to be in half-initialized state then base CyFunctionObject "constructor" calls GC_Track.

So...

../Modules/gcmodule.c:2019: visit_validate: Assertion failed: PyObject_GC_Track() object is not valid
Enable tracemalloc to get the memory block allocation traceback

object address : 0x7fcc7c1109b0
object refcount : 1
object type : 0x7fcc6a4c1660
object type name: fused_cython_function
object repr : <cyfunction get_nonzero_line at 0x7fcc7c1109b0>

Fatal Python error: _PyObject_AssertFailed
Python runtime state: initialized


Reproduce

Env
python 3.9 ( latest from github)
./configure --with-pydebug --enable-profiling
Python need to be build with PY_DEBUG - issue38392 is new functionality so it under PY_DEBUG for now.

Code

import scipy.ndimage._ni_label

achernomorov added a commit to achernomorov/cython that referenced this issue Oct 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.