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

Cargo test failed for two cases on bare metal #40

Open
4 of 6 tasks
PanJason opened this issue Jul 2, 2023 · 1 comment
Open
4 of 6 tasks

Cargo test failed for two cases on bare metal #40

PanJason opened this issue Jul 2, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@PanJason
Copy link

PanJason commented Jul 2, 2023

Describe the bug
A clear and concise description of what the bug is.
I cloned hermit on the server and ran the cargo test. There are two failed tests.

test rdrand_rdseed_is_masked ... FAILED
test getrandom_intercepted ... FAILED

failures:

---- rdrand_rdseed_is_masked stdout ----
Expecting determinism:
Test Run 1:
thread 'rdrand_rdseed_is_masked' panicked at 'Unsupported processor with feature info: FeatureInfo { extended_family_id: 0, extended_model_id: 6, family_id: 6, model_id: 106, stepping_id: 6, brand_index: 0, cflush_cache_line_size: 8, initial_local_apic_id: 8, max_logical_processor_ids: 128, edx_ecx: SSE3 | PCLMULQDQ | DTES64 | MONITOR | DSCPL | VMX | SMX | EIST | TM2 | SSSE3 | FMA | CMPXCHG16B | PDCM | PCID | DCA | SSE41 | SSE42 | X2APIC | MOVBE | POPCNT | TSC_DEADLINE | AESNI | XSAVE | OSXSAVE | AVX | F16C | RDRAND | FPU | VME | DE | PSE | TSC | MSR | PAE | MCE | CX8 | APIC | SEP | MTRR | PGE | MCA | CMOV | PAT | PSE36 | CLFSH | DS | ACPI | MMX | FXSR | SSE | SSE2 | SS | HTT | TM | PBE | 0x4800 }
 Full family_model: (6, 106)', /home/yupan/.cargo/git/checkouts/reverie-9a587e40a0d7d3be/0e08502/reverie-ptrace/src/timer.rs:75:16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- getrandom_intercepted stdout ----
Expecting determinism:
Test Run 1:
thread 'getrandom_intercepted' panicked at 'Unsupported processor with feature info: FeatureInfo { extended_family_id: 0, extended_model_id: 6, family_id: 6, model_id: 106, stepping_id: 6, brand_index: 0, cflush_cache_line_size: 8, initial_local_apic_id: 4, max_logical_processor_ids: 128, edx_ecx: SSE3 | PCLMULQDQ | DTES64 | MONITOR | DSCPL | VMX | SMX | EIST | TM2 | SSSE3 | FMA | CMPXCHG16B | PDCM | PCID | DCA | SSE41 | SSE42 | X2APIC | MOVBE | POPCNT | TSC_DEADLINE | AESNI | XSAVE | OSXSAVE | AVX | F16C | RDRAND | FPU | VME | DE | PSE | TSC | MSR | PAE | MCE | CX8 | APIC | SEP | MTRR | PGE | MCA | CMOV | PAT | PSE36 | CLFSH | DS | ACPI | MMX | FXSR | SSE | SSE2 | SS | HTT | TM | PBE | 0x4800 }
 Full family_model: (6, 106)', /home/yupan/.cargo/git/checkouts/reverie-9a587e40a0d7d3be/0e08502/reverie-ptrace/src/timer.rs:75:16


failures:
    getrandom_intercepted
    rdrand_rdseed_is_masked

Indicate any of these common scenarios that apply:

  • a program hangs under hermit
  • hermit panics internally
  • hermit runs the program but divergence (nondeterminism) occurs

To Reproduce
Minimal input to reproduce the behavior.

cargo test

Expected behavior
A clear and concise description of what you expected to happen.

all tests passed

Environment

  • Linux kernel version (uname -a): Linux 5.14.0-rc5 #2 SMP Sat Jun 24 11:10:07 CEST 2023 x86_64 x86_64 x86_64 GNU/Linux
  • CPU version (/proce/cpuinfo): Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz
  • Linux distro flavor (/etc/issue, /etc/redhat-release): Ubuntu 20.04.4 LTS

Additional context
Attach the logs to this issue as a text file generated by hermit --log=trace --log-file=FOO run.

Add any other context about the problem here.
I saw other people having a similar issue but he was running hermit inside a VM. That issue was because hermit cannot intercept CPUID instruction on VMs. Here I am running on a bare metal so I wonder what might be the reason here. Is it because of some CPU features? If that's the case, is there a list of supported CPUs by hermit.
If this is a bug, I would also like to help fix it.

@PanJason PanJason added the bug Something isn't working label Jul 2, 2023
@NicholasTroutman
Copy link

I have similar issues on both a WSL and a docker test of hermit on Ubuntu 22.04

#6 49.64 failures:
#6 49.64
#6 49.64 ---- rdrand_rdseed_is_masked stdout ----
#6 49.64 Expecting determinism:
#6 49.64 Test Run 1:
#6 49.64 thread 'rdrand_rdseed_is_masked' panicked at /Python-3.8.16/hermit/vendor/safeptrace/src/lib.rs:317:22:
#6 49.64 InvalidState(Wait(Exited(Pid(761), Signaled(SIGSEGV, false))))
#6 49.64 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
#6 49.64
#6 49.64 ---- getrandom_intercepted stdout ----
#6 49.64 Expecting determinism:
#6 49.64 Test Run 1:
#6 49.64 thread 'getrandom_intercepted' panicked at /Python-3.8.16/hermit/vendor/safeptrace/src/lib.rs:317:22:
#6 49.64 InvalidState(Wait(Exited(Pid(762), Signaled(SIGSEGV, false))))
#6 49.64
#6 49.64
#6 49.64 failures:
#6 49.64     getrandom_intercepted
#6 49.64     rdrand_rdseed_is_masked
#6 49.64
#6 49.64 test result: FAILED. 1 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
#6 49.64
#6 49.65 error: test failed, to rerun pass `-p detcore --test tests_misc`
#6 ERROR: process "/bin/sh -c cargo test --release" did not complete successfully: exit code: 101
------
 > [3/3] RUN cargo test --release:
#6 49.64 InvalidState(Wait(Exited(Pid(762), Signaled(SIGSEGV, false))))
#6 49.64
#6 49.64
#6 49.64 failures:
#6 49.64     getrandom_intercepted
#6 49.64     `rdrand_rdseed_is_masked`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants