JuliaPy / JuliaPy/PythonCall.jl
rr chaos mode for stress testing garbage collection
- Ngôn ngữ chính
- Julia
- Star
- 1.1k
- Fork
- 86
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 3
Mô tả
x-post from https://github.com/JuliaPy/PythonCall.jl/pull/520#issuecomment-2241796411. Probably useful for when https://github.com/JuliaPy/PythonCall.jl/pull/529 lands.
Regarding testing, it could be nice to try something like [rr's chaos mode](https://robert.ocallahan.org/2016/02/introducing-rr-chaos-mode.html) 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 https://github.com/JuliaLang/julia/issues/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
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start by reading the Julia-side testing approach described in the issue and BugReporting.jl's rr invocation at the linked source. Try `julia --bug-report=rr-local,chaos` with PythonCall launched from Julia. Done means there is a repeatable chaos-mode stress test that exercises PythonCall's multithreaded garbage-collection path.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- julia, python
- Lĩnh vực
- testing-qa
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100