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

rr chaos mode for stress testing garbage collection #532

Open
MilesCranmer opened this issue Jul 29, 2024 · 0 comments
Open

rr chaos mode for stress testing garbage collection #532

MilesCranmer opened this issue Jul 29, 2024 · 0 comments

Comments

@MilesCranmer
Copy link
Contributor

MilesCranmer commented Jul 29, 2024

x-post from #520 (comment). Probably useful for when #529 lands.

Regarding testing, it could be nice to try something like rr's chaos mode to assault the garbage collector in multithreaded mode and reveal any potential thread safety issues.

It is tricky to start Julia with rr from within Python – see JuliaLang/julia#52689. So the test would have to be run from the Julia side of PythonCall.jl, and open Python from there, rather than the other direction. But maybe that would be good enough for testing this.

I believe the Julia version of this can be done with

julia --bug-report=rr-local,chaos

which starts a new Julia process using BugReporting.jl.

BugReporting.jl looks to launch rr using

https://github.com/JuliaLang/BugReporting.jl/blob/fec2ece8be317462fe8b93ffca56e5b228d0b341/src/BugReporting.jl#L162

    rr_cmd = `$(rr()) record $rr_flags $julia_cmd $julia_args`

where rr_flags contains --chaos for chaos mode.

So perhaps the BugReporting.jl package could be installed for testing, which automatically installs rr. This could be used for referencing the rr executable with BugReporting.rr().

cc @ericphanson

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

1 participant