Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.util.concurrent.TimeoutException ..reported from clients which seems that the lock has reached limit to be locked #8

Closed
swabbass opened this issue Jan 31, 2017 · 1 comment

Comments

@swabbass
Copy link

device specs:
Infinix X509
android:5.1

volley version 1.0.0

java.util.concurrent.TimeoutException: com.android.volley.toolbox.PoolingByteArrayOutputStream.finalize() timed out after 10 seconds
at com.android.volley.toolbox.ByteArrayPool.returnBuf(ByteArrayPool.java:111)
at com.android.volley.toolbox.PoolingByteArrayOutputStream.finalize(PoolingByteArrayOutputStream.java:65)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:191)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:174)
at java.lang.Thread.run(Thread.java:818)

@jpd236
Copy link
Collaborator

jpd236 commented Feb 1, 2017

Thanks for your report. Unfortunately, I don't think it is an issue with Volley.

Per the stack trace, the app is hung on the following line of code:

if (buf == null || buf.length > mSizeLimit) {

which are trivial checks on buf/buf.length which should take nanoseconds, not seconds, to complete.

One of these possibilities thus seems likely, and none would be something we could do much about in Volley:

  • The device is under heavy load to the point that trivial operations take tens of seconds (a strong possibility here, given that GC is running, is that the app which crashed has a memory leak).
  • The phone happened to go to sleep at the wrong time; the timeout here is based on realtime, but if the app was doing lots of work in the background without holding a wakelock, it seems possible that it would go to sleep during the finalize() call and lead to a timeout when it woke up. (See some discussion).

I'm closing this without more info about the circumstances, but if you have a consistent way to reproduce this (ideally with sample code), or a full Android bugreport (taken through developer options) taken after a crash, we can take a closer look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants