Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906937 - [guru] dev-python/guppy3-3.1.3 fails tests
Summary: [guru] dev-python/guppy3-3.1.3 fails tests
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: YiFei Zhu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-22 10:06 UTC by Agostino Sarubbo
Modified: 2023-05-25 02:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,123.87 KB, text/plain)
2023-05-22 10:06 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-05-22 10:06:52 UTC
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)
Comment 1 Agostino Sarubbo gentoo-dev 2023-05-22 10:06:55 UTC
Created attachment 862178 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-05-22 10:06:55 UTC
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.
Comment 3 YiFei Zhu 2023-05-22 17:02:38 UTC
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?
Comment 4 YiFei Zhu 2023-05-22 17:46:52 UTC
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.
Comment 5 YiFei Zhu 2023-05-22 22:23:49 UTC
Was able to reproduce by adding USE=debug on guppy3, and only Python 3.11 is needed.
Comment 6 YiFei Zhu 2023-05-22 22:42:17 UTC
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);
Comment 8 Larry the Git Cow gentoo-dev 2023-05-25 02:21:00 UTC
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(+)