Closed Bug 1829841 Opened 1 year ago Closed 1 year ago

Fix repeated nsHttpConnectionMgr timers occurring in browser mochitests

Categories

(Core :: Networking, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1821691

People

(Reporter: jdescottes, Unassigned)

References

Details

In Bug 1826954, we are going to explicitly allow nsHttpConnectionMgr in the assert against repeating timers added in Bug 1828013.

The nsHttpConnectionMgr timer failures show up in a variety of devtools browser mochitests when running with a http3 server (potentially in other browser mochitests, but I haven't tried).

In the failures, the repeated timers are captured with various delays: 6000, 7000, 8000 or 9000ms.

The timer might be created from https://searchfox.org/mozilla-central/rev/1f4f99a8f331cce8467a50742178b6d46914ab89/netwerk/protocol/http/nsHttpConnectionMgr.cpp#2719 , but this call site sets a delay of 1000ms

  mTimeoutTick->Init(this, 1000, nsITimer::TYPE_REPEATING_SLACK);

Maybe the following code is able to increase the delay by 1000ms increments: https://searchfox.org/mozilla-central/rev/1f4f99a8f331cce8467a50742178b6d46914ab89/netwerk/protocol/http/nsHttpConnectionMgr.cpp#2689-2696

  if (mTimeoutTick && mTimeoutTickArmed) {
    // make sure we get one iteration on a quick tick
    if (mTimeoutTickNext > 1) {
      mTimeoutTickNext = 1;
      mTimeoutTick->SetDelay(1000);
    }
    return;
  }

FWIW I suspect this might want to live in Core :: Networking, because I'd expect that if the timer is created by network code, it's also networking's responsibility to end the timer again. :-)

Moving to Core. This might be a duplicate of Bug 1821691

Component: General → Networking
Product: DevTools → Core
See Also: → 1821691
Type: task → defect

(In reply to Julian Descottes [:jdescottes] from comment #2)

Moving to Core. This might be a duplicate of Bug 1821691

Yeah, I think this is a dup of bug 1821691.

Status: NEW → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1821691
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.