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

Update sysinfo to 0.30.8 #123378

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

Hoverbear
Copy link
Contributor

Fixes a Mac specific issue when using metrics = true in config.toml.

# Collect information and statistics about the current build and writes it to
# disk. Enabling this or not has no impact on the resulting build output. The
# schema of the file generated by the build metrics feature is unstable, and
# this is not intended to be used during local development.
metrics = true

During repeated builds, as the generated metrics.json grew, eventually refresh_cpu() would be called in quick enough succession (specifically: under 200ms) that a divide by zero would occur, leading to a NaN which would not be serialized, then when the metrics.json was re-read it would fail to parse.

That error looks like this (collected from Ferrocene's CI):

   Compiling rustdoc-tool v0.0.0 (/Users/distiller/project/src/tools/rustdoc)
    Finished release [optimized] target(s) in 38.37s
thread 'main' panicked at src/utils/metrics.rs:180:21:
serde_json::from_slice::<JsonRoot>(&contents) failed with invalid type: null, expected f64 at line 1 column 9598
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:40

Exited with code exit status 1

Related: GuillaumeGomez/sysinfo#1236

@rustbot
Copy link
Collaborator

rustbot commented Apr 2, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 2, 2024
@rustbot
Copy link
Collaborator

rustbot commented Apr 2, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Cargo.lock Outdated Show resolved Hide resolved
Fixes a Mac specific issue when using `build-metrics = true` in `config.toml`
@Noratrieb
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 2, 2024

📌 Commit b626f01 has been approved by Nilstrieb

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 2, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 2, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#123198 (Add fn const BuildHasherDefault::new)
 - rust-lang#123226 (De-LLVM the unchecked shifts [MCP#693])
 - rust-lang#123302 (Make sure to insert `Sized` bound first into clauses list)
 - rust-lang#123348 (rustdoc: add a couple of regression tests)
 - rust-lang#123362 (Check that nested statics in thread locals are duplicated per thread.)
 - rust-lang#123368 (CFI: Support non-general coroutines)
 - rust-lang#123375 (rustdoc: synthetic auto trait impls: accept unresolved region vars for now)
 - rust-lang#123378 (Update sysinfo to 0.30.8)

Failed merges:

 - rust-lang#123349 (Fix capture analysis for by-move closure bodies)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 31900b4 into rust-lang:master Apr 2, 2024
11 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 2, 2024
Rollup merge of rust-lang#123378 - ferrocene:hoverbear/bump-sysinfo-to-0.30.8, r=Nilstrieb

Update sysinfo to 0.30.8

Fixes a Mac specific issue when using `metrics = true` in `config.toml`.

```config.toml
# Collect information and statistics about the current build and writes it to
# disk. Enabling this or not has no impact on the resulting build output. The
# schema of the file generated by the build metrics feature is unstable, and
# this is not intended to be used during local development.
metrics = true
```

During repeated builds, as the generated `metrics.json` grew, eventually `refresh_cpu()` would be called in quick enough succession (specifically: under 200ms) that a divide by zero would occur, leading to a `NaN` which would not be serialized, then when the `metrics.json` was re-read it would fail to parse.

That error looks like this (collected from Ferrocene's CI):

```
   Compiling rustdoc-tool v0.0.0 (/Users/distiller/project/src/tools/rustdoc)
    Finished release [optimized] target(s) in 38.37s
thread 'main' panicked at src/utils/metrics.rs:180:21:
serde_json::from_slice::<JsonRoot>(&contents) failed with invalid type: null, expected f64 at line 1 column 9598
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:40

Exited with code exit status 1
```

Related: GuillaumeGomez/sysinfo#1236
@rustbot rustbot added this to the 1.79.0 milestone Apr 2, 2024
@pietroalbini pietroalbini deleted the hoverbear/bump-sysinfo-to-0.30.8 branch April 3, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants