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

[Merged by Bors] - Downgrade ADX check to a warning #1846

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions book/src/installation-binaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,17 @@ Each binary is contained in a `.tar.gz` archive. For this example, lets use the
1. Test the binary with `./lighthouse --version` (it should print the version).
1. (Optional) Move the `lighthouse` binary to a location in your `PATH`, so the `lighthouse` command can be called from anywhere.
- E.g., `cp lighthouse /usr/bin`

## Troubleshooting

If you get a SIGILL (exit code 132), then your CPU is incompatible with the optimized build
Copy link
Member

Choose a reason for hiding this comment

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

I guess this concept also applies to "Build from Source" as well. I notice it doesn't have any info about portability.

I'll leave it up to you to decide if you want to address that here.

Copy link
Member Author

Choose a reason for hiding this comment

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

It shouldn't apply to source builds unless the user forces ADX on by bypassing the makefile, or moves a binary from an ADX machine to a non-ADX one. For now I'm in favour of merging ASAP, and we can add a note later if people run into it

of Lighthouse and you should switch to the `-portable` build. In this case, you will see a
warning like this on start-up:

```
WARN CPU seems incompatible with optimized Lighthouse build, advice: If you get a SIGILL, please try Lighthouse portable build
```

On some VPS providers, the virtualization can make it appear as if CPU features are not available,
even when they are. In this case you might see the warning above, but so long as the client
continues to function it's nothing to worry about.
16 changes: 9 additions & 7 deletions lighthouse/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,6 @@ fn run<E: EthSpec>(
));
}

#[cfg(all(feature = "modern", target_arch = "x86_64"))]
if !std::is_x86_feature_detected!("adx") {
return Err(format!(
"CPU incompatible with optimized binary, please try Lighthouse portable build"
));
}

let debug_level = matches
.value_of("debug-level")
.ok_or_else(|| "Expected --debug-level flag".to_string())?;
Expand Down Expand Up @@ -232,6 +225,15 @@ fn run<E: EthSpec>(
);
}

#[cfg(all(feature = "modern", target_arch = "x86_64"))]
if !std::is_x86_feature_detected!("adx") {
warn!(
log,
"CPU seems incompatible with optimized Lighthouse build";
"advice" => "If you get a SIGILL, please try Lighthouse portable build"
);
}

// Note: the current code technically allows for starting a beacon node _and_ a validator
// client at the same time.
//
Expand Down