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

include source error for LoadLibraryExW #110932

Merged
merged 1 commit into from
Apr 29, 2023
Merged

include source error for LoadLibraryExW #110932

merged 1 commit into from
Apr 29, 2023

Conversation

sameer
Copy link

@sameer sameer commented Apr 28, 2023

In #107595, we added retry behavior for LoadLibraryExW on Windows. If it fails we do not print the underlying error that Windows returned. This made #110889 a little harder to debug.

In this PR I am adding the source error in the message if it is available.

@rustbot
Copy link
Collaborator

rustbot commented Apr 28, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added 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 Apr 28, 2023
@rust-log-analyzer

This comment has been minimized.

@michaelwoerister
Copy link
Member

Thanks for the PR, @sameer! I can take the review.
r? @michaelwoerister

@rustbot rustbot assigned michaelwoerister and unassigned oli-obk Apr 28, 2023
@michaelwoerister
Copy link
Member

Do you have an example of what the error output looks like?

@sameer
Copy link
Author

sameer commented Apr 28, 2023

Do you have an example of what the error output looks like?

Yes the current output is just as described in #110889: error: LoadLibraryExW failed (retried 5 times). With this change, it will now show the underlying error in parentheses: error: LoadLibraryExW (<src error>) failed (retried 5 times)

@sameer
Copy link
Author

sameer commented Apr 28, 2023

Without that you have to run rustc with windbg to try and pull it out. Which is not always easy if the failure is happening in CI and is difficult to repro locally

@michaelwoerister
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 28, 2023

📌 Commit 4762bb88aa07330c82b36aef77780e2b189e64c6 has been approved by michaelwoerister

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 28, 2023

🌲 The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened.

@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 Apr 28, 2023
@michaelwoerister
Copy link
Member

@bors r-

@sameer, could you please squash the two commits?

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 28, 2023
@sameer
Copy link
Author

sameer commented Apr 28, 2023

@bors r-

@sameer, could you please squash the two commits?

Done!

@michaelwoerister
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 28, 2023

📌 Commit 24adb1f has been approved by michaelwoerister

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Apr 28, 2023

🌲 The tree is currently closed for pull requests below priority 50. This pull request will be tested once the tree is reopened.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 28, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 29, 2023
include source error for LoadLibraryExW

In rust-lang#107595, we added retry behavior for LoadLibraryExW on Windows. If it fails we do not print the underlying error that Windows returned. This made rust-lang#110889 a little harder to debug.

In this PR I am adding the source error in the message if it is available.
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 29, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#110614 (Clear response values for overflow in new solver)
 - rust-lang#110894 (Bump libffi-sys to 2.3.0)
 - rust-lang#110932 (include source error for LoadLibraryExW)
 - rust-lang#110958 (Make sure that some stdlib method signatures aren't accidental refinements)
 - rust-lang#110962 (Make drop_flags an IndexVec.)
 - rust-lang#110965 (Don't duplicate anonymous lifetimes for async fn in traits)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 650f8fd into rust-lang:master Apr 29, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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