Closed Bug 2064432 Opened 3 months ago Closed 3 months ago

Hit MOZ_CRASH(got a stale response for refresh query Id(3), which forbade stale answers) at /builds/worker/checkouts/gecko/third_party/rust/happy-eyeballs/src/lib.rs:1268

Categories

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

defect

Tracking

()

RESOLVED FIXED
156 Branch
Tracking Status
firefox-esr140 --- unaffected
firefox-esr153 --- unaffected
firefox154 --- unaffected
firefox155 --- unaffected
firefox156 --- fixed

People

(Reporter: tsmith, Assigned: kershaw)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: assertion, regression, Whiteboard: [necko-triaged][necko-priority-queue])

Attachments

(2 files, 1 external file)

Found with m-c 20260817-99db6c0ec8d0 (--enable-debug)

This was found by visiting a live website with a debug build. This was reported hundreds of times over night by live site testing on many different sites but I cannot reliably reproduce it.

STR:

  • Launch browser and visit site

This issue was triggered by visiting http://mssociety.ca/.

Hit MOZ_CRASH(got a stale response for refresh query Id(3), which forbade stale answers) at /builds/worker/checkouts/gecko/third_party/rust/happy-eyeballs/src/lib.rs:1268

7|0|libxul.so|RustMozCrash|git:github.com/mozilla-firefox/firefox:mozglue/static/rust/wrappers.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|17|0x2f
7|1|libxul.so|mozglue_static::panic_hook|git:github.com/mozilla-firefox/firefox:mozglue/static/rust/lib.rs:b0bc20aac45f7cb55b18adbf4d2313457659d140|99|0xd8
7|2|libxul.so|<mozglue_static::panic_hook as core::ops::function::Fn<(&std::panic::PanicHookInfo,)>>::call|/builds/worker/fetches/rustc/lib/rustlib/src/rust/library/core/src/ops/function.rs|79|0xb
7|3|libxul.so|std::panicking::panic_with_hook|git:github.com/rust-lang/rust:library/std/src/panicking.rs:59807616e1fa2540724bfbac14d7976d7e4a3860|833|0xcb
7|4|libxul.so|std::panicking::panic_handler::{closure#0}|git:github.com/rust-lang/rust:library/std/src/panicking.rs:59807616e1fa2540724bfbac14d7976d7e4a3860|698|0x47
7|5|libxul.so|std::sys::backtrace::__rust_end_short_backtrace::<std::panicking::panic_handler::{closure#0}, !>|git:github.com/rust-lang/rust:library/std/src/sys/backtrace.rs:59807616e1fa2540724bfbac14d7976d7e4a3860|182|0x8
7|6|libxul.so|__rustc::rust_begin_unwind|git:github.com/rust-lang/rust:library/std/src/panicking.rs:59807616e1fa2540724bfbac14d7976d7e4a3860|689|0x1c
7|7|libxul.so|core::panicking::panic_fmt|git:github.com/rust-lang/rust:library/core/src/panicking.rs:59807616e1fa2540724bfbac14d7976d7e4a3860|80|0x2b
7|8|libxul.so|happy_eyeballs::HappyEyeballs::process_input|git:github.com/mozilla-firefox/firefox:third_party/rust/happy-eyeballs/src/lib.rs:b0bc20aac45f7cb55b18adbf4d2313457659d140|962|0x67c
7|9|libxul.so|happy_eyeballs_process_dns_response_a|git:github.com/mozilla-firefox/firefox:netwerk/protocol/http/happy_eyeballs_glue/src/lib.rs:b0bc20aac45f7cb55b18adbf4d2313457659d140|172|0x3d9
7|10|libxul.so|mozilla::net::HappyEyeballsConnectionAttempt::OnARecord(nsIDNSRecord*, nsresult, unsigned long)|git:github.com/mozilla-firefox/firefox:netwerk/protocol/http/HappyEyeballsConnectionAttempt.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|2009|0x342
7|11|libxul.so|mozilla::net::HappyEyeballsConnectionAttempt::OnLookupComplete(nsICancelable*, nsIDNSRecord*, nsresult)|git:github.com/mozilla-firefox/firefox:netwerk/protocol/http/HappyEyeballsConnectionAttempt.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|1939|0x10a
7|12|libxul.so|mozilla::detail::RunnableFunction<mozilla::net::DNSListenerProxy::OnLookupComplete(nsICancelable*, nsIDNSRecord*, nsresult)::$_0>::Run()|git:github.com/mozilla-firefox/firefox:xpcom/threads/nsThreadUtils.h:b0bc20aac45f7cb55b18adbf4d2313457659d140|535|0x2f
7|13|libxul.so|mozilla::net::nsSocketTransportService::Run()|git:github.com/mozilla-firefox/firefox:netwerk/base/nsSocketTransportService2.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|1221|0x410
7|14|libxul.so|{virtual override thunk({offset(-32)}, mozilla::net::nsSocketTransportService::Run())}|git:github.com/mozilla-firefox/firefox:netwerk/base/nsSocketTransportService2.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140||0xc
7|15|libxul.so|nsThread::ProcessNextEvent(bool, bool*)|git:github.com/mozilla-firefox/firefox:xpcom/threads/nsThread.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|1171|0x7a6
7|16|libxul.so|NS_ProcessNextEvent(nsIThread*, bool)|git:github.com/mozilla-firefox/firefox:xpcom/threads/nsThreadUtils.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|471|0x4f
7|17|libxul.so|mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)|git:github.com/mozilla-firefox/firefox:ipc/glue/MessagePump.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|297|0xc6
7|18|libxul.so|MessageLoop::Run()|git:github.com/mozilla-firefox/firefox:ipc/chromium/src/base/message_loop.cc:b0bc20aac45f7cb55b18adbf4d2313457659d140|346|0x61
7|19|libxul.so|nsThread::ThreadFunc(void*)|git:github.com/mozilla-firefox/firefox:xpcom/threads/nsThread.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|375|0x1ba
7|20|libnspr4.so|_pt_root|git:github.com/mozilla-firefox/firefox:nsprpub/pr/src/pthreads/ptthread.c:b0bc20aac45f7cb55b18adbf4d2313457659d140|198|0x18c
7|21|firefox-bin|set_alt_signal_stack_and_start(PthreadCreateParams*)|git:github.com/mozilla-firefox/firefox:mozglue/interposers/pthread_create_interposer.cpp:b0bc20aac45f7cb55b18adbf4d2313457659d140|81|0x10d

I reproduce this bug too and my profile for debug builds restores the previous tabs and gets this crash before closing the tabs... So, now I cannot use it. Can I launch firefox without restoring the previously opened tabs with command line options?

Hmm, even if I make a new profile, I reproduce this crash...

Hi,

If you can still reproduce, could you try to capture a http log? In about:logging, please select Logging to file. That way, if Firefox crashes, the log file should capture what happened.

Thanks

Flags: needinfo?(masayuki)

Here is the log (output on the terminal) of MOZ_LOG=timestamp,rotate:200,nsHttp:5. Note that the profile asked whether starting new session or restoring the previous session and I chose the former in this case.

If this is not enough, please request ni again with proper MOZ_LOG value.

(I did nothing after clicking the "start new session" button. Just crashed.)

origin/main: b0bc20aac45f7cb55b18adbf4d2313457659d140

Flags: needinfo?(masayuki) → needinfo?(kershaw)

nsIDNSAddrRecord::fromStaleCache is currently derived from CheckExpiration() at read time, which can make fresh 0-TTL answers look stale because they enter the grace window immediately.
This patch stores the flag on nsHostRecord instead: set it only when serving a grace-period entry from cache, and clear it on every fresh resolution.

Assignee: nobody → kershaw
Status: NEW → ASSIGNED

Thanks! The patch fixed my issue!

Flags: needinfo?(kershaw)
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-queue]
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: