Open Skgland opened 1 month ago
Is there any way of making a test in machine::compiler
or other appropriate place that is smaller, self contained (in the sense that it doesn't need to have the whole Machine
to run it), and still reproduces this? That would make this particular case easier to check.
Replacing
if !load_context.path.is_file() {
return None;
}
in machine::compiler::Loader<'a, LS>::listing_src_file_name
with
if cfg!(not(miri)) && !load_context.path.is_file() {
return None;
}
and running the simplified create_test_machine
test over night passes miri
test helper::create_test_machine ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 13 filtered out; finished in 18776.98s
after about 5.2 hours, with the last executed basic block count at 3_755_000_000
.
So creating the machine in miri is extremely slow, and that is before the actual test runs.
In #2439 I eliminate most miri failures though various horrendously slow tests remain.
Most of these test spend a lot of time in
Machine::new
With the following simplified test
we get the following flamegraph using
cargo-flamegraph
withcargo flamegraph test -- create_test_machine
(Viewing the svg works better when downloaded as otherwise the inline js is blocked)
When executed with miri
MIRIFLAGS="-Zmiri-report-progress" cargo miri test -- create_test_machine
the test fails after executing for over459_000_000
basic blocks (38.5 minutes). The miri execution failed asMachine::new
callswam.load_special_forms();
which ends up callingPath::is_file
inmachine::compiler::Loader<'a, LS>::listing_src_file_name
.This effects 24 of the 29 tests ignored for miri.
The other 5 test pass with enough patients, though for
heap_stackless_iter_tests
I reduced the iteration count from 200_000 to 20 when running miri