GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-130163: Fix possible crashes related to PySys_GetObject() by serhiy-storchaka · Pull Request #130503 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Feb 24, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed reference, has been replaced by using one of the following functions, which return a strong reference and distinguish a missing attribute from an error: _PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(), _PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().

This PR is written in a form that will minimized the diff for #111035 or #129736 and minimize future difference between main and other branches.

  • Issue: C API: Add a replacement for PySys_GetObject #108512
  • Issue: Crash when concurrently writing with print and concurrently modifying sys.stdout #130163

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@serhiy-storchaka serhiy-storchaka added type-crash A hard crash of the interpreter, possibly with a core dump needs backport to 3.12 only security fixes topic-free-threading needs backport to 3.13 only security fixes labels Feb 24, 2025
@serhiy-storchaka
serhiy-storchaka requested review from ericsnowcurrently, kumaraditya303 and markshannon as code owners February 24, 2025 12:41
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 24, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Feb 24, 2025
C API: Add a replacement for PySys_GetObject #108512
Closed
@serhiy-storchaka
pythongh-108512: Fix possible crashes related to PySys_GetObject() in…
e76228a
… free-threaded build

The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed
reference, has been replaced by using one of the following functions, which
return a strong reference and distinguish a missing attribute from an error:
_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),
_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().
@serhiy-storchaka
serhiy-storchaka force-pushed the capi-PySys_GetAttr3 branch from e352463 to e76228a Compare February 24, 2025 15:58
@serhiy-storchaka serhiy-storchaka added 🔨 test-with-buildbots Test PR w/ buildbots; report in status section and removed 🔨 test-with-buildbots Test PR w/ buildbots; report in status section labels Feb 24, 2025
@serhiy-storchaka serhiy-storchaka changed the title gh-108512: Fix possible crashes related to PySys_GetObject() in free-threaded build gh-130163: Fix possible crashes related to PySys_GetObject() in free-threaded build Feb 25, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Feb 25, 2025
Crash when concurrently writing with print and concurrently modifying sys.stdout #130163
Closed
@serhiy-storchaka serhiy-storchaka removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Feb 25, 2025
serhiy-storchaka added 3 commits February 25, 2025 18:39
@serhiy-storchaka
Merge branch 'main' into capi-PySys_GetAttr3
ff9c317
@serhiy-storchaka
Merge branch 'main' into capi-PySys_GetAttr3
4a50dcd
@serhiy-storchaka
Add some tests.
fd6019c
@serhiy-storchaka serhiy-storchaka changed the title gh-130163: Fix possible crashes related to PySys_GetObject() in free-threaded build gh-130163: Fix possible crashes related to PySys_GetObject() Feb 25, 2025
@serhiy-storchaka
Update 2025-02-24-14-25-36.gh-issue-130163.rGpc9v.rst
e67b3fa
@sergey-miryanov sergey-miryanov mentioned this pull request Feb 25, 2025
gh-130163: Fix usage of borrow references from _PySys_GetAttr #130282
Closed
serhiy-storchaka added 2 commits February 25, 2025 22:04
@serhiy-storchaka
Fix test for input().
7b6e112
@serhiy-storchaka
Merge remote-tracking branch 'refs/remotes/origin/capi-PySys_GetAttr3…
f6e3ee6
…' into capi-PySys_GetAttr3
@serhiy-storchaka
serhiy-storchaka merged commit 0ef4ffe into python:main Feb 25, 2025
@miss-islington-app

miss-islington-app Bot commented Feb 25, 2025

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Feb 25, 2025
@miss-islington-app

miss-islington-app Bot commented Feb 25, 2025

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 0ef4ffeefd1737c18dc9326133c7894d58108c2e 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@serhiy-storchaka
serhiy-storchaka deleted the capi-PySys_GetAttr3 branch February 25, 2025 21:04
@miss-islington-app miss-islington-app Bot assigned serhiy-storchaka Feb 25, 2025
@miss-islington-app

miss-islington-app Bot commented Feb 25, 2025

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 0ef4ffeefd1737c18dc9326133c7894d58108c2e 3.12
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 25, 2025
@serhiy-storchaka
[3.13] pythongh-130163: Fix crashes related to PySys_GetObject() (pyt…
1e4b133
…honGH-130503)

The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed
reference, has been replaced by using one of the following functions, which
return a strong reference and distinguish a missing attribute from an error:
_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),
_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().
(cherry picked from commit 0ef4ffe)

Co-authored-by: Serhiy Storchaka <[email protected]>
@bedevere-app

bedevere-app Bot commented Feb 25, 2025

Copy link
Copy Markdown

GH-130556 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Feb 25, 2025
@serhiy-storchaka serhiy-storchaka removed the needs backport to 3.12 only security fixes label Feb 25, 2025
serhiy-storchaka added a commit that referenced this pull request Feb 25, 2025
@serhiy-storchaka
[3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (
7c1b76f
GH-130556)

The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed
reference, has been replaced by using one of the following functions, which
return a strong reference and distinguish a missing attribute from an error:
_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),
_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().
(cherry picked from commit 0ef4ffe)
@bedevere-bot

bedevere-bot commented Feb 25, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable LTO + PGO 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1433/builds/544) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1433/builds/544

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/threading.py", line 1041, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/threading.py", line 992, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/test/test_interpreters/test_stress.py", line 47, in run
    interp = interpreters.create()
  File "/home/buildbot/buildarea/3.13.cstratak-fedora-stable-aarch64.lto-pgo/build/Lib/test/support/interpreters/__init__.py", line 76, in create
    id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 RHEL8 Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1445/builds/404) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1445/builds/404

Failed tests:

  • test_genericalias
  • test_ast
  • test_typing

Test leaking resources:

  • test_typing: references
  • test_ast: references
  • test_genericalias: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 36, done.        
remote: Counting objects:   2% (1/34)        
remote: Counting objects:   5% (2/34)        
remote: Counting objects:   8% (3/34)        
remote: Counting objects:  11% (4/34)        
remote: Counting objects:  14% (5/34)        
remote: Counting objects:  17% (6/34)        
remote: Counting objects:  20% (7/34)        
remote: Counting objects:  23% (8/34)        
remote: Counting objects:  26% (9/34)        
remote: Counting objects:  29% (10/34)        
remote: Counting objects:  32% (11/34)        
remote: Counting objects:  35% (12/34)        
remote: Counting objects:  38% (13/34)        
remote: Counting objects:  41% (14/34)        
remote: Counting objects:  44% (15/34)        
remote: Counting objects:  47% (16/34)        
remote: Counting objects:  50% (17/34)        
remote: Counting objects:  52% (18/34)        
remote: Counting objects:  55% (19/34)        
remote: Counting objects:  58% (20/34)        
remote: Counting objects:  61% (21/34)        
remote: Counting objects:  64% (22/34)        
remote: Counting objects:  67% (23/34)        
remote: Counting objects:  70% (24/34)        
remote: Counting objects:  73% (25/34)        
remote: Counting objects:  76% (26/34)        
remote: Counting objects:  79% (27/34)        
remote: Counting objects:  82% (28/34)        
remote: Counting objects:  85% (29/34)        
remote: Counting objects:  88% (30/34)        
remote: Counting objects:  91% (31/34)        
remote: Counting objects:  94% (32/34)        
remote: Counting objects:  97% (33/34)        
remote: Counting objects: 100% (34/34)        
remote: Counting objects: 100% (34/34), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 36 (delta 27), reused 27 (delta 27), pack-reused 2 (from 2)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '7c1b76fce8c8df00da38830f72dbdde6881a33be'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7c1b76fce8c [3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (GH-130556)
Switched to and reset branch '3.13'

make: *** [Makefile:2246: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL8 Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1440/builds/618) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1440/builds/618

Failed tests:

  • test_genericalias
  • test_ast
  • test_pickletools
  • test_typing

Test leaking resources:

  • test_typing: references
  • test_pickletools: references
  • test_ast: references
  • test_genericalias: references
  • test_pickletools: memory blocks

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 36, done.        
remote: Counting objects:   2% (1/34)        
remote: Counting objects:   5% (2/34)        
remote: Counting objects:   8% (3/34)        
remote: Counting objects:  11% (4/34)        
remote: Counting objects:  14% (5/34)        
remote: Counting objects:  17% (6/34)        
remote: Counting objects:  20% (7/34)        
remote: Counting objects:  23% (8/34)        
remote: Counting objects:  26% (9/34)        
remote: Counting objects:  29% (10/34)        
remote: Counting objects:  32% (11/34)        
remote: Counting objects:  35% (12/34)        
remote: Counting objects:  38% (13/34)        
remote: Counting objects:  41% (14/34)        
remote: Counting objects:  44% (15/34)        
remote: Counting objects:  47% (16/34)        
remote: Counting objects:  50% (17/34)        
remote: Counting objects:  52% (18/34)        
remote: Counting objects:  55% (19/34)        
remote: Counting objects:  58% (20/34)        
remote: Counting objects:  61% (21/34)        
remote: Counting objects:  64% (22/34)        
remote: Counting objects:  67% (23/34)        
remote: Counting objects:  70% (24/34)        
remote: Counting objects:  73% (25/34)        
remote: Counting objects:  76% (26/34)        
remote: Counting objects:  79% (27/34)        
remote: Counting objects:  82% (28/34)        
remote: Counting objects:  85% (29/34)        
remote: Counting objects:  88% (30/34)        
remote: Counting objects:  91% (31/34)        
remote: Counting objects:  94% (32/34)        
remote: Counting objects:  97% (33/34)        
remote: Counting objects: 100% (34/34)        
remote: Counting objects: 100% (34/34), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 36 (delta 27), reused 27 (delta 27), pack-reused 2 (from 2)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '7c1b76fce8c8df00da38830f72dbdde6881a33be'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7c1b76fce8c [3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (GH-130556)
Switched to and reset branch '3.13'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2246: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x RHEL9 Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1575/builds/534) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1575/builds/534

Failed tests:

  • test_genericalias
  • test_ast
  • test_typing

Test leaking resources:

  • test_typing: references
  • test_ast: references
  • test_genericalias: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 36, done.        
remote: Counting objects:   2% (1/34)        
remote: Counting objects:   5% (2/34)        
remote: Counting objects:   8% (3/34)        
remote: Counting objects:  11% (4/34)        
remote: Counting objects:  14% (5/34)        
remote: Counting objects:  17% (6/34)        
remote: Counting objects:  20% (7/34)        
remote: Counting objects:  23% (8/34)        
remote: Counting objects:  26% (9/34)        
remote: Counting objects:  29% (10/34)        
remote: Counting objects:  32% (11/34)        
remote: Counting objects:  35% (12/34)        
remote: Counting objects:  38% (13/34)        
remote: Counting objects:  41% (14/34)        
remote: Counting objects:  44% (15/34)        
remote: Counting objects:  47% (16/34)        
remote: Counting objects:  50% (17/34)        
remote: Counting objects:  52% (18/34)        
remote: Counting objects:  55% (19/34)        
remote: Counting objects:  58% (20/34)        
remote: Counting objects:  61% (21/34)        
remote: Counting objects:  64% (22/34)        
remote: Counting objects:  67% (23/34)        
remote: Counting objects:  70% (24/34)        
remote: Counting objects:  73% (25/34)        
remote: Counting objects:  76% (26/34)        
remote: Counting objects:  79% (27/34)        
remote: Counting objects:  82% (28/34)        
remote: Counting objects:  85% (29/34)        
remote: Counting objects:  88% (30/34)        
remote: Counting objects:  91% (31/34)        
remote: Counting objects:  94% (32/34)        
remote: Counting objects:  97% (33/34)        
remote: Counting objects: 100% (34/34)        
remote: Counting objects: 100% (34/34), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 36 (delta 27), reused 27 (delta 27), pack-reused 2 (from 2)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '7c1b76fce8c8df00da38830f72dbdde6881a33be'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7c1b76fce8c [3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (GH-130556)
Switched to and reset branch '3.13'

make: *** [Makefile:2246: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 RHEL8 Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1385/builds/632) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1385/builds/632

Failed tests:

  • test_genericalias
  • test_ast
  • test_typing

Test leaking resources:

  • test_ast: memory blocks
  • test_typing: references
  • test_ast: references
  • test_genericalias: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 36, done.        
remote: Counting objects:   2% (1/34)        
remote: Counting objects:   5% (2/34)        
remote: Counting objects:   8% (3/34)        
remote: Counting objects:  11% (4/34)        
remote: Counting objects:  14% (5/34)        
remote: Counting objects:  17% (6/34)        
remote: Counting objects:  20% (7/34)        
remote: Counting objects:  23% (8/34)        
remote: Counting objects:  26% (9/34)        
remote: Counting objects:  29% (10/34)        
remote: Counting objects:  32% (11/34)        
remote: Counting objects:  35% (12/34)        
remote: Counting objects:  38% (13/34)        
remote: Counting objects:  41% (14/34)        
remote: Counting objects:  44% (15/34)        
remote: Counting objects:  47% (16/34)        
remote: Counting objects:  50% (17/34)        
remote: Counting objects:  52% (18/34)        
remote: Counting objects:  55% (19/34)        
remote: Counting objects:  58% (20/34)        
remote: Counting objects:  61% (21/34)        
remote: Counting objects:  64% (22/34)        
remote: Counting objects:  67% (23/34)        
remote: Counting objects:  70% (24/34)        
remote: Counting objects:  73% (25/34)        
remote: Counting objects:  76% (26/34)        
remote: Counting objects:  79% (27/34)        
remote: Counting objects:  82% (28/34)        
remote: Counting objects:  85% (29/34)        
remote: Counting objects:  88% (30/34)        
remote: Counting objects:  91% (31/34)        
remote: Counting objects:  94% (32/34)        
remote: Counting objects:  97% (33/34)        
remote: Counting objects: 100% (34/34)        
remote: Counting objects: 100% (34/34), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 36 (delta 27), reused 27 (delta 27), pack-reused 2 (from 2)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '7c1b76fce8c8df00da38830f72dbdde6881a33be'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7c1b76fce8c [3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (GH-130556)
Switched to and reset branch '3.13'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2246: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1512/builds/385) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1512/builds/385

Failed tests:

  • test_pickle
  • test_ast
  • test_typing
  • test_genericalias
  • test_import

Test leaking resources:

  • test_typing: references
  • test_import: memory blocks
  • test_ast: references
  • test_pickle: memory blocks
  • test_genericalias: references
  • test_import: references
  • test_pickle: references

Summary of the results of the build (if available):

==

Click to see traceback logs
TracebackTests.test_exec_failure_nested) ... ok


TracebackTests.test_broken_parent) ... ok


TracebackTests.test_import_bug) ... ok


TracebackTests.test_nonexistent_module) ... ok


TracebackTests.test_syntax_error) ... ok


TracebackTests.test_exec_failure) ... ok


TracebackTests.test_broken_submodule) ... ok


TracebackTests.test_unencodable_filename) ... ok


TracebackTests.test_nonexistent_module_nested) ... ok


TracebackTests.test_broken_parent_from) ... ok


TracebackTests.test_broken_from) ... ok
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1615/builds/483) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1615/builds/483

Failed tests:

  • test_genericalias
  • test_pickle
  • test_ast
  • test_typing

Test leaking resources:

  • test_typing: references
  • test_ast: references
  • test_pickle: memory blocks
  • test_genericalias: references
  • test_pickle: references

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 36, done.        
remote: Counting objects:   2% (1/34)        
remote: Counting objects:   5% (2/34)        
remote: Counting objects:   8% (3/34)        
remote: Counting objects:  11% (4/34)        
remote: Counting objects:  14% (5/34)        
remote: Counting objects:  17% (6/34)        
remote: Counting objects:  20% (7/34)        
remote: Counting objects:  23% (8/34)        
remote: Counting objects:  26% (9/34)        
remote: Counting objects:  29% (10/34)        
remote: Counting objects:  32% (11/34)        
remote: Counting objects:  35% (12/34)        
remote: Counting objects:  38% (13/34)        
remote: Counting objects:  41% (14/34)        
remote: Counting objects:  44% (15/34)        
remote: Counting objects:  47% (16/34)        
remote: Counting objects:  50% (17/34)        
remote: Counting objects:  52% (18/34)        
remote: Counting objects:  55% (19/34)        
remote: Counting objects:  58% (20/34)        
remote: Counting objects:  61% (21/34)        
remote: Counting objects:  64% (22/34)        
remote: Counting objects:  67% (23/34)        
remote: Counting objects:  70% (24/34)        
remote: Counting objects:  73% (25/34)        
remote: Counting objects:  76% (26/34)        
remote: Counting objects:  79% (27/34)        
remote: Counting objects:  82% (28/34)        
remote: Counting objects:  85% (29/34)        
remote: Counting objects:  88% (30/34)        
remote: Counting objects:  91% (31/34)        
remote: Counting objects:  94% (32/34)        
remote: Counting objects:  97% (33/34)        
remote: Counting objects: 100% (34/34)        
remote: Counting objects: 100% (34/34), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 36 (delta 27), reused 27 (delta 27), pack-reused 2 (from 2)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '7c1b76fce8c8df00da38830f72dbdde6881a33be'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7c1b76fce8c [3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (GH-130556)
Switched to and reset branch '3.13'
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Fedora Stable Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1471/builds/551) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1471/builds/551

Failed tests:

  • test_genericalias
  • test_ast
  • test_pickletools
  • test_typing

Test leaking resources:

  • test_typing: references
  • test_pickletools: references
  • test_ast: references
  • test_genericalias: references
  • test_pickletools: memory blocks

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 36, done.        
remote: Counting objects:   2% (1/34)        
remote: Counting objects:   5% (2/34)        
remote: Counting objects:   8% (3/34)        
remote: Counting objects:  11% (4/34)        
remote: Counting objects:  14% (5/34)        
remote: Counting objects:  17% (6/34)        
remote: Counting objects:  20% (7/34)        
remote: Counting objects:  23% (8/34)        
remote: Counting objects:  26% (9/34)        
remote: Counting objects:  29% (10/34)        
remote: Counting objects:  32% (11/34)        
remote: Counting objects:  35% (12/34)        
remote: Counting objects:  38% (13/34)        
remote: Counting objects:  41% (14/34)        
remote: Counting objects:  44% (15/34)        
remote: Counting objects:  47% (16/34)        
remote: Counting objects:  50% (17/34)        
remote: Counting objects:  52% (18/34)        
remote: Counting objects:  55% (19/34)        
remote: Counting objects:  58% (20/34)        
remote: Counting objects:  61% (21/34)        
remote: Counting objects:  64% (22/34)        
remote: Counting objects:  67% (23/34)        
remote: Counting objects:  70% (24/34)        
remote: Counting objects:  73% (25/34)        
remote: Counting objects:  76% (26/34)        
remote: Counting objects:  79% (27/34)        
remote: Counting objects:  82% (28/34)        
remote: Counting objects:  85% (29/34)        
remote: Counting objects:  88% (30/34)        
remote: Counting objects:  91% (31/34)        
remote: Counting objects:  94% (32/34)        
remote: Counting objects:  97% (33/34)        
remote: Counting objects: 100% (34/34)        
remote: Counting objects: 100% (34/34), done.        
remote: Compressing objects:  14% (1/7)        
remote: Compressing objects:  28% (2/7)        
remote: Compressing objects:  42% (3/7)        
remote: Compressing objects:  57% (4/7)        
remote: Compressing objects:  71% (5/7)        
remote: Compressing objects:  85% (6/7)        
remote: Compressing objects: 100% (7/7)        
remote: Compressing objects: 100% (7/7), done.        
remote: Total 36 (delta 27), reused 27 (delta 27), pack-reused 2 (from 2)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to '7c1b76fce8c8df00da38830f72dbdde6881a33be'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7c1b76fce8c [3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (GH-130556)
Switched to and reset branch '3.13'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2246: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE Fedora Stable Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1467/builds/424) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1467/builds/424

Failed tests:

  • test_genericalias
  • test_pickle
  • test_ast
  • test_typing

Test leaking resources:

  • test_typing: references
  • test_ast: references
  • test_pickle: memory blocks
  • test_genericalias: references
  • test_pickle: references

Summary of the results of the build (if available):

==

Click to see traceback logs
Note: switching to '7c1b76fce8c8df00da38830f72dbdde6881a33be'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 7c1b76fce8c [3.13] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (GH-130556)
Switched to and reset branch '3.13'

configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.15)

make: *** [Makefile:2246: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 26, 2025

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows11 Refleaks 3.13 has failed when building commit 7c1b76f.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1484/builds/443) and take a look at the build logs.
  4. Check if the failure is related to this commit (7c1b76f) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1484/builds/443

Failed tests:

  • test_genericalias
  • test_ast
  • test_typing

Failed subtests:

  • test_finalize_with_trace - test.test_threading.ThreadTests.test_finalize_with_trace

Test leaking resources:

  • test_typing: references
  • test_ast: references
  • test_genericalias: references

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "b:\uildarea\3.13.ware-win11.refleak\build\Lib\test\test_threading.py", line 470, in test_finalize_with_trace
    assert_python_ok("-c", """if 1:
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
        import sys, threading
        ^^^^^^^^^^^^^^^^^^^^^
    ...<17 lines>...
        sys.settrace(func)
        ^^^^^^^^^^^^^^^^^^
        """)
        ^^^^
  File "b:\uildarea\3.13.ware-win11.refleak\build\Lib\test\support\script_helper.py", line 180, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
  File "b:\uildarea\3.13.ware-win11.refleak\build\Lib\test\support\script_helper.py", line 165, in _assert_python
    res.fail(cmd_line)
    ~~~~~~~~^^^^^^^^^^
  File "b:\uildarea\3.13.ware-win11.refleak\build\Lib\test\support\script_helper.py", line 75, in fail
    raise AssertionError("Process return code is %d\n"
    ...<13 lines>...
                            err))
AssertionError: Process return code is 3221225477
command line: ['b:\\uildarea\\3.13.ware-win11.refleak\\build\\PCbuild\\amd64\\python_d.exe', '-X', 'faulthandler', '-I', '-c', "if 1:\n            import sys, threading\n\n            # A deadlock-killer, to prevent the\n            # testsuite to hang forever\n            def killer():\n                import os, time\n                time.sleep(2)\n                print('program blocked; aborting')\n                os._exit(2)\n            t = threading.Thread(target=killer)\n            t.daemon = True\n            t.start()\n\n            # This is the trace function\n            def func(frame, event, arg):\n                threading.current_thread()\n                return func\n\n            sys.settrace(func)\n            "]
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 26, 2025
@serhiy-storchaka
[3.12] pythongh-130163: Fix crashes related to PySys_GetObject() (pyt…
4cf5fc4
…honGH-130503) (pythonGH-130556)

The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed
reference, has been replaced by using one of the following functions, which
return a strong reference and distinguish a missing attribute from an error:
_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),
_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().
(cherry picked from commit 0ef4ffe)
(cherry picked from commit 7c1b76f)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this pull request Feb 26, 2025
@serhiy-storchaka
[3.12] gh-130163: Fix crashes related to PySys_GetObject() (GH-130503) (
89a79fc
GH-130556) (GH-130576)

The use of PySys_GetObject() and _PySys_GetAttr(), which return a borrowed
reference, has been replaced by using one of the following functions, which
return a strong reference and distinguish a missing attribute from an error:
_PySys_GetOptionalAttr(), _PySys_GetOptionalAttrString(),
_PySys_GetRequiredAttr(), and _PySys_GetRequiredAttrString().

(cherry picked from commit 0ef4ffe)
(cherry picked from commit 7c1b76f)
(cherry picked from commit 2ab7e11)
@sergey-miryanov sergey-miryanov mentioned this pull request Feb 28, 2025
gh-130660: Revert sys.ps1 and sys.ps2 after code.interact #130661
Merged
@serhiy-storchaka serhiy-storchaka removed their assignment Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 is a code owner
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

topic-free-threading type-crash A hard crash of the interpreter, possibly with a core dump

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@serhiy-storchaka @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.