[GH-ISSUE #90] OutOfMemoryError crash on GrapheneOS #59

Closed
opened 2026-02-26 21:31:38 +03:00 by kerem · 4 comments
Owner

Originally created by @RobertKosten on GitHub (Oct 30, 2022).
Original GitHub issue: https://github.com/seemoo-lab/AirGuard/issues/90

Recently AirGuard started crashing with an SQLite OutOfMemoryError on my GrapheneOS Pixel 4:

type: crash
osVersion: google/flame/flame:13/TP1A.221005.002/2022102600:user/release-keys
package: de.seemoo.at_tracking_detection:35
process: de.seemoo.at_tracking_detection

java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 1301384 free bytes and 1270KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC.
	at android.database.sqlite.SQLiteDatabase.createSession(SQLiteDatabase.java:600)
	at android.database.sqlite.SQLiteDatabase$$ExternalSyntheticLambda0.get(Unknown Source:2)
	at java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:284)
	at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180)
	at java.lang.ThreadLocal.get(ThreadLocal.java:170)
	at android.database.sqlite.SQLiteDatabase.getThreadSession(SQLiteDatabase.java:591)
	at android.database.sqlite.SQLiteDatabase.inTransaction(SQLiteDatabase.java:787)
	at f4.a.M(Unknown Source:2)
	at a4.r.inTransaction(Unknown Source:6)
	at androidx.room.c$a.run(Unknown Source:54)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)

Originally created by @RobertKosten on GitHub (Oct 30, 2022). Original GitHub issue: https://github.com/seemoo-lab/AirGuard/issues/90 Recently AirGuard started crashing with an SQLite OutOfMemoryError on my GrapheneOS Pixel 4: ``` type: crash osVersion: google/flame/flame:13/TP1A.221005.002/2022102600:user/release-keys package: de.seemoo.at_tracking_detection:35 process: de.seemoo.at_tracking_detection java.lang.OutOfMemoryError: Failed to allocate a 32 byte allocation with 1301384 free bytes and 1270KB until OOM, target footprint 536870912, growth limit 536870912; giving up on allocation because <1% of heap free after GC. at android.database.sqlite.SQLiteDatabase.createSession(SQLiteDatabase.java:600) at android.database.sqlite.SQLiteDatabase$$ExternalSyntheticLambda0.get(Unknown Source:2) at java.lang.ThreadLocal$SuppliedThreadLocal.initialValue(ThreadLocal.java:284) at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:180) at java.lang.ThreadLocal.get(ThreadLocal.java:170) at android.database.sqlite.SQLiteDatabase.getThreadSession(SQLiteDatabase.java:591) at android.database.sqlite.SQLiteDatabase.inTransaction(SQLiteDatabase.java:787) at f4.a.M(Unknown Source:2) at a4.r.inTransaction(Unknown Source:6) at androidx.room.c$a.run(Unknown Source:54) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012) ```
kerem 2026-02-26 21:31:38 +03:00
Author
Owner

@RobertKosten commented on GitHub (Nov 1, 2022):

I'm not sure yet, but it might be related to placing it on the wireless (Qi) charging dock (Anker PowerWave Stand).

<!-- gh-comment-id:1298331033 --> @RobertKosten commented on GitHub (Nov 1, 2022): I'm not sure yet, but it *might* be related to placing it on the wireless (Qi) charging dock (Anker PowerWave Stand).
Author
Owner

@Sn0wfreezeDev commented on GitHub (Jan 23, 2023):

These issues are very hard to debug on Android. Almost all crashes we get in our crash logs are Memory related. If anyone has good ideas how to identify which parts might cause this, we are open for help here

<!-- gh-comment-id:1400082122 --> @Sn0wfreezeDev commented on GitHub (Jan 23, 2023): These issues are very hard to debug on Android. Almost all crashes we get in our crash logs are Memory related. If anyone has good ideas how to identify which parts might cause this, we are open for help here
Author
Owner

@n1snt commented on GitHub (Mar 24, 2023):

We should try using LeakCanary to find the probable cause of the leak.

<!-- gh-comment-id:1482281613 --> @n1snt commented on GitHub (Mar 24, 2023): We should try using [LeakCanary](https://github.com/square/leakcanary) to find the probable cause of the leak.
Author
Owner

@Sn0wfreezeDev commented on GitHub (Oct 20, 2023):

I already used LeakCanary to look for memory issues, but nothing special was reported that I could act on. These memory issues are quite hard to catch.

<!-- gh-comment-id:1773195256 --> @Sn0wfreezeDev commented on GitHub (Oct 20, 2023): I already used LeakCanary to look for memory issues, but nothing special was reported that I could act on. These memory issues are quite hard to catch.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AirGuard#59
No description provided.