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

PR #849 broke JikesRVM RBaseBaseSemiSpace #874

Closed
qinsoon opened this issue Jul 31, 2023 · 4 comments · Fixed by #876
Closed

PR #849 broke JikesRVM RBaseBaseSemiSpace #874

qinsoon opened this issue Jul 31, 2023 · 4 comments · Fixed by #876
Labels
C-bug Category: Bug

Comments

@qinsoon
Copy link
Member

qinsoon commented Jul 31, 2023

Running #849 with the latest JikesRVM binding (4c47fdf904cbb99362f5d1ffa2ecea28150ed6ad). I got a sigsegv when running RBaseBaseSemiSpace:

Build

./bin/buildit localhost RBaseBaseSemiSpace --answer-yes --use-third-party-heap=../mmtk-jikesrvm --use-third-party-build-configs=../mmtk-jikesrvm/jikesrvm/build/configs/ --use-external-source=../mmtk-jikesrvm/jikesrvm/rvm/src --m32

Run

$ dist/RBaseBaseSemiSpace_x86_64_m32-linux/rvm -jar /usr/share/benchmarks/dacapo/dacapo-2006-10
-MR2.jar fop
[2023-07-31T02:45:35Z INFO  mmtk::memory_manager] Initialized MMTk with SemiSpace (FixedHeapSize(104857600))
Segmentation fault (core dumped)

The CI tests did not catch this, because of a mistake in JikesRVM ci-test.sh (no set -e in the script).

@qinsoon qinsoon added the C-bug Category: Bug label Jul 31, 2023
@qinsoon
Copy link
Member Author

qinsoon commented Jul 31, 2023

BaseBase Marksweep and NoGC also segfaults.

@qinsoon qinsoon changed the title PR #839 broke JikesRVM RBaseBaseSemiSpace PR #849 broke JikesRVM RBaseBaseSemiSpace Jul 31, 2023
@wks
Copy link
Collaborator

wks commented Jul 31, 2023

BaseBase Semispace panicked because of "VO bit not set" during GC.

thread '<unnamed>' panicked at ':82950c28: VO bit not set', /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/policy/copyspace.rs::222:2229:

Here is a stack trace from gdb:

#0  0xf7fc4579 in __kernel_vsyscall ()
#1  0xf7487e37 in ?? () from /lib32/libc.so.6
#2  0xf74374c5 in raise () from /lib32/libc.so.6
#3  0xf74203ac in abort () from /lib32/libc.so.6
#4  0xf7d5dd65 in std::sys::unix::abort_internal () at library/std/src/sys/unix/mod.rs:347
#5  0xf7d5afe3 in std::panicking::rust_panic () at library/std/src/panicking.rs:738
#6  0xf7d5adce in std::panicking::rust_panic_with_hook () at library/std/src/panicking.rs:706
#7  0xf7d5aaec in std::panicking::begin_panic_handler::{closure#0} () at library/std/src/panicking.rs:579
#8  0xf7d5943a in std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::{closure_env#0}, !> () at library/std/src/sys_common/backtrace.rs:137
#9  0xf7d5a7c2 in std::panicking::begin_panic_handler () at library/std/src/panicking.rs:575
#10 0xf78265d5 in core::panicking::panic_fmt () at library/core/src/panicking.rs:65
#11 0xf79902ea in mmtk::policy::copyspace::CopySpace<mmtk_jikesrvm::JikesRVM>::trace_object<mmtk_jikesrvm::JikesRVM, mmtk::plan::tracing::VectorQueue<mmtk::util::address::ObjectReference>> (self=0x5657a790, queue=0xf040cc30, object=..., semantics=..., worker=0x56581270) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/policy/copyspace.rs:222
#12 0xf798d14f in mmtk::policy::copyspace::{impl#2}::trace_object<mmtk_jikesrvm::JikesRVM, mmtk::plan::tracing::VectorQueue<mmtk::util::address::ObjectReference>, 255> (self=0x5657a790, queue=0xf040cc30, object=..., copy=..., worker=0x56581270) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/policy/copyspace.rs:129
#13 0xf7874286 in mmtk::plan::semispace::global::{impl#2}::trace_object<mmtk_jikesrvm::JikesRVM, mmtk::plan::tracing::VectorQueue<mmtk::util::address::ObjectReference>, 255> (self=0x5657a790, __mmtk_queue=0xf040cc30, __mmtk_objref=..., __mmtk_worker=0x56581270) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/plan/semispace/global.rs:25
#14 0xf787d9f6 in mmtk::scheduler::gc_work::{impl#40}::trace_object<mmtk_jikesrvm::JikesRVM, mmtk::plan::semispace::global::SemiSpace<mmtk_jikesrvm::JikesRVM>, 255> (self=0xf040cc20, object=...) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/scheduler/gc_work.rs:945
#15 0xf787d385 in mmtk::scheduler::gc_work::{impl#40}::process_edge<mmtk_jikesrvm::JikesRVM, mmtk::plan::semispace::global::SemiSpace<mmtk_jikesrvm::JikesRVM>, 255> (self=0xf040cc20, slot=...) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/scheduler/gc_work.rs:951
#16 0xf78c2927 in mmtk::scheduler::gc_work::ProcessEdgesWork::process_edges<mmtk::scheduler::gc_work::PlanProcessEdges<mmtk_jikesrvm::JikesRVM, mmtk::plan::semispace::global::SemiSpace<mmtk_jikesrvm::JikesRVM>, 255>> (self=0xf040cc20) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/scheduler/gc_work.rs:635
#17 0xf78b3af5 in mmtk::scheduler::gc_work::{impl#30}::do_work<mmtk::scheduler::gc_work::PlanProcessEdges<mmtk_jikesrvm::JikesRVM, mmtk::plan::semispace::global::SemiSpace<mmtk_jikesrvm::JikesRVM>, 255>> (self=0xf040cc20, worker=0x56581270, _mmtk=0xf7f5f008 <<mmtk_jikesrvm::SINGLETON as core::ops::deref::Deref>::deref::__stability::LAZY>) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/scheduler/gc_work.rs:643
#18 0xf78a8ee8 in mmtk::scheduler::work::GCWork::do_work_with_stat<mmtk::scheduler::gc_work::PlanProcessEdges<mmtk_jikesrvm::JikesRVM, mmtk::plan::semispace::global::SemiSpace<mmtk_jikesrvm::JikesRVM>, 255>, mmtk_jikesrvm::JikesRVM> (self=0xf040cc20, worker=0x56581270, mmtk=0xf7f5f008 <<mmtk_jikesrvm::SINGLETON as core::ops::deref::Deref>::deref::__stability::LAZY>) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/scheduler/work.rs:29
#19 0xf7985029 in mmtk::scheduler::worker::GCWorker<mmtk_jikesrvm::JikesRVM>::run<mmtk_jikesrvm::JikesRVM> (self=0x56581270, tls=..., mmtk=0xf7f5f008 <<mmtk_jikesrvm::SINGLETON as core::ops::deref::Deref>::deref::__stability::LAZY>) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/scheduler/worker.rs:354
#20 0xf79445dc in mmtk::memory_manager::start_worker<mmtk_jikesrvm::JikesRVM> (mmtk=0xf7f5f008 <<mmtk_jikesrvm::SINGLETON as core::ops::deref::Deref>::deref::__stability::LAZY>, tls=..., worker=0x56581270) at /home/wks/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/f1a0bb7/src/memory_manager.rs:454
#21 0xf79ef478 in mmtk_jikesrvm::api::start_worker (tls=..., worker=0x56581270) at src/api.rs:144
#22 0x64256fc8 in ?? ()
#23 0x80d83ffc in ?? ()

I guess the reason is that the allocation fast path did not set the VO bit. OpenJDK's JIT compiler generates the allocation code specially if VO_BIT=1.

@qinsoon
Copy link
Member Author

qinsoon commented Jul 31, 2023

But JikesRVM should not enable vo_bit for any of its build.

@wks
Copy link
Collaborator

wks commented Jul 31, 2023

But JikesRVM should not enable vo_bit for any of its build.

Oops. I thought you mean you enabled VO bits for JikesRVM and found it crashing. I'll test again without the VO bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants