You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread 'MMTk Worker' panicked at 'Called is_live() on 0, which maps to an empty space', /home/runner/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/73be50d/src/policy/sft.rs:127:9stack backtrace: 0: rust_begin_unwind at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5 1: core::panicking::panic_fmt at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:67:14 2: <mmtk::policy::sft::EmptySpaceSFT as mmtk::policy::sft::SFT>::is_live 3: clear_weak_refs at /home/runner/work/mmtk-julia/mmtk-julia/vm/julia/src/mmtk-gc.c:145:22 4: <mmtk_julia::scanning::ScanFinalizersSingleThreaded<C> as mmtk::scheduler::work::GCWork<mmtk_julia::JuliaVM>>::do_work 5: mmtk::scheduler::worker::GCWorker<VM>::runnote: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
The text was updated successfully, but these errors were encountered:
Julia weak refs are stored in a thread-local array list. The weak refs may get copied, and the array list is not updated and they still include the old references.
The values that weak refs refer to may get removed. We are not dealing with object forwarding in our weak ref processing. See clear_weak_refs in mmtk-gc.c.
The simple solution is to pin both: the weak ref, and the value they refer to. See mmtk/julia@51ba2a6.
There are many such instances in ART and the solution they have/I have co-opted is to visit these locations at the end of the transitive closure but before the "release" and fixup all pointers since we have complete information at that time. I use the mmtk_get_forwarded_object API to get the new address. The problem in Julia, of course, might be that it's unclear which locations are actually storing pointers.
This PR adds a few more pining for types in the native heap, and exposes globally rooted symbols so we can trace them in the MMTk binding. With this PR, we can run moving Immix without transitively pinning `global_roots_table`. See mmtk/mmtk-julia#170.
* Add `jl_gc_pin`
* Use `jl_gc_pin` to pin `BigFloat` for MPFR
* Rename `PTR_PIN` to `OBJ_PIN`. Additionally add `PTR_PIN` which handles cases for internal pointers.
* Pin objects that are used as key in `jl_codectx_t.global_targets`
* Pin objects that are stored in `jl_codectx_t.PhiNodes`
* Pin objects that are referred to by `jl_cgval_t`
* Disable GC before doing perm alloc in `jl_get_layout` (see mmtk/mmtk-julia#172)
* Pin weak references and the referee (see mmtk/mmtk-julia#176)
* Pin objects that are used in `libuv`'s handle.
* Pin `jl_task_t.completion_future` (see mmtk/mmtk-julia#179)
* Pin all `jl_codeinst_t` objects.
* Pin all `jl_method_instance_t` objects.
* Pin all `jl_module_t` objects.
* Pin all `jl_task_t` objects.
* Expose some `JL_GLOBALLY_ROOTED` symbols, such as `newly_inferred`, `task_done_hook_func`.
Saw the following error in #175.
The text was updated successfully, but these errors were encountered: