Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917693 - dev-python/pypy3_10-exe-7.3.13_p2 broken : RecursionError: maximum recursion depth exceeded
Summary: dev-python/pypy3_10-exe-7.3.13_p2 broken : RecursionError: maximum recursion...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-21 22:46 UTC by Alfred Wingate
Modified: 2023-11-22 09:28 UTC (History)
1 user (show)

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


Attachments
emerge --info (emerge--info.txt,21.92 KB, text/plain)
2023-11-21 22:47 UTC, Alfred Wingate
Details
dev-python/pypy3_10-exe-7.3.13_p2 successful build.log (xz compressed) (pypy3_10-exe-7.3.13_p2:20231121-205453.log.xz,23.22 KB, application/x-xz)
2023-11-21 22:48 UTC, Alfred Wingate
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alfred Wingate 2023-11-21 22:46:42 UTC
Invoking emerge or anything with pypy3 is completely broken with the new patches.

$ emerge --info
Traceback (most recent call last):
  File "/usr/lib/python-exec/pypy3/emerge", line 44, in <module>
    import portage
  File "/usr/lib/pypy3.10/site-packages/portage/__init__.py", line 12, in <module>
    import asyncio
  File "/usr/lib/pypy3.10/asyncio/__init__.py", line 8, in <module>
    from .base_events import *
  File "/usr/lib/pypy3.10/asyncio/base_events.py", line 18, in <module>
    import concurrent.futures
  File "/usr/lib/pypy3.10/concurrent/futures/__init__.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
  File "/usr/lib/pypy3.10/concurrent/futures/_base.py", line 7, in <module>
    import logging
  File "/usr/lib/pypy3.10/logging/__init__.py", line 26, in <module>
    import sys, os, time, io, re, traceback, warnings, weakref, collections.abc
  File "/usr/lib/pypy3.10/re.py", line 125, in <module>
    import sre_compile
  File "/usr/lib/pypy3.10/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/pypy3.10/sre_parse.py", line 15, in <module>
    from sre_constants import *
RecursionError: maximum recursion depth exceeded

$ pypy3.10 --version
Python 3.10.13 (f1607341da97ff5a1e93430b6e8c4af0ad1aa019, Nov 21 2023, 21:02:02)
[PyPy 7.3.13 with GCC 13.2.1 20231014]

Other cli tools or building python packages with pypy3 targets all get this failure.
Comment 1 Alfred Wingate 2023-11-21 22:47:15 UTC
Created attachment 875312 [details]
emerge --info
Comment 2 Alfred Wingate 2023-11-21 22:48:42 UTC
Created attachment 875313 [details]
dev-python/pypy3_10-exe-7.3.13_p2 successful build.log (xz compressed)
Comment 3 Alfred Wingate 2023-11-21 23:25:16 UTC
This appears to be more complex. Downgraded to dev-python/pypy3_10-exe-7.3.13 and the same issues persisted. Tried dev-python/pypy3_10-exe-bin-7.3.13_p2 and it works. Making me think that this is something wrong in my env to miscompile pypy3_10-exe. Will try to see if it this occurs again.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-21 23:47:22 UTC
This looks familiar, and not just from e.g. bug 782889.

Maybe I'm thinking of https://foss.heptapod.net/pypy/pypy/-/issues/3869?
Comment 5 Alfred Wingate 2023-11-21 23:55:50 UTC
Currently wondering what else would've changed in between.

Built dev-python/pypy3_10-exe-7.3.13 with dev-python/pypy3_10-exe-bin-7.3.13_p2 and its the same result. 

Below is the process where pypy3_10-exe was upgraded initially, leading to the failure in the next emerge.

>>> Emerging (1 of 23) dev-python/ensurepip-setuptools-69.0.1::gentoo
>>> Installing (1 of 23) dev-python/ensurepip-setuptools-69.0.1::gentoo
>>> Completed (1 of 23) dev-python/ensurepip-setuptools-69.0.1::gentoo
>>> Emerging (2 of 23) net-p2p/syncthing-1.26.1::gentoo
>>> Emerging (3 of 23) dev-python/pypy3_10-exe-7.3.13_p2::gentoo
>>> Installing (2 of 23) net-p2p/syncthing-1.26.1::gentoo
>>> Completed (2 of 23) net-p2p/syncthing-1.26.1::gentoo
>>> Installing (3 of 23) dev-python/pypy3_10-exe-7.3.13_p2::gentoo
>>> Completed (3 of 23) dev-python/pypy3_10-exe-7.3.13_p2::gentoo
>>> Emerging (4 of 23) app-eselect/eselect-pinentry-0.7.3::gentoo
>>> Failed to emerge app-eselect/eselect-pinentry-0.7.3, Log file:
>>>  '/var/log/portage/build/app-eselect/eselect-pinentry-0.7.3:20231121-212119.log.gz'
>>> Jobs: 3 of 23 complete, 1 failed                Load avg: 8.24, 6.66, 5.45
 * Package:    app-eselect/eselect-pinentry-0.7.3:0
 * Repository: gentoo
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work
>>> Preparing source in /var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work ...
>>> Source compiled.
>>> Test phase [not enabled]: app-eselect/eselect-pinentry-0.7.3

>>> Install app-eselect/eselect-pinentry-0.7.3 into /var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/image
Traceback (most recent call last):
  File "/usr/lib/portage/pypy3/doins.py", line 26, in <module>
    from portage.util import movefile
  File "/usr/lib/pypy3.10/site-packages/portage/__init__.py", line 12, in <module>
    import asyncio
  File "/usr/lib/pypy3.10/asyncio/__init__.py", line 8, in <module>
    from .base_events import *
  File "/usr/lib/pypy3.10/asyncio/base_events.py", line 34, in <module>
    import ssl
  File "/usr/lib/pypy3.10/ssl.py", line 99, in <module>
    import _ssl             # if we can't import it, let the error propagate
    ^^^^^^^^^^^
  File "/usr/lib/pypy3.10/_ssl/__init__.py", line 1, in <module>
    from _cffi_ssl._stdssl import (
  File "/usr/lib/pypy3.10/_cffi_ssl/_stdssl/__init__.py", line 2, in <module>
    import pathlib
  File "/usr/lib/pypy3.10/pathlib.py", line 14, in <module>
    from urllib.parse import quote_from_bytes as urlquote_from_bytes
  File "/usr/lib/pypy3.10/urllib/parse.py", line 255, in <module>
    _DefragResultBase = namedtuple('DefragResult', 'url fragment')
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/pypy3.10/collections/__init__.py", line 465, in namedtuple
    exec(code, namespace)
RecursionError: maximum recursion depth exceeded
 * ERROR: app-eselect/eselect-pinentry-0.7.3::gentoo failed (install phase):
 *   doins failed
 * 
 * If you need support, post the output of `emerge --info '=app-eselect/eselect-pinentry-0.7.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-eselect/eselect-pinentry-0.7.3::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/app-eselect/eselect-pinentry-0.7.3:20231121-212119.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work'
 * S: '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work'
 * ERROR: app-eselect/eselect-pinentry-0.7.3::gentoo failed (install phase):
 *   newins failed
 * 
 * If you need support, post the output of `emerge --info '=app-eselect/eselect-pinentry-0.7.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-eselect/eselect-pinentry-0.7.3::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/app-eselect/eselect-pinentry-0.7.3:20231121-212119.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work'
 * S: '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work'

 * Messages for package dev-python/pypy3_10-exe-7.3.13_p2:
 * Log file: /var/log/portage/build/dev-python/pypy3_10-exe-7.3.13_p2:20231121-205453.log.gz

 * CMP: =dev-python/pypy3_10-exe-7.3.13 with dev-python/pypy3_10-exe-7.3.13_p2/image
 *   SIZE: 329.36MiB -> 283.42MiB, 6 -> 6 files
 * ------> SIZE(-13.95%)
 * VDB: detected possibly incorrect RDEPEND (dev-python/pypy3_10-exe-7.3.13_p2)
 * dev-libs/expat:= | dev-libs/expat

 * Messages for package app-eselect/eselect-pinentry-0.7.3:
 * Log file: /var/log/portage/build/app-eselect/eselect-pinentry-0.7.3:20231121-212119.log.gz

 * ERROR: app-eselect/eselect-pinentry-0.7.3::gentoo failed (install phase):
 *   doins failed
 * 
 * If you need support, post the output of `emerge --info '=app-eselect/eselect-pinentry-0.7.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-eselect/eselect-pinentry-0.7.3::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/app-eselect/eselect-pinentry-0.7.3:20231121-212119.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work'
 * S: '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work'
 * ERROR: app-eselect/eselect-pinentry-0.7.3::gentoo failed (install phase):
 *   newins failed
 * 
 * If you need support, post the output of `emerge --info '=app-eselect/eselect-pinentry-0.7.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-eselect/eselect-pinentry-0.7.3::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/app-eselect/eselect-pinentry-0.7.3:20231121-212119.log.gz'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work'
 * S: '/var/tmp/portage/app-eselect/eselect-pinentry-0.7.3/work'
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-11-22 07:17:46 UTC
Yes, it's really weird.  Could you start by searching for orphan files?

My test container has lots of random Python packages installed and pypy3-exe built and worked fine there yesterday, so I don't think any installed package would be causing that.

I'll try diffing your build log with mine.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-11-22 07:31:43 UTC
Well, the only difference I can see is CFLAGS.  Could you try with -O2?
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-22 09:28:42 UTC
I can't reproduce this either:
```
$ EPYTHON=pypy3 emerge --info
Portage 3.0.55_p20_p1700644110 (python 3.10.13-final-0, default/linux/amd64/17.1/hardened, gcc-14, glibc-2.38-r7, 6.6.2 x86_64)
=================================================================                                                                                                                                               System uname: Linux-6.6.2-x86_64-AMD_Ryzen_9_3950X_16-Core_Processor-with-glibc2.38
KiB Mem:    65758032 total,  12294188 free                                                                                                                                                                      KiB Swap:   16662520 total,  15783672 free
Timestamp of repository gentoo: Wed, 22 Nov 2023 08:49:27 +0000
Head commit of repository gentoo: 490bb66dc8dbf09e6df1d0696687b385af8b0238                                                                                                                                                                                                                                                                                                                                                      Timestamp of repository kde: Tue, 21 Nov 2023 21:03:33 +0000
Head commit of repository kde: 143a61e8b8789e425ad22b9f22a67fb501183219

Timestamp of repository qt: Tue, 21 Nov 2023 21:03:24 +0000
Head commit of repository qt: b2d216add0631fa1974cb817036e359c30843132

Timestamp of repository sam_c: Tue, 21 Nov 2023 21:03:38 +0000
Head commit of repository sam_c: 825751d17304603dd900cc0dfe2c9e405b562c31

Timestamp of repository steam-overlay: Tue, 21 Nov 2023 21:03:25 +0000
Head commit of repository steam-overlay: 8cc3e460d5bbdd0adc4613ca149699a54f8115bd
[...]
```

```
$ pypy3 -V
Python 3.10.13 (f1607341da97ff5a1e93430b6e8c4af0ad1aa019, Nov 22 2023, 08:58:24)
[PyPy 7.3.13 with GCC 14.0.0 20231121 (experimental) a0240662b22312ffb3e3fefb85f258ab0e7010f4]
```