[Crashlytics][2.4] New OutOfMemoryError in okio Segment.<init> on release 2.3 – OOM from STOP-778 not fixed in 2.3 (7 events in 30 days)

XMLWordPrintable

      Summary

      A new OutOfMemoryError (okio Segment.[init], Segment.kt:62) appeared in release 2.3. This shows the OOM problem tracked in STOP-778 is not fixed in 2.3. Fix and verification are required in 2.4.

      Background / Context

      • Source: Firebase Crashlytics, project stoptb-8e404, app org.piramalswasthya.stoptb, 30-day crash view (Oct 12 – Nov 10, 2026).
      • Existing ticket: STOP-778 (RCA-01, Highest, fix version 2.5) covers OOM from unbounded full-body HTTP logging (749 events in the 7-day RCA window). The RCA only analysed branch release-2.2.3 and this okio issue is not in the RCA register.
      • Crashlytics marks this issue "Fresh issue" and shows 2 variants.

      Problem Statement

      The app crashes with OutOfMemoryError inside okio (Segment.[init]), in release 2.3 only so far.

      Current Behaviour (Actual)

      • Crash: java.lang.OutOfMemoryError at okio Segment.kt:62 (Segment.[init]).
      • 7 events / 1 user in 30 days. Affected version: 2.3 only. 2 variants.
      • Whether this shares the RCA-01 root cause (heap exhaustion from large HTTP bodies passing through the OkHttp/okio chain) is inferred, not confirmed. Frames were not inspected. [TBD/CLARIFICATION REQUIRED]
      • Other OOM issues still open in the console: SyncLogTree.promoteIfError (2.3K events / 44 users), SyncLogFileWriter.writeLog (889 / 42), CampModeUrlInterceptor (751 / 37), no-frame OOM (144 / 33), SyncLogTree.log line 54 (11), LoggingInterceptor.log (10), AccountDeactivationInterceptor (17).

      Expected Behaviour / Requirement

      • No OOM crashes in the okio/OkHttp chain on 2.4.
      • STOP-778 logging fix (CAPA-01 to CAPA-04: release builds not logging full HTTP bodies, size caps in SyncLogTree, SyncLogManager and SyncLogFileWriter) is included in 2.4. [TBD/CLARIFICATION REQUIRED: confirm whether the fix will be pulled into 2.4 or stays at 2.5]

      User Story

      As a field user syncing large payloads, I want the app to stay stable during sync, so that my data is uploaded without crashes.

      Acceptance Criteria

      • Given the 2.4 build, When a full sync with large payloads runs on a low-memory device (e.g. Lenovo TB336ZU), Then the app does not crash with OOM.
      • Given the okio Segment.[init] stack traces are opened, When the investigation is complete, Then it is documented whether this issue shares the RCA-01 root cause.
      • Given 2.4 is rolled out, When Crashlytics is checked, Then OOM events for this issue and the RCA-01 issues are absent or reduced.

      Business Rules / Validations

      • None identified.

      Dependencies

      • STOP-778 (RCA-01). Proposed actions CAPA-05 and CAPA-06 (CI check against HttpLoggingInterceptor Level.BODY; heap profile and Crashlytics OOM alert before each release).
      • Crashlytics heap dump collection (Early Access) offered in the console could close the "no heap dump" evidence gap.

      Impact / Affected Areas

      • OkHttp/okio network chain and sync flows.
      • Release 2.3 and later builds. Release 2.3.1 (25) has 0 active users so far, so its OOM status is unknown.

      Out of Scope

      • Implementing the STOP-778 logging changes themselves (tracked there).

      QA / Testing Considerations

      • Heap-profile a full sync on a Lenovo TB336ZU before release.
      • Check Crashlytics for okio Segment events on 2.3.1 and 2.4.

       

              Assignee:
              Ashutosh Gupta
              Reporter:
              Shivani Garg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: