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

hermit-fb: init at 0-unstable-2024-05-01 #265212

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MatthewCroughan
Copy link
Contributor

Description of changes

Adds hermit from Facebook to nixpkgs. I have named it hermit-fb due to a naming clash with the hermit font.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@MatthewCroughan
Copy link
Contributor Author

doCheck = false because tests fail like this:

hermit-unstable> running 3 tests
hermit-unstable> test has_rdrand_without_detcore ... ok
hermit-unstable> 2023-11-03T11:56:16.702750Z  INFO detcore::scheduler::runqueue: DETLOG SCHEDRAND: seeding scheduler runqueue with seed 0
hermit-unstable> 2023-11-03T11:56:16.702749Z  INFO detcore::scheduler::runqueue: DETLOG SCHEDRAND: seeding scheduler runqueue with seed 0
hermit-unstable> 2023-11-03T11:56:16.703483Z  INFO detcore::tool_local: DETLOG USER RAND: seeding PRNG for root thread with seed 0
hermit-unstable> 2023-11-03T11:56:16.703489Z  INFO detcore::tool_local: DETLOG USER RAND: seeding PRNG for root thread with seed 0
hermit-unstable> 2023-11-03T11:56:16.703492Z  INFO detcore::tool_local: DETLOG CHAOSRAND: seeding chaos scheduler with seed 0
hermit-unstable> 2023-11-03T11:56:16.703497Z  INFO detcore::tool_local: DETLOG CHAOSRAND: seeding chaos scheduler with seed 0
hermit-unstable> 2023-11-03T11:56:16.717579Z  INFO detcore::tool_global: detcore shut down, destroying global state
hermit-unstable> 2023-11-03T11:56:16.717580Z  INFO detcore::tool_global: detcore shut down, destroying global state
hermit-unstable> test getrandom_intercepted ... FAILED
hermit-unstable> test rdrand_rdseed_is_masked ... FAILED
hermit-unstable> failures:
hermit-unstable> ---- getrandom_intercepted stdout ----
hermit-unstable> Expecting determinism:
hermit-unstable> Test Run 1:
hermit-unstable> thread 'getrandom_intercepted' panicked at 'Unsupported processor with feature info: FeatureInfo { extended_family_id: 10, extended_model_id: 2, family_id: 25, model_id: 33, stepping_id: 0, brand_index: 0, cflush_cache_line_size: 8, initial_local_apic_id: 22, max_logical_processor_ids: 32, edx_ecx: SSE3 | PCLMULQDQ | MONITOR | SSSE3 | FMA | CMPXCHG16B | SSE41 | SSE42 | X2APIC | MOVBE | POPCNT | AESNI | XSAVE | OSXSAVE | AVX | F16C | RDRAND | FPU | VME | DE | PSE | TSC | MSR | PAE | MCE | CX8 | APIC | SEP | MTRR | PGE | MCA | CMOV | PAT | PSE36 | CLFSH | MMX | FXSR | SSE | SSE2 | HTT }
hermit-unstable>  Full family_model: (25, 33)', /build/cargo-vendor-dir/reverie-ptrace-0.1.0/src/timer.rs:76:16
hermit-unstable> ---- rdrand_rdseed_is_masked stdout ----
hermit-unstable> Expecting determinism:
hermit-unstable> Test Run 1:
hermit-unstable> thread 'rdrand_rdseed_is_masked' panicked at 'Unsupported processor with feature info: FeatureInfo { extended_family_id: 10, extended_model_id: 2, family_id: 25, model_id: 33, stepping_id: 0, brand_index: 0, cflush_cache_line_size: 8, initial_local_apic_id: 7, max_logical_processor_ids: 32, edx_ecx: SSE3 | PCLMULQDQ | MONITOR | SSSE3 | FMA | CMPXCHG16B | SSE41 | SSE42 | X2APIC | MOVBE | POPCNT | AESNI | XSAVE | OSXSAVE | AVX | F16C | RDRAND | FPU | VME | DE | PSE | TSC | MSR | PAE | MCE | CX8 | APIC | SEP | MTRR | PGE | MCA | CMOV | PAT | PSE36 | CLFSH | MMX | FXSR | SSE | SSE2 | HTT }
hermit-unstable>  Full family_model: (25, 33)', /build/cargo-vendor-dir/reverie-ptrace-0.1.0/src/timer.rs:76:16
hermit-unstable> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
hermit-unstable> failures:
hermit-unstable>     getrandom_intercepted
hermit-unstable>     rdrand_rdseed_is_masked
hermit-unstable> test result: FAILED. 1 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
hermit-unstable> error: test failed, to rerun pass `-p detcore --test tests_misc`

@JulienMalka
Copy link
Member

JulienMalka commented Nov 3, 2023

Superseeding #212278

];

meta = with lib; {
description = "Hermit launches linux x86_64 programs in a special, hermetically isolated sandbox to control their execution. Hermit translates normal, nondeterministic behavior, into deterministic, repeatable behavior. This can be used for various applications, including replay-debugging, reproducible artifacts, chaos mode concurrency testing and bug analysis";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change this to a one line description, eventually having the complete one in longDescription ?

@MatthewCroughan MatthewCroughan force-pushed the mc/hermit branch 2 times, most recently from 7e8a325 to 7d16666 Compare May 2, 2024 15:32
@MatthewCroughan MatthewCroughan changed the title hermit-fb: init at unstable-2023-10-21 hermit-fb: init at 0-unstable-2024-05-01 May 2, 2024
homepage = "https://github.com/facebookexperimental/hermit.git";
license = licenses.bsd3;
maintainers = with maintainers; [ matthewcroughan ];
mainProgram = "hermit";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mainProgram = "hermit";
mainProgram = "hermit";
platforms = [ "x86_64-linux" ];

ln -s ${./Cargo.lock} Cargo.lock
'';

RUSTC_BOOTSTRAP=1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RUSTC_BOOTSTRAP=1;
env.RUSTC_BOOTSTRAP = 1;

@@ -0,0 +1,52 @@
{ lib
, rustPlatform
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format with the new formatter.

hash = "sha256-uzOczLGGSaAILwaDh0WKgs/JeMo3B6tOkNhEIhtBORQ=";
};

cargoLock = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that #349360 is available, there is no need to copy the lockfile here.

@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants