Skip to content

gc.c: Fix a race condition in object_id #13305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

casperisfine
Copy link
Contributor

@casperisfine casperisfine commented May 12, 2025

If an object is shareable and has no capacity left, it isn't safe to store the object ID in fields as it requires an object resize which can't be done unless all field reads are synchronized.

So in this case we have to store the ID externally like we used to.

Copy link

launchable-app bot commented May 12, 2025

Tests Failed

✖️2 tests failed ✔️28938 tests passed

25/167 test sessions failed

❌ Test session #4484293 failedos:macos-14 workflow:macOS test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28602 tests passed

❌ Test session #4484294 failedos:macos-14 workflow:macOS test_opts:--repeat-count:2 test_task:test-alldetails on CI
🔔 1 issue ✖️2 tests failed ✔️28616 tests passed

❌ Test session #4484300 failedos:macos-15 workflow:macOS test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28601 tests passed

❌ Test session #4484301 failedos:macos-14 workflow:macOS test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28600 tests passed

❌ Test session #4484305 failedos:macos-14 ![workflow:YJIT macOS Arm64](https://img.shields.io/badge/workflow-YJIT macOS Arm64-blue.svg) test_opts:--enable-yjit:dev test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28677 tests passed

❌ Test session #4484309 failedos:macos-latest workflow:ModGC test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28599 tests passed

❌ Test session #4484310 failedos:macos-14 ![workflow:YJIT macOS Arm64](https://img.shields.io/badge/workflow-YJIT macOS Arm64-blue.svg) test_opts:--enable-yjit test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️27658 tests passed

❌ Test session #4484312 failedos:macos-14 workflow:macOS test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28619 tests passed

❌ Test session #4484317 failedos:macos-latest workflow:ModGC test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28554 tests passed

❌ Test session #4484321 failedos:ubuntu-22.04 workflow:Ubuntu test_opts:--disable-yjit test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28521 tests passed

❌ Test session #4484322 failedos:ubuntu-22.04 workflow:Ubuntu test_opts:cppflags:-DVM_CHECK_MODE test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28724 tests passed

❌ Test session #4484326 failedos:ubuntu-latest workflow:ModGC test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28638 tests passed

❌ Test session #4484329 failedos:ubuntu-22.04 ![workflow:YJIT Ubuntu](https://img.shields.io/badge/workflow-YJIT Ubuntu-blue.svg) test_opts:RUSTC:'rustc+1.58.0' test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28663 tests passed

❌ Test session #4484333 failedos:ubuntu-22.04 workflow:Ubuntu test_opts:--enable-shared--enable-load-relative test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28617 tests passed

❌ Test session #4484334 failedos:ubuntu-22.04 ![workflow:YJIT Ubuntu](https://img.shields.io/badge/workflow-YJIT Ubuntu-blue.svg) test_opts:--enable-yjit:dev test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28693 tests passed

❌ Test session #4484335 failedos:ubuntu-24.04 workflow:Ubuntu test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28689 tests passed

❌ Test session #4484337 failedos:ubuntu-22.04 workflow:Ubuntu test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28494 tests passed

❌ Test session #4484345 failedos:macos-14 workflow:macOS test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28619 tests passed

❌ Test session #4484347 failedos:ubuntu-22.04 ![workflow:YJIT Ubuntu](https://img.shields.io/badge/workflow-YJIT Ubuntu-blue.svg) test_opts:--enable-yjit:dev test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28695 tests passed

❌ Test session #4484355 failedos:ubuntu-latest workflow:ModGC test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️27642 tests passed

❌ Test session #4484364 failedos:ubuntu-24.04-arm workflow:Ubuntu test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28698 tests passed

❌ Test session #4484371 failedos:macos-13 workflow:macOS test_opts: test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28618 tests passed

❌ Test session #4484399 failedos:windows-2022 workflow:Windows test_opts:none test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28262 tests passed

❌ Test session #4484403 failedos:windows-2022 workflow:MinGW test_opts:none test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28309 tests passed

❌ Test session #4484432 failedos:windows-2025 workflow:Windows test_opts:none test_task:checkdetails on CI
🔔 1 issue ✖️2 tests failed ✔️28278 tests passed

@casperisfine

This comment was marked as outdated.

@casperisfine casperisfine force-pushed the objid-fix-race branch 6 times, most recently from 474602d to 8055a1b Compare May 14, 2025 13:06
@casperisfine casperisfine force-pushed the objid-fix-race branch 3 times, most recently from 4b27a1c to bf7de73 Compare June 12, 2025 16:28
If an object is shareable and has no capacity left, it isn't
safe to store the object ID in fields as it requires an object
resize which can't be done unless all field reads are synchronized.

So in this case we have to store the ID externally like we used to.
@casperisfine casperisfine force-pushed the objid-fix-race branch 2 times, most recently from 7d90b73 to e28a96a Compare June 12, 2025 17:42
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.

2 participants