Skip to content

Make the deadlock panic clearly refer to a deadlock #115668

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

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Sep 8, 2023

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Sep 8, 2023

r? @jackh726

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 8, 2023
Comment on lines +555 to +557
if !found_cycle {
panic!("deadlock detected");
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if !found_cycle {
panic!("deadlock detected");
}
assert!(found_cycle, "deadlock detected");

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went with panic! for the cleaner error message here.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I probably confused it with the assert_eq! variants which does have the assertion failed prefix. I prefer the explicit if as the message doesn't directly describe the assertion condition anyway.

@jackh726
Copy link
Member

jackh726 commented Sep 9, 2023

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 9, 2023

📌 Commit 68ffa33 has been approved by jackh726

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 Sep 9, 2023
@bors
Copy link
Collaborator

bors commented Sep 10, 2023

⌛ Testing commit 68ffa33 with merge ffe131f...

@bors
Copy link
Collaborator

bors commented Sep 10, 2023

☀️ Test successful - checks-actions
Approved by: jackh726
Pushing ffe131f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 10, 2023
@bors bors merged commit ffe131f into rust-lang:master Sep 10, 2023
@rustbot rustbot added this to the 1.74.0 milestone Sep 10, 2023
@Zoxc Zoxc deleted the deadlock-msg branch September 10, 2023 05:53
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ffe131f): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.1% [2.1%, 2.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.9% [1.9%, 1.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.9% [1.9%, 1.9%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 629.717s -> 629.667s (-0.01%)
Artifact size: 317.90 MiB -> 317.82 MiB (-0.03%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants