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

Failures due to SIGSEGV no longer output noisily #988

Closed
workingjubilee opened this issue Oct 23, 2023 · 3 comments · Fixed by #990
Closed

Failures due to SIGSEGV no longer output noisily #988

workingjubilee opened this issue Oct 23, 2023 · 3 comments · Fixed by #990

Comments

@workingjubilee
Copy link
Member

Recent-ish (before October 19th?) changes in how the Rust Playground receives/collects/sends data have confounded its ability to collect the stderr of the program and output it, such that when the result is due to e.g. a SIGSEGV, it outputs nothing. This has resulted in considerable confusion, as people are expecting it to segfault noisily.

Does rustc's signal handler need to better-support output redirection in order to restore this, or is it purely incidental?

@DoubleHyphen
Copy link

fn main() {
    eprintln!("I'm printing to stderr");
}

↑ This appears to work as intended. Thus, stderr works at least some of the time.

@shepmaster shepmaster changed the title Silenced stderr printing? Failures due to SIGSEGV no longer output noisily Oct 23, 2023
@shepmaster
Copy link
Member

We recently changed how the program is run. Previously, the playground server would Command::spawn -> docker -> bash -> timeout -> cargo. Now it does Command::spawn -> docker -> worker -> Command::spawn -> cargo.

Notably, the thing that previously printed out the segfault notification (either bash or timeout, I'm not sure) is no longer in the flow and the playground code gets the exit status directly. Likely I need to use something like ExitStatusExt::signal.

@DoubleHyphen
Copy link

Just tried it on the playground, and yes, the issue appears fixed.

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 a pull request may close this issue.

3 participants