You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exception state can be saved to incorrect thread in 1.88 #323
The manage_exception_state try to save and restore the exception state from/to the current thread that executing the fiber, but only one __cxa_get_globals() call is generated for the outer function after optimization, which would be incorrect if fiber resume on another thread.
PR #324 was merged on Mar 10, but the fix doesn't seem to be present in develop anymore. The manager_exception_state class in fiber_fcontext.hpp is back to the original version without BOOST_NOINLINE / volatile.
We're hitting this in production with Boost version more that 1.87 - the compiler caches the __cxa_get_globals pointer across the context switch, so exception state ends up in the wrong thread after a fiber resumes elsewhere. Same symptoms as the original issue.
Was the PR intentionally reverted, or did it get lost in a branch shuffle? Just wondering if a fix is still on the roadmap, or if there's a recommended workaround in the meantime.
Reacted by Konstantin Goncharik and Vasily Sviridov
I opened #331 to re-apply the fix from #324, which doesn't seem to be in develop anymore (not sure what happened, looks like it got caught in the revert after the build failures).
We're hitting this in production on Boost 1.87+ and confirmed that the BOOST_NOINLINE approach from da3fa4f fixes it for us. Also found the same root cause documented in userver-framework/userver#242 if more context is helpful.
Activity
Ensure manage_exception_state uses correct TLS
vasily-sviridov commentedon May 5, 2026
Hi, @olk, @zhykzhykzhyk - checking if there's any update on this.
PR #324 was merged on Mar 10, but the fix doesn't seem to be present in
developanymore. Themanager_exception_stateclass infiber_fcontext.hppis back to the original version withoutBOOST_NOINLINE/volatile.We're hitting this in production with Boost version more that 1.87 - the compiler caches the
__cxa_get_globalspointer across the context switch, so exception state ends up in the wrong thread after a fiber resumes elsewhere. Same symptoms as the original issue.Was the PR intentionally reverted, or did it get lost in a branch shuffle? Just wondering if a fix is still on the roadmap, or if there's a recommended workaround in the meantime.
vasily-sviridov commentedon May 7, 2026
I opened #331 to re-apply the fix from #324, which doesn't seem to be in develop anymore (not sure what happened, looks like it got caught in the revert after the build failures).
We're hitting this in production on Boost 1.87+ and confirmed that the BOOST_NOINLINE approach from da3fa4f fixes it for us. Also found the same root cause documented in userver-framework/userver#242 if more context is helpful.