-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
BUG fuzzing found a bug in the resolver, we need a complete set of conflicts to do backjumping #5988
Conversation
r? @matklad (rust_highfive has picked a reviewer for you, use r? to override) |
4fc1071
to
a875816
Compare
Edit: I was wrong about what can fix the problem. I came across @alexcrichton's prescient comment #5187 (comment). This is exactly the kind of bug he was worried about. Furthermore, it was found with the |
commenting out cargo/src/cargo/core/resolver/mod.rs Lines 833 to 838 in 2fb77a4
This is a brain dump of all the things I can think of that are relevant, as I don't know how they fit together. This is code that prunes the I tried running the test with trace logging and I got (edited to the relevant parts):
So this is how I read that:
Why don't we keep track of more of the Why don't we just disable this optimization for now? Well several of the tests hang if we leave it commented out. |
d942236
to
69e00e8
Compare
I found an odd hack that gets this one to pass. I am going back to the proptest branch to find a new case to shrink. Mabey looking at another example will help me to see a solution. |
I shrank 2 more examples. I think the |
Expanding the |
The merged version of the proptest branch ran smoothly, and the performance related resolver test are not strongly affected. So I think this is ready for review. |
@bors: r+ Looks great to me, thanks so much for tracking this down! |
📌 Commit 9b2295d has been approved by |
⌛ Testing commit 9b2295d with merge f2b861dd23abb6ea7f25e7cd46ac4a508bbeec38... |
💔 Test failed - status-appveyor |
|
I've been trying to figure out why things changed, but I don't see a good reason. The differences are:
The only thing that's changed recently is that termcolor released a 1.0.4 version 4 days ago, but tests were passing yesterday, and a newer version shouldn't affect things. I don't see why the |
We sort dependencies from most constrained to least. So it is possible that the number of unused versions of a crate can change the resolution. |
I bisected the index and the publishing of Well, it seems clear that termcolor 0.3.0's dependency on wincolor 0.1.1 doesn't satisfy the minimal dependencies. How do we typically fix that? |
So I don't think we have been doing this for long enough to have a "typically" yet. For the case of trying to get it setup we have some advice #5657 (comment) But this is the first time we have hit this form. I'd try:
I am working on a complicated patch to try #5921 (comment) but can jump in a little while. |
I could not reproduce on the nightly I was using, but > cargo tree -i -p termcolor:0.3.0
Updating crates.io index
termcolor v0.3.0
└── env_logger v0.5.4
└── cargo v0.30.0 (file:///C:/Users/finkelman.SEMCOGDOM/Documents/MyProjects/cargo) So I am trying bumping are |
@bors: r+ |
📌 Commit 682b295 has been approved by |
BUG fuzzing found a bug in the resolver, we need a complete set of conflicts to do backjumping As mentioned in #5921 (comment), the new proptest found a live bug! This PR so far tracs my attempt to minimize the problematic input. The problem turned out to be that we where backjumping on incomplete set of conflicts.
☀️ Test successful - status-appveyor, status-travis |
As mentioned in #5921 (comment), the new proptest found a live bug! This PR so far tracs my attempt to minimize the problematic input.
The problem turned out to be that we where backjumping on incomplete set of conflicts.