Commit 778708b3 authored by Yuwei Huang's avatar Yuwei Huang Committed by Commit Bot

[remoting][FTL] Abandon timer when invalidating MuxingSignalStrategy::Core

We saw a crash report in MuxingSignalStrategy (see the bug) that
OnWaitForAllStrategiesConnectedTimeout seems to try reading address 0x0.

The callstack seems a bit confusing and incomplete but one failure
pattern I can see is that when MuxingSignalStrategy is destroyed, it
will first call Core::Invalidate() then schedule to delete Core
asynchronously. Invalidate() doesn't stop the timer so the timer may
kick in any time before the Core is actually destroyed. Then
OnWaitForAllStrategiesConnectedTimeout may access the signal strategies
after they have been deleted in Invalidate().

This CL stops the timer in Core::Invalidate, which should fix this
particular failure pattern.

Bug: 969825
Change-Id: I448eee26173e4cb6d976803b7f4e9e08f3dda4b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1641372
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Commit-Queue: Joe Downing <joedow@chromium.org>
Auto-Submit: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665638}
parent 2a0840ba
......@@ -114,6 +114,7 @@ MuxingSignalStrategy::Core::~Core() {
void MuxingSignalStrategy::Core::Invalidate() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
wait_for_all_strategies_connected_timeout_timer_.AbandonAndStop();
ftl_signal_strategy_->RemoveListener(this);
xmpp_signal_strategy_->RemoveListener(this);
ftl_signal_strategy_.reset();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment