-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Prevent fmt::Arguments from being shared across threads #45198
Conversation
I would prefer to put a |
Done r? @arielb1 |
@@ -12,6 +12,7 @@ | |||
// aux-build:span-test-macros.rs | |||
|
|||
// ignore-pretty | |||
// ignore-stage1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you changing a test that should be unaffected? Is this only for the snapshot? In that case, I think you should add a SNAP: remove after snapshot
comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been testing the fmt::Arguments changes on stage 1, but it keeps failing on this test even without my changes. Someone forgot to add the flag, which is required for most proc-macro tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it has anything to do with snapshots, just with compiler plugins. I can remove this comment from this PR. It's just an annoyance I encountered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed and squashed
@bors r+ |
📌 Commit 787f9f4 has been approved by |
Umm I would actually rather like a comment on @bors r- |
@bors r+ |
📌 Commit dc7de37 has been approved by |
@bors rollup |
@arielb1 |
Prevent fmt::Arguments from being shared across threads Fixes rust-lang#45197 This is a **breaking change**! Without doing this it's very easy to create race conditions. There's probably a way to do this without breaking valid use cases, but it would require quite an overhaul of the formatting machinery.
@bors r- |
@rust-lang/libs -- nominating for discussion, I think this (as a breaking change) deserves some discussion before merging. |
Ideally we'd have a crater run to evaluate the impact here, but on the other hand it's not like we're not going to fix this. Rather, we may fix it more slowly if this ends up having a lot of fallout. In any case I'd personally be ok landing this as-is as it's on nightly and we can always revert it if the problem is too widespread. |
I agree. It seems pretty unlikely to me that anyone is writing code that depends on the Send or Sync-ness here. |
Sure. Only the latter prevents OIBITs. |
Whereas |
It "accidentally" prevents |
@bors try Well, I'll start a try build so that we can get a cargobomb run complete sooner should we decide to go that route. I don't think we should merge without results from that, but am fine with being overruled. |
⌛ Trying commit dc7de37 with merge e7aa529cd92736ab0f7400ad33835c5f64e93fc7... |
@aidanhs just checking in, is this unblocked now to get another crater run? |
@kennytm oh to answer your question I think it's ok to use the same artifacts from before. |
Crater run started. |
@aidanhs Did crater finish this? |
Crater results: http://cargobomb-reports.s3.amazonaws.com/pr-45198-2/index.html |
@dpc it looks like the slog fix was merged into the 1.5.0 branch, but not the 1.x.y branch from which you released slog-1.6.0. |
Oh my. Sorry. I've added it to the |
@aidanhs @Mark-Simulacrum looks like this might need another crater run? |
It'll probably be at least 8-10 days before Crater is ready for this PR -- we have 2 in queue right now. If the last Crater run only recorded problems due to slog failing, them I'm somewhat inclined to just push this through -- @rust-lang/libs: What do you think? We'll run crater on beta anyway, so I'm not too worried... |
Could we just run a "mini-crater" test on those 62 regressed crates? |
Seems possible, not sure -- @aidanhs may be able to comment on that, I don't know crater internals well enough to. |
It has now been over a month. I am going to r+ this thing in an hour unless someone strenuously objects. |
@bors r=sfackler Yeah, we should've pushed this through faster. I believe there are no significant remaining concerns, and beta just branched, so I'm happy to let this bake on nightly. |
📌 Commit dc7de37 has been approved by |
@bors rollup- Better not to roll this up given the potential breakage. |
Prevent fmt::Arguments from being shared across threads Fixes #45197 This is a **breaking change**! Without doing this it's very easy to create race conditions. There's probably a way to do this without breaking valid use cases, but it would require quite an overhaul of the formatting machinery.
☀️ Test successful - status-appveyor, status-travis |
Fixes #45197
This is a breaking change! Without doing this it's very easy to create race conditions.
There's probably a way to do this without breaking valid use cases, but it would require quite an overhaul of the formatting machinery.