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
As @junr03 pointed out, it seems the delayed close timeout callback is being issued after a ConnectionImpl::closeSocket() call which resets the connection_stats_ pointer has occurred. This points to an interesting race since destruction of the ConnectionImpl should lead to disarming the timeout, so it's possible the onDelayedCloseTimeout() cb is triggering while the ConnectionImpl is in the deferred deletion stage.
The text was updated successfully, but these errors were encountered:
@junr03 Can you provide steps to reproduce? I just want to verify my assumptions are correct about the timing that caused this.
A comprehensive fix should be a nullptr check for connection_stats_ in ConnectionImpl::onDelayedCloseTimeout() along with disabling the delayed close timer in ConnectionImpl::closeSocket().
@AndresGuedez per @junr03 your assessment is correct. I verified via the crashing call stack and code inspection. I agree the right fix is disabling the timer in closeSocket(). I would recommend creating a crashing test and then fixing the bug.
Fixes a segfault introduced in envoyproxy#4382 due to a connection tear down race condition when the delayed
close timer triggers after connection state has been reset via closeSocket().
Signed-off-by: Andres Guedez <[email protected]>
Description:
Code merged in #4382 is causing a SEGV in source/common/network/connection_impl.cc:586.
My comment from #4581:
The text was updated successfully, but these errors were encountered: