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

Fix setting O_NONBLOCK in parallel::stderr::set_non_blocking #946

Merged
merged 5 commits into from
Feb 16, 2024

Conversation

NobodyXu
Copy link
Collaborator

fix #945

@NobodyXu NobodyXu changed the title Update stderr.rFix setting O_NONBLOCK in parallel::stderr::set_non_blocking Fix setting O_NONBLOCK in parallel::stderr::set_non_blocking Feb 13, 2024
@NobodyXu
Copy link
Collaborator Author

cc @rtyler can you test this please?

@rtyler
Copy link

rtyler commented Feb 13, 2024

  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-2" "-fno-omit-frame-pointer" "-m64" "--target=x86_64-unknown-freebsd" "-I" "zstd/lib/" "-I" "zstd/lib/common" "-I" "zstd/lib/legacy" "-fvisibility=hidden" "-ffunction-sections" "-fdata-sections" "-fmerge-all-constants" "-DZSTD_LIB_DEPRECATED=0" "-DXXH_PRIVATE_API=" "-DZSTDLIB_VISIBILITY=" "-DZDICTLIB_VISIBILITY=" "-DZSTDERRORLIB_VISIBILITY=" "-DZSTD_LEGACY_SUPPORT=1" "-o" "/home/tyler/zofast/zstd-rs/zstd-safe/zstd-sys/target/debug/build/zstd-sys-2363cb2b961a1de2/out/8957a4c8b028b07b-debug.o" "-c" "zstd/lib/common/debug.c"

  --- stderr
  thread 'main' panicked at /home/tyler/.cargo/git/checkouts/cc-rs-85fc25d64a0d5ded/0042c70/src/parallel/stderr.rs:17:9:
  assertion `left == right` failed: stderr should have no flags set
    left: 2
   right: 0
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
durian% nvim Cargo.toml
durian% cargo build
    Updating git repository `https://github.com/rust-lang/cc-rs`
   Compiling cc v1.0.85 (https://github.com/rust-lang/cc-rs?branch=NobodyXu-patch-1#aff20bf7)
   Compiling zstd-sys v2.0.9+zstd.1.5.5 (/home/tyler/zofast/zstd-rs/zstd-safe/zstd-sys)
    Finished dev [unoptimized + debuginfo] target(s) in 6.70s
durian%

Looks promising to me!

@NobodyXu
Copy link
Collaborator Author

@rtyler Thanks! I will get this merge and cut a release soon!

Refactor it to use `parallel::stderr::set_non_blocking`, so that there's
only one implementation and it would fix the bug.

Signed-off-by: Jiahao XU <[email protected]>
Since it would only be useful on Unix.

Signed-off-by: Jiahao XU <[email protected]>
@dpaoliello
Copy link
Contributor

@Mark-Simulacrum gentle reminder to review this - it's blocking updates of cc-rs in the Rust compiler

@NobodyXu NobodyXu merged commit df59d43 into main Feb 16, 2024
36 checks passed
@NobodyXu NobodyXu deleted the NobodyXu-patch-1 branch February 16, 2024 00:14
@dpaoliello
Copy link
Contributor

@NobodyXu can we please get a release with this change, or do you think it'd be OK to use 1.0.85 (I don't know what the implications of this issue would be)

@NobodyXu
Copy link
Collaborator Author

Yes I do want to cut a new release, but I'm worried about the regression in #948

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1.0.85 on FreeBSD breaks with assertion failure "stderr should have no flags set"
4 participants