Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 849311 - dev-lang/python-3.11.0_beta3: crashes (segfaults) during src_install
Summary: dev-lang/python-3.11.0_beta3: crashes (segfaults) during src_install
Status: RESOLVED FIXED
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: 2022-06-02 08:37 UTC by Sam James
Modified: 2022-06-03 06:45 UTC (History)
1 user (show)

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


Attachments
build.log.xz (build.log.xz,43.61 KB, application/x-xz)
2022-06-02 08:38 UTC, Sam James
Details
portage-3.0.30-r5.ebuild (w/ python3_11 changes) (file_849311.txt,9.21 KB, text/plain)
2022-06-02 08:41 UTC, Sam James
Details
doins backtrace (file_849311.txt,26.28 KB, text/plain)
2022-06-02 08:59 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 08:37:39 UTC
I guess at this point it's still using the old Python, i.e. 3.11.0_beta2_p1.

I've got Portage built w/ python3_11 by just making a trivial change in a local overlay.

----

rm /var/tmp/portage/dev-lang/python-3.11.0_beta3/image/usr/lib/python3.11/lib-dynload/_sysconfigdata__linux_x86_64-linux-gnu.py
rm -r /var/tmp/portage/dev-lang/python-3.11.0_beta3/image/usr/lib/python3.11/lib-dynload/__pycache__
Creating directory /usr/share/man
Creating directory /usr/share/man/man1
/usr/lib/portage/python3.11/ebuild-helpers/xattr/install -c -m 644 ./Misc/python.man \
	/var/tmp/portage/dev-lang/python-3.11.0_beta3/image/usr/share/man/man1/python3.11.1
if test "xno" != "xno"  ; then \
	case no in \
		upgrade) ensurepip="--altinstall --upgrade" ;; \
		install|*) ensurepip="--altinstall" ;; \
	esac; \
	LD_LIBRARY_PATH=/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3 ./python -E -m ensurepip \
		$ensurepip --root=/var/tmp/portage/dev-lang/python-3.11.0_beta3/image/ ; \
fi
/usr/lib/portage/python3.11/ebuild-helpers/doins: line 98:  6036 Segmentation fault      (core dumped) PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}} "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/doins.py "${DOINS_ARGS[@]}" -- "$@"
 * ERROR: dev-lang/python-3.11.0_beta3::gentoo failed (install phase):
 *   doins failed
 * 
 * If you need support, post the output of `emerge --info '=dev-lang/python-3.11.0_beta3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-lang/python-3.11.0_beta3::gentoo'`.
 * The complete build log is located at '/var/log/portage/build/dev-lang/python-3.11.0_beta3:20220602-083412.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-lang/python-3.11.0_beta3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-lang/python-3.11.0_beta3/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3'
 * S: '/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3'
/usr/lib/portage/python3.11/isolated-functions.sh: line 118:  6078 Segmentation fault      (core dumped) "$PORTAGE_BIN_PATH"/ebuild-ipc exit 1
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 08:38:20 UTC
Portage 3.0.30 (python 3.11.0-beta-2, default/linux/amd64/17.1/hardened, gcc-12.1.1, glibc-2.35-r6, 5.15.44-gentoo-dist-hardened x86_64)
=================================================================
System uname: Linux-5.15.44-gentoo-dist-hardened-x86_64-AMD_Ryzen_9_3950X_16-Core_Processor-with-glibc2.35
KiB Mem:    65831312 total,  15181436 free
KiB Swap:   25067512 total,  24955128 free
Timestamp of repository gentoo: Thu, 02 Jun 2022 08:18:09 +0000
Head commit of repository gentoo: 240c095a4a67af310853d9b5fcd8e76034aed3e1

Timestamp of repository kde: Wed, 01 Jun 2022 11:22:55 +0000
Head commit of repository kde: 24e83eb57010a97fa341741c7e854965e5200e6a

Timestamp of repository qt: Wed, 25 May 2022 22:18:01 +0000
Head commit of repository qt: 5903c1a011066bac30d4ab508b9c8079eea969b4

Timestamp of repository sam_c: Thu, 02 Jun 2022 07:47:56 +0000
Head commit of repository sam_c: ff51384f8b1a987380e9e2a1e2d4140256c5b2c2

Timestamp of repository steam-overlay: Sun, 22 May 2022 13:08:27 +0000
Head commit of repository steam-overlay: ee8335c18481d2f553de3f4ee3320d76cc8905fb

sh dash 0.5.11.5
ld GNU ld (Gentoo 2.38 p4) 2.38
ccache version 4.6.1 [disabled]
app-misc/pax-utils:        1.3.4::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0::gentoo
dev-lang/python:           2.7.18_p15::gentoo, 3.8.13_p2::gentoo, 3.9.13::gentoo, 3.10.4_p1::gentoo, 3.11.0_beta2_p1::gentoo
dev-lang/rust-bin:         1.61.0::gentoo
dev-util/ccache:           4.6.1::gentoo
dev-util/cmake:            3.23.2::gentoo
dev-util/meson:            0.62.1::gentoo
sys-apps/baselayout:       2.8::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-apps/systemd:          251.1::gentoo
sys-devel/autoconf:        2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           13.0.1::gentoo, 14.0.4::gentoo
sys-devel/gcc:             11.3.1_p20220527::gentoo, 12.1.1_p20220528-r1::sam_c
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.4::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.4::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.18::gentoo (virtual/os-headers)
sys-libs/glibc:            2.35-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000
    sync-git-clone-extra-opts: -b stable -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 -c gc.rerereunresolved=0 -c gc.pruneExpire=now
    sync-git-verify-commit-signature: yes

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo

qt
    location: /var/db/repos/qt
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/qt.git
    masters: gentoo

sam_c
    location: /var/db/repos/sam_c
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/sam_c.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

test
    location: /var/db/repos/test
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -D_GLIBCXX_ASSERTIONS"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --complete-graph --deep --dynamic-deps=n --changed-deps=n --usepkg-exclude sys-fs/zfs --usepkg-exclude sys-fs/zfs-kmod --usepkg=y --implicit-system-deps=n --jobs=2 --load-average 32"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live cgroup clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox mount-sandbox multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches"
GENTOO_MIRRORS="http://mirror.bytemark.co.uk/gentoo/ http://www.mirrorservice.org/sites/distfiles.gentoo.org/ http://mirrors.soeasyto.com/distfiles.gentoo.org/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
LINGUAS="en en_GB"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="PIC X a52 aac acl acpi activities aes alsa amd64 avx avx2 bash-completion bluetooth branding bzip2 cairo caps cdda cdr clang crypt dbus declarative dist-kernel dri dts dvd dvdr emacs encode exif f16c filecaps firewalld flac fma3 freetype gif gmp gpm graphite gtk gui hardened harfbuzz hunspell iconv icu ipv6 jit jpeg kde kdesu kwallet lcms libglvnd libnotify libtirpc llvm-libunwind mad mmx mmxext mng mp3 mp4 mpeg multilib ncurses nftables nls nptl ogg opengl openmp pam pango pclmul pcre pdf pgo pie pipewire plasma png policykit popcnt ppds pulseaudio qml qt5 rdrand readline screencast sdl seccomp semantic-desktop sha spell sse sse2 sse3 sse4_1 sse4_2 sse4a ssl ssp ssse3 startup-notification svg system-av1 system-binutils system-boost system-bootstrap system-cairo system-clang system-digest system-ffmpeg system-harfbuzz system-heimdal system-icu system-jpeg system-leveldb system-libevent system-libs system-libvpx system-libyaml system-lz4 system-mitkrb5 system-sqlite system-ssl system-tbb system-uulib system-webp system-zlib systemd threads tiff truetype udev udisks unicode upower usb verify-sig vorbis vulkan wayland widgets x264 xattr xcb xml xtpax xv xvid zfs zlib zsh-completion" ABI_X86="32 64" ADA_TARGET="gnat_2020" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AArch64 AMDGPU ARM AVR BPF Hexagon Lanai MSP430 Mips NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_9 pypy3 python3_10 python3_11 python3_8" QEMU_USER_TARGETS="aarch64 hppa ppc64le sparc64" RUBY_TARGETS="ruby31" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 08:38:49 UTC
Created attachment 782276 [details]
build.log.xz
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 08:39:29 UTC
Core was generated by `/usr/bin/python3.11 /usr/lib/portage/python3.11/ebuild-ipc.py exit 1'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  PyObject_Hash (v=0x7fe138c817c0 <_PyRuntime+36064>) at Objects/object.c:775
775         if (tp->tp_hash != NULL)
gef➤  bt
#0  PyObject_Hash (v=0x7fe138c817c0 <_PyRuntime+36064>) at Objects/object.c:775
#1  0x00007fe1388ecec0 in PyDict_GetItemWithError (op=0x7fe1380c0e40, key=key@entry=0x7fe138c817c0 <_PyRuntime+36064>) at Objects/dictobject.c:1783
#2  0x00007fe1389903fb in _PyEval_GetBuiltin (name=0x7fe138c817c0 <_PyRuntime+36064>) at Python/ceval.c:7122
#3  0x00007fe137d7dff9 in _Pickle_InitState (st=0x7fe137e74490) at /usr/src/debug/dev-lang/python-3.11.0_beta2_p1/Python-3.11.0b2/Modules/_pickle.c:238
#4  PyInit__pickle () at /usr/src/debug/dev-lang/python-3.11.0_beta2_p1/Python-3.11.0b2/Modules/_pickle.c:7984
#5  0x00007fe1389b922e in _PyImport_LoadDynamicModuleWithSpec (spec=spec@entry=0x7fe137e7f290, fp=fp@entry=0x0) at ./Python/importdl.c:169
#6  0x00007fe1389b63c5 in _imp_create_dynamic_impl (module=<optimized out>, file=<optimized out>, spec=0x7fe137e7f290) at Python/import.c:2384
#7  _imp_create_dynamic (module=<optimized out>, args=<optimized out>, nargs=<optimized out>) at Python/clinic/import.c.h:446
#8  0x00007fe1388f948e in cfunction_vectorcall_FASTCALL (func=0x7fe1380be4d0, args=0x7fe137e699a8, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/methodobject.c:427
#9  0x00007fe13885f108 in _PyEval_EvalFrameDefault (tstate=0x7fe138c817c0 <_PyRuntime+36064>, frame=0x7fe137fca718, throwflag=0x38ca1438) at Python/ceval.c:5378
#10 0x00007fe13898fa20 in _PyEval_EvalFrame (throwflag=0x0, frame=0x7fe137fca430, tstate=0x7fe138ca1438 <_PyRuntime+166232>) at ./Include/internal/pycore_ceval.h:72
#11 _PyEval_Vector (tstate=0x7fe138ca1438 <_PyRuntime+166232>, func=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at Python/ceval.c:6421
#12 0x00007fe1388b5cf5 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=0x2, args=0x7ffcd47d7640, callable=0x7fe13807fce0, tstate=0x7fe138ca1438 <_PyRuntime+166232>) at ./Include/internal/pycore_call.h:92
#13 object_vacall (tstate=tstate@entry=0x7fe138ca1438 <_PyRuntime+166232>, base=base@entry=0x0, callable=0x7fe13807fce0, vargs=vargs@entry=0x7ffcd47d76d0) at Objects/call.c:819
#14 0x00007fe1388b5f04 in PyObject_CallMethodObjArgs (obj=0x0, name=<optimized out>) at Objects/call.c:879
#15 0x00007fe1389b8199 in import_find_and_load (abs_name=0x7fe137f85530, tstate=0x7fe138ca1438 <_PyRuntime+166232>) at Python/import.c:1735
#16 PyImport_ImportModuleLevelObject (name=0x7fe137f85530, globals=<optimized out>, locals=<optimized out>, fromlist=0x7fe137e2b130, level=0x0) at Python/import.c:1834
#17 0x00007fe138862ac4 in import_name (level=<optimized out>, fromlist=<optimized out>, name=<optimized out>, frame=<optimized out>, tstate=<optimized out>) at Python/ceval.c:7390
#18 _PyEval_EvalFrameDefault (tstate=0x7fe138c817c0 <_PyRuntime+36064>, frame=0x7fe137fca3b8, throwflag=0x38ca1438) at Python/ceval.c:3951
#19 0x00007fe13898fa20 in _PyEval_EvalFrame (throwflag=0x0, frame=0x7fe137fca3b8, tstate=0x7fe138ca1438 <_PyRuntime+166232>) at ./Include/internal/pycore_ceval.h:72
#20 _PyEval_Vector (tstate=tstate@entry=0x7fe138ca1438 <_PyRuntime+166232>, func=func@entry=0x7fe137e65300, locals=locals@entry=0x7fe137f6f740, args=args@entry=0x0, argcount=argcount@entry=0x0, kwnames=kwnames@entry=0x0) at Python/ceval.c:6421
#21 0x00007fe13898fae1 in PyEval_EvalCode (co=co@entry=0x559f3018ced0, globals=globals@entry=0x7fe137f6f740, locals=locals@entry=0x7fe137f6f740) at Python/ceval.c:1155
#22 0x00007fe138987cb0 in builtin_exec_impl (module=<optimized out>, closure=<optimized out>, locals=0x7fe137f6f740, globals=0x7fe137f6f740, source=0x559f3018ced0) at Python/bltinmodule.c:1075
#23 builtin_exec (module=<optimized out>, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Python/clinic/bltinmodule.c.h:465
#24 0x00007fe1388f8db6 in cfunction_vectorcall_FASTCALL_KEYWORDS (func=0x7fe1380bcc20, args=0x7fe137e51498, nargsf=<optimized out>, kwnames=<optimized out>) at Objects/methodobject.c:443
#25 0x00007fe13885f108 in _PyEval_EvalFrameDefault (tstate=0x7fe138c817c0 <_PyRuntime+36064>, frame=0x7fe137fca330, throwflag=0x38ca1438) at Python/ceval.c:5378
#26 0x00007fe13898fa20 in _PyEval_EvalFrame (throwflag=0x0, frame=0x7fe137fca0c0, tstate=0x7fe138ca1438 <_PyRuntime+166232>) at ./Include/internal/pycore_ceval.h:72
#27 _PyEval_Vector (tstate=0x7fe138ca1438 <_PyRuntime+166232>, func=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=<optimized out>) at Python/ceval.c:6421
#28 0x00007fe1388b5cf5 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=0x2, args=0x7ffcd47d7ce0, callable=0x7fe13807fce0, tstate=0x7fe138ca1438 <_PyRuntime+166232>) at ./Include/internal/pycore_call.h:92
#29 object_vacall (tstate=tstate@entry=0x7fe138ca1438 <_PyRuntime+166232>, base=base@entry=0x0, callable=0x7fe13807fce0, vargs=vargs@entry=0x7ffcd47d7d70) at Objects/call.c:819
#30 0x00007fe1388b5f04 in PyObject_CallMethodObjArgs (obj=0x0, name=<optimized out>) at Objects/call.c:879
#31 0x00007fe1389b8199 in import_find_and_load (abs_name=0x7fe137ee52f0, tstate=0x7fe138ca1438 <_PyRuntime+166232>) at Python/import.c:1735
#32 PyImport_ImportModuleLevelObject (name=0x7fe137ee52f0, globals=<optimized out>, locals=<optimized out>, fromlist=0x7fe138b8b040 <_Py_NoneStruct>, level=0x0) at Python/import.c:1834
#33 0x00007fe138862ac4 in import_name (level=<optimized out>, fromlist=<optimized out>, name=<optimized out>, frame=<optimized out>, tstate=<optimized out>) at Python/ceval.c:7390
#34 _PyEval_EvalFrameDefault (tstate=0x7fe138c817c0 <_PyRuntime+36064>, frame=0x7fe137fca020, throwflag=0x38ca1438) at Python/ceval.c:3951
#35 0x00007fe13898fa20 in _PyEval_EvalFrame (throwflag=0x0, frame=0x7fe137fca020, tstate=0x7fe138ca1438 <_PyRuntime+166232>) at ./Include/internal/pycore_ceval.h:72
#36 _PyEval_Vector (tstate=tstate@entry=0x7fe138ca1438 <_PyRuntime+166232>, func=func@entry=0x7fe1380c84a0, locals=locals@entry=0x7fe13812ff40, args=args@entry=0x0, argcount=argcount@entry=0x0, kwnames=kwnames@entry=0x0) at Python/ceval.c:6421
#37 0x00007fe13898fae1 in PyEval_EvalCode (co=co@entry=0x559f30087a30, globals=globals@entry=0x7fe13812ff40, locals=locals@entry=0x7fe13812ff40) at Python/ceval.c:1155
#38 0x00007fe1389d22a3 in run_eval_code_obj (tstate=tstate@entry=0x7fe138ca1438 <_PyRuntime+166232>, co=co@entry=0x559f30087a30, globals=globals@entry=0x7fe13812ff40, locals=locals@entry=0x7fe13812ff40) at Python/pythonrun.c:1714
#39 0x00007fe1389d24c6 in run_mod (mod=mod@entry=0x559f3010d0b0, filename=filename@entry=0x7fe137ef96b0, globals=globals@entry=0x7fe13812ff40, locals=locals@entry=0x7fe13812ff40, flags=flags@entry=0x7ffcd47d8298, arena=arena@entry=0x7fe138049bf0) at Python/pythonrun.c:1735
#40 0x00007fe1389d25a0 in pyrun_file (fp=fp@entry=0x559f300457c0, filename=filename@entry=0x7fe137ef96b0, start=start@entry=0x101, globals=globals@entry=0x7fe13812ff40, locals=locals@entry=0x7fe13812ff40, closeit=closeit@entry=0x1, flags=0x7ffcd47d8298) at Python/pythonrun.c:1630
#41 0x00007fe1389d505d in _PyRun_SimpleFileObject (fp=fp@entry=0x559f300457c0, filename=filename@entry=0x7fe137ef96b0, closeit=closeit@entry=0x1, flags=flags@entry=0x7ffcd47d8298) at Python/pythonrun.c:440
#42 0x00007fe1389d5604 in _PyRun_AnyFileObject (fp=0x559f300457c0, filename=filename@entry=0x7fe137ef96b0, closeit=closeit@entry=0x1, flags=flags@entry=0x7ffcd47d8298) at Python/pythonrun.c:79
#43 0x00007fe1389f2f50 in pymain_run_file_obj (skip_source_first_line=0x0, filename=0x7fe137ef96b0, program_name=0x7fe137ed0b20) at Modules/main.c:360
#44 pymain_run_file (config=0x7fe138c87490 <_PyRuntime+59824>) at Modules/main.c:379
#45 pymain_run_python (exitcode=0x7ffcd47d8290) at Modules/main.c:601
#46 Py_RunMain () at Modules/main.c:680
#47 0x00007fe1389f352e in pymain_main (args=0x7ffcd47d83b0) at Modules/main.c:710
#48 Py_BytesMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:734
#49 0x00007fe13857f2d0 in ?? () from /usr/lib64/libc.so.6
#50 0x00007fe13857f389 in __libc_start_main () from /usr/lib64/libc.so.6
#51 0x0000559f2e28e085 in _start ()
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 08:41:10 UTC
Created attachment 782279 [details]
portage-3.0.30-r5.ebuild (w/ python3_11 changes)

For completeness, attached the Portage ebuild I'm using. diff:
```
$ diff -ruN ~/g/sys-apps/portage/portage-3.0.30-r5.ebuild portage-3.0.30-r5.ebuild
--- /home/sam/g/sys-apps/portage/portage-3.0.30-r5.ebuild       2022-05-15 04:15:38.694340619 +0100
+++ portage-3.0.30-r5.ebuild    2022-06-02 02:51:06.746423172 +0100
@@ -3,7 +3,7 @@

 EAPI=7

-PYTHON_COMPAT=( pypy3 python3_{8..10} )
+PYTHON_COMPAT=( pypy3 python3_{8..11} )
 PYTHON_REQ_USE='bzip2(+),threads(+)'
 TMPFILES_OPTIONAL=1

@@ -56,7 +56,11 @@
        elibc_musl? ( >=sys-apps/sandbox-2.2 )
        kernel_linux? ( sys-apps/util-linux )
        >=app-misc/pax-utils-0.1.17
-       selinux? ( >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}] )
+       selinux? (
+               $(python_gen_cond_dep '
+                       >=sys-libs/libselinux-2.0.94[python,${PYTHON_USEDEP}]
+               ' python3_{8..10} )
+       )
        xattr? ( kernel_linux? (
                >=sys-apps/install-xattr-0.3
        ) )
@@ -83,6 +87,12 @@
        check_extra_config
 }

+pkg_setup() {
+       if use selinux && use python_targets_python3_11 ; then
+               die "py3.11 not yet supported by libselinux!"
+       fi
+}
+
 python_prepare_all() {
        local PATCHES=(
                "${FILESDIR}/3.0.30-revert-default-enable-soname-dependencies.patch"
```
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 08:59:52 UTC
Created attachment 782282 [details]
doins backtrace
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 09:14:34 UTC
/var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3 # ./python -c 'from portage.util import movefile'
Bus error (core dumped)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 09:16:04 UTC
(In reply to Sam James from comment #6)
> /var/tmp/portage/dev-lang/python-3.11.0_beta3/work/Python-3.11.0b3 #
> ./python -c 'from portage.util import movefile'
> Bus error (core dumped)

Not weird C-extension specific:

# ./python -c 'from sphinx import search'
Bus error (core dumped)
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 11:49:58 UTC
Could you check if _beta2_p1 is affected?  Perhaps build locally and try bisecting — there are only a few commits between the two betas, and only two that touch C code.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 11:50:30 UTC
(or just try reverting 3265ff9ccc870a25dd970a05a778a91cf86ee00a)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-02 16:12:45 UTC
Can reproduce on 3.11 branch from upstream:
$ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --docdir=/usr/share/doc/python-3.11.0_beta3 --htmldir=/usr/share/doc/python-3.11.0_beta3/html --libdir=/usr/lib64 ac_cv_header_stropts_h=no --enable-shared --without-static-libpython --enable-ipv6 --infodir=${prefix}/share/info --mandir=${prefix}/share/man --with-computed-gotos --with-dbmliborder=gdbm --with-libc= --enable-loadable-sqlite-extensions --without-ensurepip --with-system-expat --with-system-ffi --with-platlibdir=lib --with-pkg-config=yes --without-lto --disable-optimizations --with-readline=readline ; make -j32 ; ./python -c 'from sphinx import search'

[17:07:47]  <@sam_> 00f8fe956491816f03f1cc76bc7ed297cd9c0930 is the first bad commit
[17:07:47]  <@sam_> commit 00f8fe956491816f03f1cc76bc7ed297cd9c0930
[17:07:47]  <@sam_> Author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
[17:07:47]  <@sam_> Date:   Tue May 31 19:13:27 2022 -0700
[17:07:47]  <@sam_>     [3.11] gh-91162: Fix substitution of unpacked tuples in generic aliases (GH-92335) (#92484)
Comment 11 Larry the Git Cow gentoo-dev 2022-06-03 06:45:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a9096e5613816fbcfd2aa461d6c67285a710419b

commit a9096e5613816fbcfd2aa461d6c67285a710419b
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-06-03 06:44:18 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-06-03 06:45:04 +0000

    dev-lang/python: Fix LD_LIBRARY_PATH leaking into Portage internals
    
    Move setting LD_LIBRARY_PATH for just-built Python invocation
    to a wrapper, to avoid it incidentally leaking into Python used inside
    Portage helpers.  Currently, this could result in mixing system Python
    executable with just-built libpython.
    
    Closes: https://bugs.gentoo.org/849311
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-lang/python/python-2.7.18_p15.ebuild   | 9 +++++++--
 dev-lang/python/python-3.10.4_p1.ebuild    | 9 +++++++--
 dev-lang/python/python-3.11.0_beta3.ebuild | 9 +++++++--
 dev-lang/python/python-3.8.13_p2.ebuild    | 9 +++++++--
 dev-lang/python/python-3.9.13.ebuild       | 9 +++++++--
 5 files changed, 35 insertions(+), 10 deletions(-)