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

Don't unwrap work item results as the panic trace is useless #45019

Merged
merged 1 commit into from
Oct 5, 2017

Conversation

aidanhs
Copy link
Member

@aidanhs aidanhs commented Oct 4, 2017

Fixes #43402 now there's no multithreaded panic printouts

Also update a comment


Likely regressed in #43506, where the code was changed to panic in worker threads on error.

Unwrapping gives zero extra information since the stack trace is so short, so we may as well just surface that there was an error and exit the thread properly. Because there are then no multithreaded printouts, I think it should mean the output of the test for #26199 is deterministic and not interleaved (thanks to @philipc #43402 (comment) for a hint).

Sadly the output is now:

thread '<unnamed>' panicked at 'aborting due to worker thread panic', src/librustc_trans/back/write.rs:1643:20
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: could not write output to : No such file or directory

error: aborting due to previous error

but it's an improvement over the multi-panic situation before.

r? @alexcrichton

Fixes rust-lang#43402 now there's no multithreaded panic printouts

Also update a comment
@alexcrichton
Copy link
Member

@bors: r+

Nice!

@bors
Copy link
Contributor

bors commented Oct 4, 2017

📌 Commit 4a6ede7 has been approved by alexcrichton

@aidanhs
Copy link
Member Author

aidanhs commented Oct 5, 2017

@bors p=1

Fixes spurious failure (hopefully)

@michaelwoerister
Copy link
Member

Nice find!

@bors
Copy link
Contributor

bors commented Oct 5, 2017

⌛ Testing commit 4a6ede7 with merge abef7e1...

bors added a commit that referenced this pull request Oct 5, 2017
…hton

Don't unwrap work item results as the panic trace is useless

Fixes #43402 now there's no multithreaded panic printouts

Also update a comment

--------

Likely regressed in #43506, where the code was changed to panic in worker threads on error.

Unwrapping gives zero extra information since the stack trace is so short, so we may as well just surface that there was an error and exit the thread properly. Because there are then no multithreaded printouts, I think it should mean the output of the test for #26199 is deterministic and not interleaved (thanks to @philipc #43402 (comment) for a hint).

Sadly the output is now:
```
thread '<unnamed>' panicked at 'aborting due to worker thread panic', src/librustc_trans/back/write.rs:1643:20
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: could not write output to : No such file or directory

error: aborting due to previous error
```
but it's an improvement over the multi-panic situation before.

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Oct 5, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing abef7e1 to master...

@bors bors merged commit 4a6ede7 into rust-lang:master Oct 5, 2017
@bors bors mentioned this pull request Oct 5, 2017
@aidanhs aidanhs deleted the aphs-no-trans-worker-panic branch October 5, 2017 13:28
bors added a commit that referenced this pull request Oct 9, 2017
…chton

Don't panic in the coordinator thread, bubble up the failure

Fixes #43402 (take 2)

Followup to #45019, this makes the coordinator thread not panic on worker failures since they can be reported reasonably back in the main thread.

The output also now has no evidence of backtraces at all, unlike the previous PR:
```
$ ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc -o "" x.rs
error: could not write output to : No such file or directory

error: aborting due to previous error
```

r? @alexcrichton
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.

4 participants