Skip to content

Conversation

@DinoV
Copy link
Contributor

@DinoVDinoV commented Feb 2, 2024

This adds the GC shared flags for objects to the gc bit states in free-threaded builds. This will allow marking objects as being shared so that we can use QSBR to free them, enabling lock-free readers for dict (and other) objects.

@DinoVDinoVforce-pushed the nogil_dict_gc_shared branch from 8f1cc87 to 1d72215CompareFebruary 3, 2024 01:09
Copy link
Contributor

@colesburycolesbury left a comment

Choose a reason for hiding this comment

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

LGTM!

@DinoVDinoVforce-pushed the nogil_dict_gc_shared branch from 1d72215 to 582179cCompareFebruary 5, 2024 17:47
@DinoVDinoV merged commit bcccf1f into python:mainFeb 5, 2024
@bedevere-bot
Copy link

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

Hi! The buildbot x86-64 macOS 3.x has failed when building commit bcccf1f.

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/all/#builders/366/builds/6539) and take a look at the build logs.
  4. Check if the failure is related to this commit (bcccf1f) 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/all/#builders/366/builds/6539

Failed tests:

  • test.test_multiprocessing_forkserver.test_processes

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

==

Click to see traceback logs
remote: Enumerating objects: 9, done. remote: Counting objects: 11% (1/9) remote: Counting objects: 22% (2/9) remote: Counting objects: 33% (3/9) remote: Counting objects: 44% (4/9) remote: Counting objects: 55% (5/9) remote: Counting objects: 66% (6/9) remote: Counting objects: 77% (7/9) remote: Counting objects: 88% (8/9) remote: Counting objects: 100% (9/9) remote: Counting objects: 100% (9/9), done. remote: Compressing objects: 20% (1/5) remote: Compressing objects: 40% (2/5) remote: Compressing objects: 60% (3/5) remote: Compressing objects: 80% (4/5) remote: Compressing objects: 100% (5/5) remote: Compressing objects: 100% (5/5), done. remote: Total 5 (delta 4), reused 0 (delta 0), pack-reused 0  From https://github.com/python/cpython * branch main -> FETCH_HEAD Note: switching to 'bcccf1fb63870c1b7f8abe246e27b7fff343abd7'. 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 bcccf1fb63 gh-112075: Add gc shared bits (#114931) Switched to and reset branch 'main' configure: WARNING: pkg-config is missing. Some dependencies may not be detected correctly./Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.13d.a(dynamic_annotations.o) has no symbols/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.13d.a(gc_free_threading.o) has no symbols/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libpython3.13d.a(jit.o) has no symbolsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsld: warning: -undefined dynamic_lookup may not work with chained fixupsmake: *** [buildbottest] Error 2

@vstinner
Copy link
Member

See issue gh-115124: AMD64 Windows11 Bigmem 3.x: test_bigmem failed with !_Py_IsImmortal(FROM_GC(gc)) assertion error. PR #114931 or PR #108038 caused a regression.

fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
Add GC shared flags for objects to the GC bit states in free-threaded builds
@DinoVDinoV deleted the nogil_dict_gc_shared branch May 31, 2024 18:23
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@DinoV@bedevere-bot@vstinner@colesbury