odr-public/odr-private corpus file odr-private/ods/efficiency-big-1.ods (1,401,603 bytes) takes the whole process down while translating. Found sweeping the corpus for the OpenDocument.droid 6.11.0 bump; it is not a 6.11.0 regression — 6.10.1 behaves the same.
What happens
Resident memory of the app process, sampled every 0.3 s from /proc/<pid>/status on a 2 GB device with 819 MB available at the start:
| RSS |
device MemAvailable |
| 99 MB |
819 MB |
| 218 MB |
791 MB |
| 439 MB |
579 MB |
| 863 MB |
155 MB |
| 1071 MB |
0 |
| 1188 MB |
12 MB |
| killed by lmkd |
|
Roughly 850x the file size, still climbing when it died, so 1.19 GB is a floor rather than the requirement. lowmemorykiller takes it — there is no OutOfMemoryError, and the JVM heap growth limit on this device is 192 MB, so this is native allocation.
It dies after the file type is known and before any view exists, i.e. inside Html::translate.
The html limits do not bound it
HtmlConfig::spreadsheet_limit and spreadsheet_cell_limit bound what is written, not what is read to get there, so no setting of them helps:
| rows / cells |
result |
| 100000 / 500000 (6.11.0 defaults) |
killed |
| 10000 / unset (the 6.10.x shape) |
killed |
| 100 / 2000 |
killed |
The last row is the interesting one: a 100-row, 2000-cell budget still costs over a gigabyte, which says the cost is in parsing the sheet rather than emitting it.
Reproducing
Any host will do; this was an Android app calling Html.translate through the JNI bindings.
Odr.open("efficiency-big-1.ods") -> ok
Html.translate(file, cache, config) // config limits irrelevant, see above
Versions
- 6.11.0 (
3fa5603c) and 6.10.1, identical behaviour
- Android 12 emulator, x86_64, 2 GB RAM
Note
A second corpus file, odr-private/ods/efficiency+style-big-1.ods (33,038 bytes), survives on its own but was killed when opened after other large documents in the same sweep — consistent with the same allocation pattern at a smaller scale.
odr-public/odr-privatecorpus fileodr-private/ods/efficiency-big-1.ods(1,401,603 bytes) takes the whole process down while translating. Found sweeping the corpus for the OpenDocument.droid 6.11.0 bump; it is not a 6.11.0 regression — 6.10.1 behaves the same.What happens
Resident memory of the app process, sampled every 0.3 s from
/proc/<pid>/statuson a 2 GB device with 819 MB available at the start:Roughly 850x the file size, still climbing when it died, so 1.19 GB is a floor rather than the requirement.
lowmemorykillertakes it — there is noOutOfMemoryError, and the JVM heap growth limit on this device is 192 MB, so this is native allocation.It dies after the file type is known and before any view exists, i.e. inside
Html::translate.The html limits do not bound it
HtmlConfig::spreadsheet_limitandspreadsheet_cell_limitbound what is written, not what is read to get there, so no setting of them helps:The last row is the interesting one: a 100-row, 2000-cell budget still costs over a gigabyte, which says the cost is in parsing the sheet rather than emitting it.
Reproducing
Any host will do; this was an Android app calling
Html.translatethrough the JNI bindings.Versions
3fa5603c) and 6.10.1, identical behaviourNote
A second corpus file,
odr-private/ods/efficiency+style-big-1.ods(33,038 bytes), survives on its own but was killed when opened after other large documents in the same sweep — consistent with the same allocation pattern at a smaller scale.