Skip to content

Commit

Permalink
[meta] set strip = none for release builds
Browse files Browse the repository at this point in the history
Restore behavior changed in 4e259a7, because
it turns out that `strip = "debuginfo"` still strips too much.

This was observed with the cargo-nextest 0.9.68-rc.1 binary on illumos, where
`pstack` showed lots of ??? marks.

Part of #1345.
  • Loading branch information
sunshowers committed Mar 16, 2024
1 parent ef58431 commit d4f982b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Cargo.toml
Expand Up @@ -35,6 +35,11 @@ opt-level = 3
[profile.dev.package.similar]
opt-level = 3

[profile.release]
# Ensure that symbols and debuginfo aren't stripped. They're useful for debugging issues with
# nextest in the field, and don't bloat up binaries too much
strip = "none"

[patch.crates-io]
nextest-workspace-hack = { path = "workspace-hack" }

Expand Down
2 changes: 1 addition & 1 deletion site/src/CHANGELOG.md
Expand Up @@ -3,7 +3,7 @@
This page documents new features and bugfixes for cargo-nextest. Please see the [stability
policy](book/stability.md) for how versioning works with cargo-nextest.

## [0.9.68-rc.1] - 2024-03-16
## [0.9.68-rc.2] - 2024-03-16

This is a maintenance release with many internal improvements, and preparation for future features.

Expand Down

4 comments on commit d4f982b

@taiki-e
Copy link
Contributor

Choose a reason for hiding this comment

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

This was observed with the cargo-nextest 0.9.68-rc.1 binary on illumos, where pstack showed lots of ??? marks.

This seems to be an illumos version of rust-lang/rust#122857.

Could you open an issue at rust-lang/rust?
Then I think we can avoid doing strip debuginfo on illumos as we have done for MSVC. (rust-lang/cargo#13630 / taiki-e/upload-rust-binary-action#69)

@sunshowers
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks -- so I'm not actually sure what's going on since I can't repro this on illumos with a simple example. Even strip = "none" seems to cause the data to be shown in pstack, even though I verified it's not in the ELF at all.

I have a repo at https://github.com/sunshowers/pstack-test and will keep following up on this as time permits.

@sunshowers
Copy link
Member Author

Choose a reason for hiding this comment

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

@taiki-e
Copy link
Contributor

@taiki-e taiki-e commented on d4f982b Mar 28, 2024

Choose a reason for hiding this comment

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

This seems to be an illumos version of rust-lang/rust#122857.

I tried to find out how strip=debuginfo works in illumos, but it seems to work in a different way than MSVC and actually uses a similar way to macOS (rust-lang/rust#102418).

It seems that PR (102418) assumes that the /usr/bin/strip is the illumos native strip utility, and since the strip command on linux basically only supports platforms the same as the host (rust-lang/rust#114411, taiki-e/upload-rust-binary-action#8), it is not surprising that it would work oddly in a cross-compilation.

I have not actually tested anything, but if it is a strip=debuginfo bug, I'm thinking that illumos may need rust-lang/rust#123151 as well as macOS.

Please sign in to comment.