Closed Bug 1971020 Opened 1 year ago Closed 1 year ago

Crash in [@ mozilla::detail::InvalidArrayIndex_CRASH | mozilla::net::CookieStorage::RemoveCookiesFromBackUntilUnderLimit ]

Categories

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

ARM64
Windows 11
defect

Tracking

()

RESOLVED FIXED
141 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox139 --- wontfix
firefox140 + fixed
firefox141 + fixed

People

(Reporter: release-mgmt-account-bot, Assigned: edgul)

References

(Blocks 1 open bug)

Details

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

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/f08d3468-3583-4ebf-8956-fc5a30250607

MOZ_CRASH Reason: ElementAt(aIndex = 71, aLength = 71)

Top 10 frames of crashing thread:

0  mozglue.dll  MOZ_Crash  mfbt/Assertions.h:381
0  mozglue.dll  mozilla::detail::InvalidArrayIndex_CRASH  mfbt/Assertions.cpp:50
1  xul.dll  nsTArray_Impl<mozilla::net::CookieListIter, nsTArrayInfallibleAllocator>::ElementAt const  xpcom/ds/nsTArray.h:1225
1  xul.dll  mozilla::ArrayIterator<mozilla::net::CookieListIter&, nsTArray_Impl<mozilla::net::CookieListIter, nsTArrayInfallibleAllocator> >::operator* const  xpcom/ds/ArrayIterator.h:107
1  xul.dll  std::reverse_iterator<mozilla::ArrayIterator<mozilla::net::CookieListIter&, nsTArray_Impl<mozilla::net::CookieListIter, nsTArrayInfallibleAllocator> > >::operator* const  /builds/worker/fetches/vs/VC/Tools/MSVC/14.39.33519/include/xutility:1554
1  xul.dll  mozilla::net::CookieStorage::RemoveCookiesFromBackUntilUnderLimit  netwerk/cookie/CookieStorage.cpp
2  xul.dll  mozilla::net::CookieStorage::RemoveOlderCookiesUntilUnderLimit  netwerk/cookie/CookieStorage.cpp:568
3  xul.dll  mozilla::net::CookieStorage::AddCookie  netwerk/cookie/CookieStorage.cpp:756
4  xul.dll  mozilla::net::CookieService::SetCookieStringFromHttp  netwerk/cookie/CookieService.cpp:636
5  xul.dll  mozilla::net::HttpBaseChannel::SetCookieHeaders  netwerk/protocol/http/HttpBaseChannel.cpp:3626

By querying Nightly crashes reported within the last 2 months, here are some insights about the signature:

  • First crash report: 2025-05-18
  • Process type: Parent
  • Is startup crash: No
  • Has user comments: No
  • Is null crash: No

The Bugbug bot thinks this bug should belong to the 'Core::Networking: Cookies' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Networking: Cookies

Almost all of these have aIndex == aLength like the one in comment 0.

This signature looks like the same issue, is also fairly common, and is less generic, so I'll update the summary to use it.

bp-5a6d6e12-f051-4627-8cc3-9267a0250606

Crash Signature: [@ mozilla::detail::InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | std::reverse_iterator<T>::operator*] → [@ mozilla::detail::InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | std::reverse_iterator<T>::operator*] [@ mozilla::detail::InvalidArrayIndex_CRASH | mozilla::net::CookieStorage::RemoveCookiesFromBackUntilUnderLimit ]
Summary: Crash in [@ mozilla::detail::InvalidArrayIndex_CRASH | nsTArray_Impl<T>::ElementAt | std::reverse_iterator<T>::operator*] → Crash in [@ mozilla::detail::InvalidArrayIndex_CRASH | mozilla::net::CookieStorage::RemoveCookiesFromBackUntilUnderLimit ]

This looks like it could be a regression in 139.

I haven't yet figured out what the problem is, bit it might be a regression from bug 1845870.
The bug description seems to point to RemoveCookiesFromBackUntilUnderLimit, so they're possibly connected.

See Also: → 1845870

Crashes are heavily mac, with a few linux thrown in. Quite a few crashes.

Severity: -- → S2
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-new]
Whiteboard: [necko-triaged][necko-priority-new] → [necko-triaged][necko-priority-queue]

We are in the final week of beta for Fx140, so there is little time to fix this if we can include a fix in the Fx140

Flags: needinfo?(kershaw)

Ed, could you take a look?
Could we try to fix this in this cycle? Thanks.

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

Looking now.

For a quick fix I think we can enable network_cookie_chips_partitionLimitDryRun.

Flags: needinfo?(edgul)
Assignee: nobody → edgul
Status: NEW → ASSIGNED

Comment on attachment 9493903 [details]
Bug 1971020 - Disable CHIPS partition limit purging. r?valentin

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Crash will continue into v140 release
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This only disables recently added CHIPS purging. Meaning no cookies will be removed when exceeding CHIPS limit. Other standard cookie limits still apply to keep cookie counts under control.
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9493903 - Flags: approval-mozilla-beta?

Donal, fx-trains shows 140 beta as going into build (8) today at 13:00 UTC. Did we miss chance to get this into beta 140?

Flags: needinfo?(dmeehan)

140.0b8 is being built right now, but this hasn't landed in central yet.
140.0b9 builds on Friday. 140.0b9 the last beta build, but I should be able to take this before then so it will make 140.

Flags: needinfo?(dmeehan)
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 141 Branch
See Also: → 1971595

Comment on attachment 9493903 [details]
Bug 1971020 - Disable CHIPS partition limit purging. r?valentin

Approved for 140.0b9

Attachment #9493903 - 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

Creator:
Created:
Updated:
Size: