https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: dev-python/guppy3-3.1.3 fails tests. Discovered on: amd64 (internal ref: guru_ci)
Created attachment 862178 [details] build.log build log and emerge --info
Error(s) that match a know pattern: /var/tmp/portage/dev-python/guppy3-3.1.3/work/guppy3-3.1.3-python3_10/install/usr/lib/python3.10/site-packages/guppy/gsl/../../specs/docexample.gsl does not exist, skipping test /var/tmp/portage/dev-python/guppy3-3.1.3/work/guppy3-3.1.3-python3_11/install/usr/lib/python3.11/site-packages/guppy/gsl/../../specs/docexample.gsl does not exist, skipping test test_classification (guppy.heapy.test.test_Classifiers.ClassificationCase.test_classification) ... python3.11: src/heapy/nodegraph.c:152: NyNodeGraph_AddEdge: Assertion `Py_REFCNT(tgt) < 0xa000000 && (Py_uintptr_t)Py_TYPE(tgt) > 0x1000' failed.
The error is: > python3.11: src/heapy/nodegraph.c:152: NyNodeGraph_AddEdge: Assertion `Py_REFCNT(tgt) < 0xa000000 && (Py_uintptr_t)Py_TYPE(tgt) > 0x1000' failed. This has never been reproduced upstream and shouldn't happen in theory. Is there a way I can maybe get a core dump?
I suspected installing both python 3.10 and 3.11 would cause some sort of conflict leading to this, so I tried that and still could not reproduce.
Was able to reproduce by adding USE=debug on guppy3, and only Python 3.11 is needed.
Root cause is https://github.com/python/cpython/commit/121f1f893a39d0b58d3d2b5597505c154ecaac2a `.ob_refcnt = 999999999` This number is 0x3b9ac9ff, which happens to be larger than the assertion 0xa000000 (7 digits, instead of 8) in: NyNodeGraph_AddEdge: assert(Py_REFCNT(src) < 0xa000000 && (Py_uintptr_t)Py_TYPE(src) > 0x1000); assert(Py_REFCNT(tgt) < 0xa000000 && (Py_uintptr_t)Py_TYPE(tgt) > 0x1000);
Addressed upstream: https://github.com/zhuyifei1999/guppy3/commit/71f3455f73eedef78ccf79c17ed5adbb36d11eeb And in GURU: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?h=dev&id=1c62f2e44056fd5e741cdff56e3983352b2a668c
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1c62f2e44056fd5e741cdff56e3983352b2a668c commit 1c62f2e44056fd5e741cdff56e3983352b2a668c Author: YiFei Zhu <zhuyifei1999@gmail.com> AuthorDate: 2023-05-22 23:12:54 +0000 Commit: YiFei Zhu <zhuyifei1999@gmail.com> CommitDate: 2023-05-22 23:14:35 +0000 dev-python/guppy3: Fix assertion on USE=debug Applied patch upstream. Closes: https://bugs.gentoo.org/906937 Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com> .../files/guppy3-3.1.3-py311-refcount-assert.patch | 44 ++++++++++++++++++++++ ...{guppy3-3.1.3.ebuild => guppy3-3.1.3-r1.ebuild} | 4 ++ 2 files changed, 48 insertions(+)