Skip to content
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

gctest fails if shared build by Zig #601

Closed
ivmai opened this issue Dec 25, 2023 · 5 comments
Closed

gctest fails if shared build by Zig #601

ivmai opened this issue Dec 25, 2023 · 5 comments

Comments

@ivmai
Copy link
Owner

ivmai commented Dec 25, 2023

Source: master (71d1ba4)
Build: https://github.com/ivmai/bdwgc/actions/runs/7319490595/job/19937385974
Host: Linux/x64
How to reproduce: zig/zig build -DBUILD_SHARED_LIBS=true -Dbuild_tests=true -Denable_gc_assertions=true -Denable_large_config=true -Denable_munmap=false test
Output (gctest):

Supported VDBs: manual soft mprotect
Switched to incremental mode
Reading dirty bits from /proc
Test failed
List reversal produced incorrect list - collector is broken

Related issue: #557

@ivmai
Copy link
Owner Author

ivmai commented Dec 25, 2023

If threads are on, then gctest fails with:
GC_is_visible produced wrong failure indication

@ivmai
Copy link
Owner Author

ivmai commented Dec 25, 2023

The root cause of this, I suppose, is that some roots are not scanned, most provably static roots. E.g. the static roots of gctest itself are not discovered.

@ivmai ivmai mentioned this issue Dec 25, 2023
11 tasks
@plajjan
Copy link
Contributor

plajjan commented Dec 29, 2023

I started testing various combinations to find failing cases and adding -O2 fixed certain cases while others, while it broke others. It's net positive though as fewer things broke than were fixed by adding -O2.

@ivmai
Copy link
Owner Author

ivmai commented Jan 3, 2024

Is this observed on Linux only?
I think this duplicates #544 because if you set environment variable GC_USE_GETWRITEWATCH=0 or pass -D NO_SOFT_VDB or even -D NO_VDB_FOR_STATIC_ROOTS to cflag then the issue is not reproduced.

@ivmai
Copy link
Owner Author

ivmai commented Jan 3, 2024

Duplicates #544

@ivmai ivmai closed this as completed Jan 3, 2024
ivmai added a commit that referenced this issue Jan 12, 2024
Issue #601 (bdwgc).

* build.zig [build_shared_libs && t.os.tag==.linux] (flags): Add
-D NO_VDB_FOR_STATIC_ROOTS; add FIXME item.
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

No branches or pull requests

2 participants