Closed Bug 1895741 Opened 2 years ago Closed 2 years ago

Intermittent valgrind-test | 28 bytes in 1 blocks are definitely lost at malloc / __res_context_send / __res_context_query / __res_context_querydomain

Categories

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

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- fixed
firefox127 --- wontfix
firefox128 --- wontfix
firefox129 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: kershaw)

References

(Regression)

Details

(Keywords: intermittent-failure, regression, Whiteboard: [stockwell disable-recommended][necko-triaged])

Attachments

(2 files)

Filed by: ncsoregi [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=457440901&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/UKBXjuwpQVW2aQbDZfON0w/runs/0/artifacts/public/logs/live_backing.log


[task 2024-05-08T14:54:54.137Z] 14:54:54     INFO -  ==24842== Searching for pointers to 67,246 not-freed blocks
[task 2024-05-08T14:54:54.501Z] 14:54:54     INFO -  ==24842== Checked 198,375,728 bytes
[task 2024-05-08T14:54:54.501Z] 14:54:54     INFO -  ==24842==
[task 2024-05-08T14:54:55.969Z] 14:54:55     INFO -  TEST-UNEXPECTED-FAIL | valgrind-test | 28 bytes in 1 blocks are definitely lost at malloc / __res_context_send / __res_context_query / __res_context_querydomain
[task 2024-05-08T14:54:55.969Z] 14:54:55     INFO -  ==24842== 28 bytes in 1 blocks are definitely lost in loss record 6,309 of 22,589
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    at 0x48407B4: malloc+116 (vg_replace_malloc.c:393)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x4CAA2D4: __res_context_send+980 (res_send.c:325)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x4CA754B: __res_context_query+411 (res_query.c:221)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x4CA8189: __res_context_querydomain (res_query.c:633)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x4CA8189: __res_context_search+1033 (res_query.c:389)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x4CA1718: _nss_dns_gethostbyname4_r+584 (dns-host.c:418)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x4C6C635: get_nss_addresses (getaddrinfo.c:637)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x4C6C635: gaih_inet (getaddrinfo.c:1170)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x4C6C635: getaddrinfo+7141 (getaddrinfo.c:2391)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0x59860D1: PR_GetAddrInfoByName+257 (checkouts/gecko/nsprpub/pr/src/misc/prnetdb.c:2164)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0xB263BCE: _GetAddrInfo_Portable (checkouts/gecko/netwerk/dns/GetAddrInfo.cpp:244)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0xB263BCE: mozilla::net::GetAddrInfo(nsTSubstring<char> const&, unsigned short, unsigned short, mozilla::net::AddrInfo**, bool)+478 (checkouts/gecko/netwerk/dns/GetAddrInfo.cpp:377)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0xB297D0F: nsHostResolver::ThreadFunc()+639 (checkouts/gecko/netwerk/dns/nsHostResolver.cpp:1891)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0xB2A6E16: operator()<> (dist/include/nsThreadUtils.h:1085)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0xB2A6E16: __invoke_impl<void, (lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9)> (fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:60)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0xB2A6E16: __invoke<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9)> (fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:95)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0xB2A6E16: __apply_impl<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), std::tuple<> &> (fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:1678)
[task 2024-05-08T14:54:55.972Z] 14:54:55     INFO -  ==24842==    by 0xB2A6E16: apply<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), std::tuple<> &> (fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:1687)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB2A6E16: apply<nsHostResolver, void (nsHostResolver::*)()> (dist/include/nsThreadUtils.h:1083)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB2A6E16: mozilla::detail::RunnableMethodImpl<nsHostResolver*, void (nsHostResolver::*)(), true, (mozilla::RunnableKind)0>::Run()+38 (dist/include/nsThreadUtils.h:1134)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB0B8E78: nsThreadPool::Run()+904 (checkouts/gecko/xpcom/threads/nsThreadPool.cpp:341)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB0B39B6: nsThread::ProcessNextEvent(bool, bool*)+1542 (checkouts/gecko/xpcom/threads/nsThread.cpp:1193)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB0B75CB: NS_ProcessNextEvent(nsIThread*, bool)+75 (checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB7AE4C6: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)+118 (checkouts/gecko/ipc/glue/MessagePump.cpp:300)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB75AEF4: RunInternal (checkouts/gecko/ipc/chromium/src/base/message_loop.cc:370)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB75AEF4: RunHandler (checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB75AEF4: MessageLoop::Run()+84 (checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0xB0B1183: nsThread::ThreadFunc(void*)+339 (checkouts/gecko/xpcom/threads/nsThread.cpp:370)
[task 2024-05-08T14:54:55.973Z] 14:54:55     INFO -  ==24842==    by 0x5995765: _pt_root+501 (checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201)
[task 2024-05-08T14:54:55.974Z] 14:54:55     INFO -  ==24842==    by 0x12FE53: set_alt_signal_stack_and_start(PthreadCreateParams*)+211 (checkouts/gecko/mozglue/interposers/pthread_create_interposer.cpp:81)
[task 2024-05-08T14:54:55.974Z] 14:54:55     INFO -  ==24842==    by 0x4C03FD3: start_thread+707 (pthread_create.c:442)
[task 2024-05-08T14:54:55.974Z] 14:54:55     INFO -  ==24842==    by 0x4C8381F: clone+63 (clone.S:100)
[task 2024-05-08T14:54:55.974Z] 14:54:55     INFO -  ==24842==
Severity: S4 → --
Component: JavaScript Engine → Networking: DNS
Priority: P5 → --

This is basically permafailing. Can we please get someone from the Necko team to take a look?

Flags: needinfo?(ghess)

Started immediately around when bug 1890999 landed.

Flags: needinfo?(kershaw)
Keywords: regression
Regressed by: 1890999

Set release status flags based on info from the regressing bug 1890999

I'll take this.

Assignee: nobody → kershaw
Severity: -- → S3
Flags: needinfo?(kershaw)
Flags: needinfo?(ghess)
Priority: -- → P2
Whiteboard: [stockwell disable-recommended] → [stockwell disable-recommended][necko-triaged]

See this try push.
Looks like the leak is caused by calling res_ninit. When I removed that code and call res_close when the DNS thread shutdown, the test passed.

Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f99352890323 Clear _res when DNS thread is shutdown, r=sunil
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

The patch landed in nightly and beta is affected.
:kershaw, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox128 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(kershaw)
Flags: needinfo?(kershaw)

Please nominate this for ESR128 approval.

Flags: needinfo?(kershaw)
Attachment #9413481 - Flags: approval-mozilla-esr128?

esr128 Uplift Approval Request

  • User impact if declined: Memory leak
  • Code covered by automated testing: yes
  • Fix verified in Nightly: yes
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: N/A
  • Risk associated with taking this patch: Low risk.
  • Explanation of risk level: This patch is straightforward.
  • String changes made/needed: N/A
  • Is Android affected?: no
Flags: needinfo?(kershaw)
Attachment #9413481 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: