Replace loom with shuttle#876
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #876 will not alter performanceComparing Summary
|
16c320c to
e430505
Compare
MichaReiser
left a comment
There was a problem hiding this comment.
This is awesome. I also love that this simplifies the code again. I've a small comment but I think this is ready to go
| #[cfg(feature = "shuttle")] | ||
| let data = unsafe { | ||
| let data = (0..PAGE_LEN) | ||
| .map(|_| UnsafeCell::new(MaybeUninit::uninit())) | ||
| .collect::<Box<[PageDataEntry<T>]>>(); |
There was a problem hiding this comment.
We could consider using this branch in debug builds because Rust doesn't inline the call without optimizations enabled. We've seen this in ty where the Project table takes 0.5 of stack frame!
| } | ||
| if current_deps.durability < data.durability { | ||
| data.revisions = C::new_revisions(current_deps.changed_at); | ||
| // UNSAFE: Marking as mut requires exclusive access for the duration of |
There was a problem hiding this comment.
I didn't review those changes too carefully because I understand that these are just reverting earlier changes?
There was a problem hiding this comment.
Yeah the changes are mostly just indentation because the with closure is removed.
e430505 to
aaa43a5
Compare
tests/parallel/signal.rs
Outdated
| // synchronous. | ||
| if stage > 0 { | ||
| let mut v = self.value.lock(); | ||
| let mut v = self.value.lock().unwrap(); |
There was a problem hiding this comment.
I wonder if we should disable the signals in shuttle tests? The signals are to construct a very specific scenario, defeating the benefit of shuttle - testing many possible scenarios.
249b2a1 to
273e915
Compare
|
It looks like shuttle caught a failure in the cycle tests! |
|
Here's the failing tests: I dunno what you're planning on doing, but maybe we should just land this branch and fix failing tests as we build out the Shuttle test suite? |
I plan to look into this next week |
| @@ -1,3 +1,6 @@ | |||
| // Shuttle doesn't like panics inside of its runtime. | |||
There was a problem hiding this comment.
how fixable is this limit in shuttle?
There was a problem hiding this comment.
I'm not sure, it looks like shuttle has a panic hook that cancels the execution immediately if anything panics. It seems like this is pretty fundamental to replay support.
sure! just so that I understand: do you want to fix the failing test prior to landing this PR or do you want this PR to fix the already-surfaced test failure? (I ask because I'm sure Shuttle can find many more failing tests) |
It depends on how much progress I make ;) I'm also fine diabling this specific test for now and landing this PR
Sure, but it depends on if we land new changes :) |
Sorry! I'm assuming that we'd be adding new tests/features to Salsa while CI remains red/broken due to failures surfaced by the Shuttle test job. I don't think this is meaningfully different from today's state. |
bc45ce4 to
0a03f77
Compare
0a03f77 to
b21e5fb
Compare
|
We can ignore the one failing test for now. |
|
This is excellent. Thank you so much for working on this. |
|
I just noticed that the bug is with fallback immediate. We don't use that. I'll leave this to someone else to fix. |
|
Is the bug merely shuttle not liking how fallback immediate works or is there an actual bug that shuttle found? cc @ChayimFriedman2 |
I'm fairly certain this is an actual bug |
|
@MichaReiser do you have more details? |
See #876 (comment) You need to comment out the not shuttle gating in that test, then run it with the shuttle feature enabled I didn't look into why it's crashing but the backtrace is very short. |
Loom is too slow to run even basic tests (#845), so shuttle should be a lot more useful for us. I added a CI check to run our parallel tests under shuttle. This also undoes some of the changes from #842, mainly shuttle does not require an
UnsafeCellwrapper.