fix(query): Rotate Parallel Cycle Entries to Match Recovery Target#153644
fix(query): Rotate Parallel Cycle Entries to Match Recovery Target#153644TKanX wants to merge 2 commits intorust-lang:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
3180434 to
173437f
Compare
|
r? @adwinwhite rustbot has assigned @adwinwhite. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
cc @zetanumbers @Zoxc @SparrowLii for parallel query cycle changes |
Good job at diagnosing this A-parallel-compiler issue! I expect your skills could benefit query system and parallel compiler in the long run. However, I am afraid your fix is superseded by a new proposed query cycle handling design. In #153493 (comment) I've described a fix for #153391 that is included as a part of that proposal. |
|
Your fix also resembles #148936, but instead is forced to make a change to the query system. But this PR adds there an exhaustive check with regards to And Zoxc had another idea to abort on any query cycle error, so that fn_sig output's arity in cycle is not important. |
Nonetheless you can help there. I invite you to write a PR that simply adds a query key to the |
|
This is superseded by #153493 which removes |
No, this is not true. #153493 does not implement a fix for this bug as I've pointed out in #153493 (comment). As such I've asked if you want to implement a proper fix by adding a |
@zetanumbers Thanks for the correction. Should I update this PR or open a new one? |
|
You can open a new PR but just share its link here please. |
Summary:
Mutual trait references as bare trait objects cause a
fn_sig->is_dyn_compatiblecycle. In parallel mode,remove_cyclemay rotate the cycle entries arbitrarily, causingfrom_cycle_errorto pick an incorrect query as the entry point. This leads to an invalid recovery signature with wrong arity, eventually triggering a panic invirtual_call_violations_for_method.Fix: in
wait_for_query, rotatecycleentries socycle[0]matches the query being recovered, restoring the invariant thatfind_cycle_in_stacknaturally maintains in single-threaded mode.Closes #153391
cc @matthiaskrgr @lqd