Repository navigation
Description
Summary
On Android/LepusNG, an eager Lynx tree large enough to create roughly 51,200 native elements aborts the whole process at ART's global JNI reference-table limit. This is a native capacity boundary, not a JavaScript exception:
JNI ERROR (app bug): global reference table overflow (max=51200)
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE)
Process com.lynx.explorer ... has died
The latest device dump is dominated by Lynx platform UI holders, so current evidence does not justify an Octane retention/release-point patch. This issue records the known cause, the threshold arithmetic, and a reproducible protocol so a future engine or renderer change can be evaluated without rediscovering the crash.
Device evidence
The decisive window used aries_10 / Android 10 / Explorer 1.0, app-bundle engine 3.9, Lynx SDK 4.0. DevTool/CDP was disabled, each sample used a cold process, order was AB/BA, n=5 per cell, and every accepted attempt started at battery <=35 C with Android thermal status 0.
At 10,000 rows:
- eager program cell: native ART crash 5/5, load-to-crash 20,397–22,029 ms (median 21,156 ms);
- template control: alive at the fixed 180,000 ms cutoff 5/5. This is not proof that the template is safe: it never completed and may simply not have created 51,200 elements before cutoff.
Every crash's ART Summary: began with the same counts:
30026 of com.lynx.tasm.behavior.PaintingContext$a (30026 unique instances)
20444 of m7.w (20444 unique instances)
403 of java.lang.Class (330 unique instances)
277 of java.nio.DirectByteBuffer (277 unique instances)
PaintingContext$a plus m7.w account for 50,470 of the 51,200 slots. They are Lynx platform/UI holders, not Octane JavaScript maps or arrays.
Why the threshold is approximately one entry per created element
The benchmark row creates seven elements: one row view, three child text elements, and one raw text child under each. The fixed chrome creates another 42.
| Rows | Elements created | Fraction of ART max=51,200 |
|---|---|---|
| 1,000 | 7,042 | 14% (completed in round 1) |
| 7,308 | 51,198 | table exactly full |
| 10,000 | 70,042 | 137% (crashed) |
| 30,000 | 210,042 | 410% |
The shape has an independent same-work check: seven creates, seven appends, four class writes, and two event registrations per row (20 PAPI calls), plus 125 chrome calls predicts 20,125 calls at 1k; the device recorded __FlushElementTree.callsBefore=[20124] in all five samples.
Round 1 gives a second reading. Scaling its 1k mount time (12,717 ms) to 7,308 rows predicts about 93 s; the crash occurred around 114 s, or 1.22x. Reversing that estimate gives about 8,965 rows / 62,755 elements at crash, or 1.23 ART entries per element. Both readings are consistent with a roughly per-created-element charge, not a charge per Octane-owned map entry.
Retain-none experiment design (and why it was skipped)
A separating experiment was prepared before the full ART dump was available:
| Cell | JS wrappers retained per row | Prediction if JS retention drives overflow | Prediction if native creation drives overflow |
|---|---|---|---|
| program | 7 | ~7,300 rows | ~7,300 rows |
| direct/dynamic | 2 | ~25,600 rows | ~7,300 rows |
| direct/retain-none | 0 | no overflow at any row count | ~7,300 rows |
The retain-none arm removes only the two slot-table pushes for the row view and label raw text. Creates, appends, attributes, events, ordering, and the complete PAPI call multiset remain identical. It is intentionally create-only; with no slot table, later delta operations cannot address elements.
The original stop condition said to run retain-none first only if the ART holder remained ambiguous. Round 2's 50,470 platform-holder entries named the owner directly, so the 6k/7k/7.5k/8k bisection and all three retention arms were skipped. This is a settled decision, not a missing negative result: removing an Octane JS reference cannot release a global reference owned by the platform's UI layer while the element itself is still live.
Reproduction/capture protocol
For a future Lynx/engine change, keep each window independent and use this order:
- Disable DevTool before every sample and verify the disabled lifecycle acknowledgement; do not open CDP.
- Use cold process launches, AB/BA interleaving,
n>=5, and record device/engine versions, thermal state, and load. - Capture a wide fatal logcat window. Preserve the abort line,
Last 10 entries, the entire ARTSummary:, SIGABRT, and process-death line. The summary, not the abort line alone, identifies the owner. - If the holder is ambiguous, bisect the program cell at 6,000 / 7,000 / 7,500 / 8,000 rows. At threshold
R, estimate entries per created element as51200 / (7 * R). - Only then run program/direct/retain-none at that threshold, retain-none first, and require an identical PAPI call multiset.
Scope and requested outcome
This report does not claim that current upstream main has been measured at an exact crash row, nor that the template control is safe. It records a platform capacity reached by an eager Octane-created native tree; upstream creates the same class of native elements and therefore needs an explicit capacity/DNF policy for large eager fixtures.
Suggested disposition:
- treat eager 10k/30k Native cells as capacity outcomes rather than censored performance samples;
- prefer fewer simultaneously live native elements (for example, a list/virtualized fixture) when the product contract permits it;
- coordinate an engine-side fix if these global holders should not be retained per live element;
- rerun the protocol above after an engine ownership/lifetime change;
- do not add an Octane JS release-point patch unless a future ART summary or controlled arm contradicts the round-two ownership evidence.
No code patch accompanies this issue.
Evidence provenance: Huxpro#194 (device rounds 1 and 2), Huxpro#222 (arithmetic, retain-none arm, and capture protocol), Huxpro#232 (upstream contribution sequencing).
Activity
jonkwheeler commentedon Sep 3, 2026
Implementation is ready for review across both owning repositories:
I am intentionally leaving #888 open. No Android device was attached for this work, so no fresh result was fabricated. Closure still requires both PRs to land and the documented leased-device campaign to produce a regenerated Android artifact, including at least five accepted attempts for eligible timing cells and a real versioned allocation observer for the bounded-list claim.