OutOfMemory only on brand new Samsung models

Hi, In google console I notice traces only on Samsung phones.
my original issue for OkHttp Brand new Samsung Devices with OutOfMemory · Issue #6553 · square/okhttp · GitHub but was instantly closed.

java.lang.OutOfMemoryError:
at java.util.ArrayList.iterator (ArrayList.java:834)
at okhttp3.internal.concurrent.TaskRunner.awaitTaskToRun (TaskRunner.java:167)
at okhttp3.internal.concurrent.TaskRunner$runnable$1.run (TaskRunner.java:58)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:919)

java.lang.OutOfMemoryError:
at java.util.concurrent.SynchronousQueue$TransferStack.snode (SynchronousQueue.java:318)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer (SynchronousQueue.java:361)
at java.util.concurrent.SynchronousQueue.poll (SynchronousQueue.java:937)
at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:923)

Hi,
Would you please help me to reproduce the issue?
As I did not face the issue, so I would like to reproduce it first before analyzing it.

Thanks.

I can’t reproduce it, I catch this error in Crashlytics on my project, also I don’t have new Samsung device from the list of above

There are some of new exceptions only from Samsung devices:

Fatal Exception: java.lang.OutOfMemoryError
Failed to allocate a 16 byte allocation with 1283056 free bytes and 1252KB until OOM, target footprint 201326592, growth limit 201326592; failed due to fragmentation (largest possible contiguous allocation 55836672 bytes)

  1. android.os.ThreadLocalWorkSource.setUid (ThreadLocalWorkSource.java:68)
    android.os.Binder.execTransact (Binder.java:1027)

  2. java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.addConditionWaiter (AbstractQueuedSynchronizer.java:1882)
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2063)
    java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442)
    java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
    java.lang.Thread.run (Thread.java:923)

It looks as internal error of firmware, could you check the difference with original implementation with AOSP from java.util.concurrent package?

This also seem to happen when running updates within F-Droid client.

Would you please help me to reproduce the issue?
As I did not face the issue, so I would like to reproduce it first before analyzing it.

Sure:

  1. download the open source app store F-Droid
  2. install some outdated application (at least ten) versions and properly close F-Droid
  3. start F-Droid and try to update the apps

You can also see videos of the responsiveness and stack traces at this thread

Any update on this issue?
We are also seeing this issue happening only on Samsung devices in our crash monitoring report.