Closed Bug 1395884 Opened 7 years ago Closed 7 years ago

Fix null TimeStamp compare MOZ_ASSERT failure in RequestContext::Notify

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: mayhemer, Assigned: mayhemer)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file, 1 obsolete file)

There is apparently a race between the time and low resolution now that can make mUntailAt timestamp be cleared just before the time is about to fire.
Attached patch v1 (obsolete) — Splinter Review
mUntailAt <= TimeStamp::NowLoRes() may eval to true just few milliseconds before the timer is scheduled to fire, but we don't cancel the timer.  In Notify() - when the timer fired - we than compare against null mUntailAt.  

Though, the condition is redundant, since mUntailAt is always exactly:
- non-null when we are inside the "keep tailed" interval
- null otherwise (after the timer has fired)

This is ensured by the code.  Hence, checking only if mUntailAt.IsNull() is enough to evaluate the condition correctly.
Attachment #8903521 - Flags: review?(dd.mozilla)
Credits for reporting and verifying the fix locally: Paul Adenot.  Thanks! :)
Attachment #8903521 - Flags: review?(dd.mozilla) → review+
Keywords: checkin-needed
Attached patch v1.1Splinter Review
We can also remove the null TimeStamp() assignment (it's a no op).
Attachment #8903521 - Attachment is obsolete: true
Attachment #8903539 - Flags: review+
Pushed by honzab.moz@firemni.cz:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b1f99cdeddec
Remove potential timer race and assertion in RequestContext tailing feature, r=dragana
Keywords: checkin-needed
Whiteboard: [necko-active]
https://hg.mozilla.org/mozilla-central/rev/b1f99cdeddec
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: