Skip to content

gh-155725: Remove PyGILState_Ensure usage from tracemalloc - #156409

Merged
kumaraditya303 merged 4 commits into
python:mainfrom
kumaraditya303:tracemalloc
Aug 30, 2026
Merged

gh-155725: Remove PyGILState_Ensure usage from tracemalloc#156409
kumaraditya303 merged 4 commits into
python:mainfrom
kumaraditya303:tracemalloc

Conversation

@kumaraditya303

@kumaraditya303 kumaraditya303 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

tracemalloc no longer acquires the GIL nor creates a temporary thread state when tracing memory allocations.

tracemalloc no longer acquires the GIL nor creates a temporary thread
state when tracing memory allocations. A thread with no attached thread
state now records the trace with the "<unknown>" traceback instead of
attaching a thread state to capture the Python traceback. Threads
without a thread state used to pay for a GIL acquisition plus a full
thread state creation and destruction on every traced raw allocation,
only to record an empty traceback anyway.
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34238669 | 📁 Comparing 69d37ec against main (7f0ccd6)

  🔍 Preview build  

2 files changed
± c-api/memory.html
± whatsnew/changelog.html

…e attached

Store traceback frame filenames as interned NUL terminated UTF-8 strings
instead of Python str objects, so that capturing a traceback no longer
uses or modifies Python objects. Threads without an attached thread state
now capture their Python traceback by walking the frames of the thread
state most recently bound to the thread; only threads which never had a
thread state record the traceback as "<unknown>".

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a much better approach.

Comment thread Python/tracemalloc.c
Comment thread Python/tracemalloc.c
Comment thread Python/tracemalloc.c Outdated
Comment thread Python/tracemalloc.c

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gpshead gpshead left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed that this is the right thing to do. maybe mention in the NEWS entry that the printed filename format changes slightly for higher value Unicode, it's a utf-8 value with \xNN escapes rather than using a mix of \xNN \uNNNN and \UNNNNNNNN. in practice it should not be a big deal, its debugging data and all the data is there.

@kumaraditya303
kumaraditya303 merged commit 6b1b90f into python:main Aug 30, 2026
58 checks passed
@kumaraditya303
kumaraditya303 deleted the tracemalloc branch August 30, 2026 07:34
@kumaraditya303 kumaraditya303 added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 30, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @kumaraditya303 for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 30, 2026

Copy link
Copy Markdown

GH-156628 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 30, 2026
hugovk pushed a commit that referenced this pull request Aug 31, 2026
…GH-156409) (#156628)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot s390x Fedora Stable Clang Installed 3.15 (tier-3) has failed when building commit c168fbc.

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/2046/builds/333) and take a look at the build logs.
  4. Check if the failure is related to this commit (c168fbc) 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/2046/builds/333

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

Click to see traceback logs
Note: switching to 'c168fbc84a061bd5acd02f55eabb6068d2b58e9b'.

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 c168fbc84a061 [3.15] gh-155725: Remove `PyGILState_Ensure` usage from `tracemalloc` (GH-156409) (#156628)
Switched to and reset branch '3.15'

configure: WARNING: s390x-ibm-linux-gnu/clang is not supported
configure: WARNING:

Platform "s390x-ibm-linux-gnu" with compiler "clang" is not supported by the
CPython core team, see https://peps.python.org/pep-0011/ for more information.


Objects/unicodeobject.c:4902:1: warning: unused function 'ctz' [-Wunused-function]
 4902 | ctz(size_t v)
      | ^~~
1 warning generated.
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:285:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  285 |     CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |     ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:292:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  292 |       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |       ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:438:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  438 |     CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |     ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:445:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  445 |       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |       ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:551:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  551 |     CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |     ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:560:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  560 |       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |       ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:582:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  582 |       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |       ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:593:9: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  593 |         CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |         ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:690:11: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  690 |           CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |           ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:735:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  735 |     CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |     ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:761:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  761 |       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |       ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:772:9: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  772 |         CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |         ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:785:11: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  785 |           CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |           ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:930:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  930 |     CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |     ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:943:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  943 |       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |       ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:960:5: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  960 |     CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
      |     ^
./Modules/expat/xmltok_impl.c:118:5: note: expanded from macro 'CHECK_NMSTRT_CASES'
  118 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:967:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
  967 |       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |       ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:1202:7: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
 1202 |       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |       ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
In file included from ./Modules/expat/xmltok.c:312:
./Modules/expat/xmltok_impl.c:1222:11: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
 1222 |           CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
      |           ^
./Modules/expat/xmltok_impl.c:89:5: note: expanded from macro 'CHECK_NAME_CASES'
   89 |     EXPAT_FALLTHROUGH;                                                         \
      |     ^
./Modules/expat/fallthrough.h:47:33: note: expanded from macro 'EXPAT_FALLTHROUGH'
   47 | #      define EXPAT_FALLTHROUGH __attribute__((fallthrough))
      |                                 ^
19 warnings generated.

ERROR: Could not install packages due to an OSError: [Errno 28] No space left on device: '/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.15.cstratak-fedora-stable-s390x.clang-installed/build/target/lib/python3.15/site-packages/pip/_vendor/rich/json.py'

Traceback (most recent call last):
  File "<frozen runpy>", line 201, in _run_module_as_main
  File "<frozen runpy>", line 87, in _run_code
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.15.cstratak-fedora-stable-s390x.clang-installed/build/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
             ~~~~~~~~~~~~~~~^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.15.cstratak-fedora-stable-s390x.clang-installed/build/Lib/ensurepip/__init__.py", line 269, in _main
    return _bootstrap(
        root=args.root,
    ...<4 lines>...
        default_pip=args.default_pip,
    )
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.15.cstratak-fedora-stable-s390x.clang-installed/build/Lib/ensurepip/__init__.py", line 184, in _bootstrap
    return _run_pip([*args, "pip"], [os.fsdecode(tmp_wheel_path)])
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.15.cstratak-fedora-stable-s390x.clang-installed/build/Lib/ensurepip/__init__.py", line 88, in _run_pip
    return subprocess.run(cmd, check=True).returncode
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.15.cstratak-fedora-stable-s390x.clang-installed/build/Lib/subprocess.py", line 692, in run
    raise CalledProcessError(retcode, process.args,
                             output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.15.cstratak-fedora-stable-s390x.clang-installed/build/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmpwa2qzwif/pip-26.2.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmpwa2qzwif\', \'--root\', \'/\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
make: *** [Makefile:2599: install] Error 1

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot s390x Fedora Stable LTO + PGO 3.15 (tier-3) has failed when building commit c168fbc.

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/2117/builds/325) and take a look at the build logs.
  4. Check if the failure is related to this commit (c168fbc) 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/2117/builds/325

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

Click to see traceback logs
Note: switching to 'c168fbc84a061bd5acd02f55eabb6068d2b58e9b'.

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 c168fbc84a06 [3.15] gh-155725: Remove `PyGILState_Ensure` usage from `tracemalloc` (GH-156409) (#156628)
Switched to and reset branch '3.15'

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:3504: clean-retain-profile] Error 1 (ignored)
./Modules/socketmodule.c: In function ‘getsockaddrarg’:
./Modules/socketmodule.c:2648:9: warning: ‘strncpy’ specified bound 64 equals destination size [-Wstringop-truncation]
 2648 |         strncpy((char *)sa->salg_name, name, sizeof(sa->salg_name));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ld.bfd: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3832: Modules/_ctypes.cpython-315-s390x-linux-gnu.so] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/bin/ld.bfd: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3943: Modules/_testclinic.cpython-315-s390x-linux-gnu.so] Error 1
/usr/bin/ld.bfd: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3913: Modules/_testcapi.cpython-315-s390x-linux-gnu.so] Error 1
/usr/bin/ld.bfd: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:3941: Modules/_testlimitedcapi.cpython-315-s390x-linux-gnu.so] Error 1
/tmp/ccYa8Ag4.s: Assembler messages:
/tmp/ccYa8Ag4.s: Fatal error: can't write 3951 bytes to section .gnu.lto_.jmpfuncs.57e3ba4d4d87d23b of Modules/_ctypes/_ctypes_test.o: 'No space left on device'
/tmp/ccYa8Ag4.s: Fatal error: Modules/_ctypes/_ctypes_test.o: No such file or directory
make[2]: *** [Makefile:3952: Modules/_ctypes/_ctypes_test.o] Error 1
make[1]: *** [Makefile:1031: profile-gen-stamp] Error 2
make: *** [Makefile:1043: profile-run-stamp] Error 2

@bedevere-bot

Copy link
Copy Markdown

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

Hi! The buildbot s390x Fedora Stable LTO 3.15 (tier-3) has failed when building commit c168fbc.

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/2045/builds/320) and take a look at the build logs.
  4. Check if the failure is related to this commit (c168fbc) 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/2045/builds/320

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

Click to see traceback logs
Note: switching to 'c168fbc84a061bd5acd02f55eabb6068d2b58e9b'.

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 c168fbc84a06 [3.15] gh-155725: Remove `PyGILState_Ensure` usage from `tracemalloc` (GH-156409) (#156628)
Switched to and reset branch '3.15'

/tmp/ccUliAIV.s: Assembler messages:
/tmp/ccUliAIV.s: Fatal error: Modules/_interpchannelsmodule.o: No space left on device
/tmp/ccZJWgjH.s: Assembler messages:
/tmp/ccZJWgjH.s: Fatal error: can't write 2829 bytes to section .gnu.lto__statistics__normal_dist_inv_cdf_impl.2.87e23ccb5d25ea93 of Modules/_statisticsmodule.o: 'No space left on device'
make: *** [Makefile:3739: Modules/_interpchannelsmodule.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:3749: Modules/_statisticsmodule.o] Error 1
/tmp/cclfvjfE.s: Assembler messages:
/tmp/cclfvjfE.s: Fatal error: can't write 2685 bytes to section .gnu.lto_load_stack_global.184.79d15db74876158d of Modules/_pickle.o: 'No space left on device'
/tmp/cclfvjfE.s: Fatal error: Modules/_pickle.o: No such file or directory
make: *** [Makefile:3716: Modules/_pickle.o] Error 1
Assembler messages:
Fatal error: can't create Modules/cmathmodule.o: No space left on device
make: *** [Makefile:3747: Modules/cmathmodule.o] Error 1
Assembler messages:
Fatal error: can't create Modules/_zoneinfo.o: No space left on device
make: *** [Makefile:3743: Modules/_zoneinfo.o] Error 1
/tmp/ccGG1uFA.s: Assembler messages:
/tmp/ccGG1uFA.s: Fatal error: can't write 3586 bytes to section .text of Objects/unicodeobject.o: 'No space left on device'
/tmp/ccGG1uFA.s: Fatal error: Objects/unicodeobject.o: No such file or directory
make: *** [Makefile:3410: Objects/unicodeobject.o] Error 1
Assembler messages:
Fatal error: can't create Modules/mathmodule.o: No space left on device
make: *** [Makefile:3745: Modules/mathmodule.o] Error 1
Assembler messages:
Fatal error: can't create Modules/binascii.o: No space left on device
make: *** [Makefile:3753: Modules/binascii.o] Error 1
Assembler messages:
Fatal error: can't create Modules/_decimal/_decimal.o: No space left on device
make: *** [Makefile:3751: Modules/_decimal/_decimal.o] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants