Comments (21)
We're working on it! We don't use Cargo internally and keeping two different build systems in sync is a little challenging.
from hermit.
Thanks for the investigation!! So ceee5bd probably builds for you on that arch setup then then? Reverting that business about the map_first_last feature.
@rnbguy, thanks again for your patience. Our external build was half baked here. (It builds fine and runs 750 integration tests, with buck, over in monorepo land ;-). ) We'll invest here to get this in good shape, buildable with Docker & Nix, and with images on dockerhub.
Also, of course, reenabling the barest level of build in CI (#13). Porting real integration tests will take a bit more work as described in the README.
from hermit.
adding the following lines in [dependencies]
of hermit-verify/Cargo.toml
resolves the use of undeclared crate or module `detcore`
errors
detcore = { version = "0.0.0", path = "../detcore" }
edit-distance = { version = "0.0.0", path = "../common/edit-distance" }
but I still get could not find `preemptions` in `detcore`
errors - which is weird. rust-analyzer
can find the references all fine, but not cargo build
.
error[E0432]: unresolved import `detcore::preemptions`
--> tests/standalone/stacktrace_events.rs:13:14
|
13 | use detcore::preemptions::PreemptionReader;
| ^^^^^^^^^^^ could not find `preemptions` in `detcore`
error[E0432]: unresolved import `detcore::preemptions`
--> tests/standalone/stacktrace_events.rs:14:14
|
14 | use detcore::preemptions::PreemptionRecord;
| ^^^^^^^^^^^ could not find `preemptions` in `detcore`
error[E0432]: unresolved import `detcore::Config`
--> detcore/tests/testutils/src/lib.rs:18:5
|
18 | use detcore::Config;
| ^^^^^^^^^^^^^^^ no `Config` in the root
error[E0432]: unresolved import `detcore::Detcore`
--> detcore/tests/testutils/src/lib.rs:19:5
|
19 | use detcore::Detcore;
| ^^^^^^^^^^^^^^^^ no `Detcore` in the root
error[E0432]: unresolved import `detcore::SchedHeuristic`
--> detcore/tests/testutils/src/lib.rs:20:5
|
20 | use detcore::SchedHeuristic;
| ^^^^^^^^^^^^^^^^^^^^^^^ no `SchedHeuristic` in the root
error[E0433]: failed to resolve: could not find `logdiff` in `detcore`
--> detcore/tests/testutils/src/lib.rs:582:38
|
582 | let str_a = detcore::logdiff::strip_log_entry(&x[ix]);
| ^^^^^^^ could not find `logdiff` in `detcore`
error[E0433]: failed to resolve: could not find `logdiff` in `detcore`
--> detcore/tests/testutils/src/lib.rs:583:38
|
583 | let str_b = detcore::logdiff::strip_log_entry(&filtered[ix]);
from hermit.
adding the following lines in
[dependencies]
ofhermit-verify/Cargo.toml
resolves theuse of undeclared crate or module `detcore`
errorsdetcore = { version = "0.0.0", path = "../detcore" } edit-distance = { version = "0.0.0", path = "../common/edit-distance" }
With those changes I get a smaller set of errors:
error[E0432]: unresolved import `detcore::preemptions`
--> hermit-verify/src/internal/schedule_trace.rs:13:14
|
13 | use detcore::preemptions::read_trace;
| ^^^^^^^^^^^ could not find `preemptions` in `detcore`
error[E0432]: unresolved import `detcore::preemptions`
--> hermit-verify/src/internal/schedule_trace.rs:14:14
|
14 | use detcore::preemptions::PreemptionRecord;
| ^^^^^^^^^^^ could not find `preemptions` in `detcore`
from hermit.
adding the following lines in
[dependencies]
ofhermit-verify/Cargo.toml
resolves theuse of undeclared crate or module `detcore`
errorsdetcore = { version = "0.0.0", path = "../detcore" } edit-distance = { version = "0.0.0", path = "../common/edit-distance" }
With those changes I get a smaller set of errors:
error[E0432]: unresolved import `detcore::preemptions` --> hermit-verify/src/internal/schedule_trace.rs:13:14 | 13 | use detcore::preemptions::read_trace; | ^^^^^^^^^^^ could not find `preemptions` in `detcore` error[E0432]: unresolved import `detcore::preemptions` --> hermit-verify/src/internal/schedule_trace.rs:14:14 | 14 | use detcore::preemptions::PreemptionRecord; | ^^^^^^^^^^^ could not find `preemptions` in `detcore`
Hmm, oddly - on subsequent build attempts, several more build errors are reported.
from hermit.
Erk, sorry, looks like this JUST got messed up by a recent push. Bad timing.
@samth @rnbguy - does the prior commit, cacc346, work for you?
We'll stick a Dockerfile in there momentarily to address the libunwind dependence.
from hermit.
I get the same or substantially similar results when building cacc346
Both with or without this patch:
diff --git a/hermit-verify/Cargo.toml b/hermit-verify/Cargo.toml
index 36524c5..9ba41df 100644
--- a/hermit-verify/Cargo.toml
+++ b/hermit-verify/Cargo.toml
@@ -7,6 +7,8 @@ edition = "2021"
[dependencies]
anyhow = "1.0.65"
+detcore = { version = "0.0.0", path = "../detcore" }
+edit-distance = { version = "0.0.0", path = "../common/edit-distance" }
clap = { version = "3.2.17", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
colored = "1.9"
fbinit = { version = "0.1.2", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
from hermit.
FYI my nightly happens to be brand new, I suppose that could contribute.
nightly-x86_64-unknown-linux-gnu (overridden by '.../hermit/rust-toolchain.toml')
rustc 1.67.0-nightly (b7bc90fea 2022-11-21)
from hermit.
the detcore error persists on cacc346 at my side too. I tried local build and on an empty docker - both gave same results.
my nightly is also the latest.
from hermit.
Jeez, sorry about this. At the current main branch, 6cb5575, it cargo builds for me fine on a Centos Stream 8 server and Fedora 36 laptop (with libunwind). I'm trying this from the rust
/ Debian base image:
git clone [email protected]:facebookexperimental/hermit.git
cd hermit
docker run --volume `pwd`:/build -it --rm --platform linux/amd64 rust:latest
apt-get update && apt-get install -y libunwind-dev
cd /build
cargo update # make sure there is enough memory
cargo build
(and having some trouble with cargo update getting OOM killed.. will update this in a moment)
from hermit.
Interesting. Does your cargo and rustc come from rustup
? Or does debian
have its own installation?
I had not tried cargo update
before but it did not change the results.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.6 LTS
Release: 18.04
Codename: bionic
$ free -m
total used free shared buff/cache available
Mem: 64318 6052 2420 1771 55845 55820
Swap: 32767 2928 29839
$ cargo build | tail
warning: skipping duplicate package `main` found at `/local/mnt/workspace/install/rust/git/checkouts/reverie-9a587e40a0d7d3be/6f03658/experimental/traceviz`
Compiling hermetic_infra_hermit_tests v0.0.0 (/local/mnt/workspace/vp/hermit/tests)
Compiling hermit v0.0.0 (/local/mnt/workspace/vp/hermit/hermit-cli)
Compiling detcore-testutils v0.0.0 (/local/mnt/workspace/vp/hermit/detcore/tests/testutils)
error[E0432]: unresolved import `detcore::preemptions`
--> tests/standalone/stacktrace_events.rs:13:14
|
13 | use detcore::preemptions::PreemptionReader;
| ^^^^^^^^^^^ could not find `preemptions` in `detcore`
$ git show|head
commit 6cb5575ffd287289769144ec82e2900cbf6cd1ad
Author: Ryan Newton <[email protected]>
Date: Tue Nov 22 15:20:46 2022 -0500
Revert "tooling to compare schedules and run midpoints on CLI" (#12)
This reverts commit 56f1390a474d3b123d8fc8d3e734410b593e04f9.
diff --git a/common/edit-distance/src/bubbles.rs b/common/edit-distance/src/bubbles.rs
index fb1ef9b..e3486c5 100644
from hermit.
I am using archlinux, and rustup for rust toolchains.
Anyway, using git bisect I found the earliest commit with a failed build - 66a93ab
Successful build on d37f732
from hermit.
Ah this is the culprit
Line 16 in 6cb5575
Removing this line builds everything all fine on current main
Maybe turn on the CI runs using cargo-action cargo build
one.
hermit/.github/workflows/ci.yml
Lines 19 to 24 in 6cb5575
from hermit.
That being the issue makes me think it's about the difference between what Debian installs for rust:latest and what rustup installs for nightly (I also used rustup).
from hermit.
I am using archlinux, and rustup for rust toolchains.
Anyway, using git bisect I found the earliest commit with a failed build - 66a93ab
Successful build on d37f732
🙂
This commit makes my build succeed but might be worth mentioning that there's a test failure. Not sure how significant it is.
test scheduler::test::test_my_thread_group1 ... FAILED
...
failures:
---- scheduler::test::test_my_thread_group1 stdout ----
thread 'scheduler::test::test_my_thread_group1' panicked at 'Unable to install global subscriber: SetGlobalDefaultError("a global default trace dispatcher has already been set")', /local/mnt/workspace/install/rust/registry/src/github.com-1ecc6299db9ec823/tracing-subscriber-0.3.16/src/fmt/mod.rs:1232:16
from hermit.
@androm3da Does it work with cargo test -- --test-threads=1
?
Edit: Never mind. I can reproduce the failure as well. Looking into it!
from hermit.
main
build is successful now.
$ cargo +nightly install --git https://github.com/facebookexperimental/hermit hermit
$ hermit run date
Sat Jan 1 12:59:59 AM CET 2000
from hermit.
@androm3da Does it work with
cargo test -- --test-threads=1
?
It does. However a different test fails when I use that command line.
$ cargo test -- --test-threads=1
...
test scheduler::replay_cursor::tests::test_peek_nth ... ok
test scheduler::replay_cursor::tests::test_peek_pair ... ok
test scheduler::replay_cursor::tests::test_peek_pair_empty ... ok
test scheduler::replay_cursor::tests::test_peek_pair_one ... ok
test scheduler::test::test_my_thread_group1 ... ok
test scheduler::test::test_my_thread_group2 ... FAILED
test syscalls::files::test::linux_flags_assumptions ... ok
failures:
---- scheduler::test::test_my_thread_group2 stdout ----
thread 'scheduler::test::test_my_thread_group2' panicked at 'Unable to install global subscriber: SetGlobalDefaultError("a global default trace dispatcher has already been set")', /local/mnt/workspace/install/rust/registry/src/github.com-1ecc6299db9ec823/tracing-subscriber-0.3.16/src/fmt/mod.rs:1232:16
failures:
scheduler::test::test_my_thread_group2
test result: FAILED. 41 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s
error: test failed, to rerun pass `-p detcore --lib`
from hermit.
@androm3da Does it work with
cargo test -- --test-threads=1
?It does. However a different test fails when I use that command line.
$ cargo test -- --test-threads=1 ... test scheduler::replay_cursor::tests::test_peek_nth ... ok test scheduler::replay_cursor::tests::test_peek_pair ... ok test scheduler::replay_cursor::tests::test_peek_pair_empty ... ok test scheduler::replay_cursor::tests::test_peek_pair_one ... ok test scheduler::test::test_my_thread_group1 ... ok test scheduler::test::test_my_thread_group2 ... FAILED test syscalls::files::test::linux_flags_assumptions ... ok failures: ---- scheduler::test::test_my_thread_group2 stdout ---- thread 'scheduler::test::test_my_thread_group2' panicked at 'Unable to install global subscriber: SetGlobalDefaultError("a global default trace dispatcher has already been set")', /local/mnt/workspace/install/rust/registry/src/github.com-1ecc6299db9ec823/tracing-subscriber-0.3.16/src/fmt/mod.rs:1232:16 failures: scheduler::test::test_my_thread_group2 test result: FAILED. 41 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s error: test failed, to rerun pass `-p detcore --lib`
We'll fix this particular issue soon. Currently we have a bit of desync problem with our internal repo but at least you can build and try hermit.
from hermit.
This now builds correctly for me (although I then experience #16) so I'm closing this.
from hermit.
@samth The official instructions are incomplete still, like you I had to install the libunwind-dev
OS package under Debian Bullseye. Can you reopen this?
from hermit.
Related Issues (20)
- User docs reference internal FB Workplace instance HOT 3
- panic - 'vdso symbol __vdso_clock_getres's real size is 10 bytes, but trying to replace it with 16 bytes' HOT 15
- warnings while running bash (or programs with line editing)
- Panic on hello world java program HOT 1
- thread 'main' panicked at 'prehook: Missed expected preemption!..'
- Question: Is scheduler preemptive? HOT 2
- Cargo test failed on two cases HOT 3
- DrRacket hangs under hermit HOT 1
- RFC: A plan for open source integration tests HOT 2
- Support go hello world at least HOT 6
- Implement key management (keyctl and friends)
- error[E0599]: no method named `force_pretty` found for struct `reverie::Backtrace` HOT 2
- intercepted.cpuid(eax).unwrap() panics HOT 1
- CockroachDB hangs under hermit
- Adding syscall semantics fuzzing -- beyond thread interleavings HOT 3
- Unsupported processor with feature info
- Support for rustc stable
- Document `record` data format
- Characterize overhead
- feat: Producing SLSA provenance for reproducible builds using Hermit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hermit.