-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix GCExt test #47699
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
Merged
Fix GCExt test #47699
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
d30defc
Fix GCExt test with resizable threadpool
vchuravy 0f0fc2b
Add test/gcext to out-of-tree
vchuravy d891452
Revert "Fix GCExt test with resizable threadpool"
vchuravy ac544e1
Disable gcext test that uses jl_gc_internal_obj_base_ptr
vchuravy d8234ea
fixup test/gcext
vchuravy cd866fd
fixup test
vchuravy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rbehrends we already register a task scanner and a root scanner callback in gcext, which exercise
jl_gc_internal_obj_base_ptr. So could we just removeinternal_obj_scan? (I guess if we did that, a major part ofgcext.candLocalTest.jlwould end up dead code and could be removed...)Or do you think it's still valuable? If so, perhaps the code @vchuravy added here in a previous revision of the PR (and which is still visible in
https://github.com/JuliaLang/julia/pull/47407/files) which sets/restoresgc_n_threadsandgc_all_tls_states, could simply be inserted intointernal_obj_scan?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the purpose of that part of the test was that all internal object references are properly recognized, so ideally we'd want to keep it around. It's to protect against some future evolution of the GC where the logic might not work for some reason or another.
As I said, I haven't had an opportunity yet to look at exactly what the problem was, but if we could just add code to
internal_obj_scan()to make it possible to calljl_gc_internal_obj_base_ptr()from there, that would indeed be the ideal solution.An alternative would be to check
internal_obj_scan()insidemark_stack()andmark_stack_data(). This would require maintaining the failure counter at the C level, but might ultimately be the less hacky solution.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is more that you are looking at data that is managed by the GC without holding the GC "lock". So the data might be mutated underneath you. So if we could move this to inside the
mark_stackthat would be better.