Closed Bug 1550401 Opened 1 year ago Closed 1 year ago

Report OOM size when StringParam::GetString (JNIEnv->NewString return nullptr) is failure


(GeckoView :: General, enhancement, P2)



(firefox67 wontfix, firefox67.0.1 wontfix, firefox68 fixed, firefox69 fixed)

Tracking Status
firefox67 --- wontfix
firefox67.0.1 --- wontfix
firefox68 --- fixed
firefox69 --- fixed


(Reporter: m_kato, Assigned: m_kato)



(1 file)

All JNI Exception with java.lang.OutOfMemoryError calls NS_ABORT_OOM(0). But a lot of this crashes ( is StringParam::GetString. So I would like to know allocation size of OOM.

Type: defect → enhancement
OS: All → Android
Priority: -- → P2

Actually, all JNI Exceptions with java.lang.OutOfMemoryError call
NS_ABORT_OOM(0). But JNIEnv::NewString in StringParam::GetString can know
OOM size when returning nullptr. So call NS_ABORT_OOM directly when
NewString is failure.

Pushed by
Report OOM size when StringParam::GetString is failure. r=geckoview-reviewers,snorp

We should consider uplifting this OOM report to GV 68 Beta because 68 is the version Fenix MVP will ship.

Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

Comment on attachment 9064672 [details]
Bug 1550401 - Report OOM size when StringParam::GetString is failure.

Beta/Release Uplift Approval Request

  • User impact if declined: When OOM occurs, gecko crashes, then we submit crash data to socorro with OOM size. But when StringParam::GetString is failure (most situation is OOM when we use JNI API), we don't report OOM size even if OOM.
    To analyze this, I would like to report OOM size correctly at this situation.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • 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): Even not landing this, Gecko crash with 0 byte OOM. After landing this, we report correct OOM size.
  • String changes made/needed: no
Attachment #9064672 - Flags: approval-mozilla-beta?

Comment on attachment 9064672 [details]
Bug 1550401 - Report OOM size when StringParam::GetString is failure.

fix crash annotation for some android OOMs, approved for 68.0b7

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