From: Alexander Lakhin <exclusion@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: plpython tests fail against python 3.14 under Valgrind
Date: Tue, 28 Jul 2026 08:00:01 +0300
Message-ID: <f071e691-5930-4738-9dbd-43ed2da367fe@gmail.com> (raw)
Hello hackers,
As buildfarm animal skink shows, upgrade to Python 3.14 breaks plpython
tests under Valgrind [1]:
61/400 plpython - postgresql:plpython/regress ERROR 49.88s exit status 1
pgsql.build/testrun/plpython/regress/log/postmaster.log
Fatal Python error: pycore_init_builtins: failed to add exceptions to builtins
Python runtime state: preinitialized
object address : 0x139da4a0
object refcount : 1
object type : 0x1388d020
object type name: RecursionError
object repr :
lost sys.stderr
Current thread 0x0000000008c62ec0 [memcheck-amd64-] (most recent call first):
<no Python frame>
I've reproduced this locally and confirmed that it's not reproduced with
PLPYTHON="python3.13" ./configure ...
It's also not reproduced on master, probably just because of a bit lesser
stack usage. I've bisected the anomaly and found what makes master pass
the tests: aeb07c55f.
AI suggests the offending change in Python 3.14 is [2]:
Use Py_EnterRecursiveCall() to guard against runaway recursion in C code
[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2026-07-27%2013%3A09%3A55
[2] https://docs.python.org/3/whatsnew/3.14.html
Best regards,
Alexander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: exclusion@gmail.com
Subject: Re: plpython tests fail against python 3.14 under Valgrind
In-Reply-To: <f071e691-5930-4738-9dbd-43ed2da367fe@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox