Open timotheyca opened 3 weeks ago
yes, seems to be the same issue
#[inline(always)]
on clone_arc_raw
has some positive effect on the situation sometimes (ref_wake_same
passes?)
Quoting myself from
[...] this sounds like a bug in the code doing the comparison. If multiple codegen units are involved, it's not guaranteed that the vtable is always the same for the same object.
That's why e.g. https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.ptr_eq exists.
Sometimes (more often than not, in my experience), when running in
--release
mode, vtable addresses don't match:Why this matters: this leads to
AtomicWaker
and alike to clone (or, worse, wake) on each poll because of howWaker::will_wake
comparesWaker
s. Example: https://github.com/sdroege/async-tungstenite/issues/133Is this a compiler bug? If yes, can we do something to mitigate it?