Skip to content

Make the deadlock panic clearly refer to a deadlock#115668

Merged
bors merged 1 commit into
rust-lang:masterfrom
Zoxc:deadlock-msg
Sep 10, 2023
Merged

Make the deadlock panic clearly refer to a deadlock#115668
bors merged 1 commit into
rust-lang:masterfrom
Zoxc:deadlock-msg

Conversation

@Zoxc

@Zoxc Zoxc commented Sep 8, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@rustbot

rustbot commented Sep 8, 2023

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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

jackh726 commented Sep 9, 2023

Copy link
Copy Markdown
Member

@bors r+ rollup

@bors

bors commented Sep 9, 2023

Copy link
Copy Markdown
Collaborator

📌 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

bors commented Sep 10, 2023

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 68ffa33 with merge ffe131f...

@bors

bors commented Sep 10, 2023

Copy link
Copy Markdown
Collaborator

☀️ 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
Copy Markdown
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