Closed Bug 1688092 Opened 4 years ago Closed 4 years ago

Update ODoHConfig when the TTL expires

Categories

(Core :: Networking: DNS, task, P2)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox87 --- fixed
firefox88 --- fixed

People

(Reporter: kershaw, Assigned: kershaw)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

It seems that spec doesn't mention about when should we update odohconfig, but it's mentioned in cloudalre's blog: When the TTL for this key expires, clients request a new copy of the key as needed (just as they would for an A/AAAA record when that record’s TTL expires)..

Depends on D106074

Assignee: nobody → kershaw
Status: NEW → ASSIGNED

Just hit an assertion (Assertion failure: mTrrA, at /builds/worker/checkouts/gecko/netwerk/dns/TRRQuery.cpp:183) on try.
Looking at the log below, here is what happened.

  1. We dispatch an ODoH request here.
  2. This request failed very quickly since there is no valid ODoHConfig to use.
  3. This lock in TRRQuery::CompleteLookup is acquired before this one. At this point mTrrA is not assigned yet, so we hit this assertion.
[task 2021-02-24T08:51:17.990Z] 08:51:17     INFO -  netwerk/test/unit/test_odoh.js | Starting testODoHConfig7
[task 2021-02-24T08:51:17.990Z] 08:51:17     INFO -  (xpcshell/head.js) | test testODoHConfig7 pending (2)
[task 2021-02-24T08:51:17.990Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver TRR::Observe() topic=nsPref:changed
[task 2021-02-24T08:51:17.990Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver TRR::Observe() topic=nsPref:changed
[task 2021-02-24T08:51:17.990Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver Resolving host [bar.example.com]<> type 0. [this=0x7f02aa47e0e0]
[task 2021-02-24T08:51:17.990Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver   No usable record in cache for host [bar.example.com] type 0.
[task 2021-02-24T08:51:17.991Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver NameLookup host:bar.example.com af:0
[task 2021-02-24T08:51:17.992Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver NameLookup: bar.example.com effectiveTRRmode: 2 flags: 0
[task 2021-02-24T08:51:17.992Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver TrrLookup host:bar.example.com af:0
[task 2021-02-24T08:51:17.993Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver TRRService::Enabled mConfirmation.mState=2 mCaptiveIsPassed=0
[task 2021-02-24T08:51:17.994Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: Main Thread]: D/nsHostResolver TRR Resolve bar.example.com type 1
[task 2021-02-24T08:51:17.994Z] 08:51:17     INFO -  PID 3148 | [Parent 3148: TRR Background]: D/nsHostResolver TRR::SendHTTPRequest resolve bar.example.com type 1
[task 2021-02-24T08:51:17.995Z] 08:51:17     INFO -  PID 3148 | Assertion failure: mTrrA, at /builds/worker/checkouts/gecko/netwerk/dns/TRRQuery.cpp:183
[task 2021-02-24T08:51:17.996Z] 08:51:17     INFO -  PID 3148 | #01: mozilla::net::TRR::FailData(nsresult) [netwerk/dns/TRR.cpp:751]
[task 2021-02-24T08:51:17.996Z] 08:51:17     INFO -  PID 3148 | #02: mozilla::net::TRR::Run() [netwerk/dns/TRR.cpp:81]
[task 2021-02-24T08:51:17.997Z] 08:51:17     INFO -  PID 3148 | #03: mozilla::net::ODoH::Run() [netwerk/dns/ODoH.cpp:44]
[task 2021-02-24T08:51:17.998Z] 08:51:17     INFO -  PID 3148 | #04: nsThread::ProcessNextEvent(bool, bool*) [xpcom/threads/nsThread.cpp:1153]
[task 2021-02-24T08:51:17.998Z] 08:51:17     INFO -  PID 3148 | #05: NS_ProcessNextEvent(nsIThread*, bool) [xpcom/threads/nsThreadUtils.cpp:548]
[task 2021-02-24T08:51:17.999Z] 08:51:17     INFO -  PID 3148 | #06: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) [ipc/glue/MessagePump.cpp:332]
[task 2021-02-24T08:51:18.000Z] 08:51:17     INFO -  PID 3148 | #07: MessageLoop::RunInternal() [ipc/chromium/src/base/message_loop.cc:335]
[task 2021-02-24T08:51:18.000Z] 08:51:18     INFO -  PID 3148 | #08: MessageLoop::Run() [ipc/chromium/src/base/message_loop.cc:311]
[task 2021-02-24T08:51:18.001Z] 08:51:18     INFO -  PID 3148 | #09: nsThread::ThreadFunc(void*) [xpcom/threads/nsThread.cpp:393]
[task 2021-02-24T08:51:18.002Z] 08:51:18     INFO -  PID 3148 | #10: _pt_root [nsprpub/pr/src/pthreads/ptthread.c:204]
[task 2021-02-24T08:51:18.004Z] 08:51:18     INFO -  PID 3148 | #11: ??? [/lib/x86_64-linux-gnu/libpthread.so.0 + 0x76db]
[task 2021-02-24T08:51:18.008Z] 08:51:18     INFO -  PID 3148 | #12: clone [/lib/x86_64-linux-gnu/libc.so.6 + 0x121a3f]
[task 2021-02-24T08:51:18.009Z] 08:51:18     INFO -  PID 3148 | #13: ??? (???:???)
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/14f3d193f41a Update ODoHConfigs when the TTL expires r=necko-reviewers,valentin https://hg.mozilla.org/integration/autoland/rev/4bfa17997433 Make sure mTrrA and mTrrAAAA are set properly before dispatching them r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch

Comment on attachment 9205352 [details]
Bug 1688092 - Make sure mTrrA and mTrrAAAA are set properly before dispatching them

Beta/Release Uplift Approval Request

  • User impact if declined: A host record could be put into the same queue twice and cause an unexpected behavior.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: This file is covered by a test and is verified in Nightly.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed: N/A
Attachment #9205352 - Flags: approval-mozilla-beta?

AFAIK we're not shipping odoh. What's the context for this uplift request?

Flags: needinfo?(kershaw)

(In reply to Julien Cristau [:jcristau] from comment #8)

AFAIK we're not shipping odoh. What's the context for this uplift request?

The patch also fixes a problem for TRR, not just odoh. It just happened that we found a fix for bug 1678117 when running odoh tests, so I'd like to uplift this patch.

Flags: needinfo?(kershaw)

Comment on attachment 9205352 [details]
Bug 1688092 - Make sure mTrrA and mTrrAAAA are set properly before dispatching them

approved for 87.0b5, thanks

Attachment #9205352 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: