Getting anr because thread resulting in main thread starvation.

  • Thread starter Android Central Question
  • Start date
A

Android Central Question

"pool-1-thread-1" tid=16 Native Performing disk I/O
"pool-1-thread-1" prio=5 tid=16 Native
| group="main" sCount=1 dsCount=0 obj=0x12c07440 self=0xab8b2778
| sysTid=24967 nice=0 cgrp=apps sched=0/0 handle=0xab8b2db8
| state=D schedstat=( 0 0 0 ) utm=50 stm=24 core=0 HZ=100
| stack=0xf015f000-0xf0161000 stackSize=1036KB
| held mutexes=
#00 pc 0000000000039420 /system/lib/libc.so (fsync+12)
#01 pc 000000000001e253 /system/lib/libjavacore.so (???)
#02 pc 000000000007166f /system/framework/arm/boot.oat (Java_libcore_io_Posix_fsync__Ljava_io_FileDescriptor_2+102)
at libcore.io.Posix.fsync (Native method)
at libcore.io.BlockGuardOs.fsync (BlockGuardOs.java:143)
at java.io.FileDescriptor.sync (FileDescriptor.java:74)
at android.os.FileUtils.sync (FileUtils.java:152)
at android.app.SharedPreferencesImpl.writeToFile (SharedPreferencesImpl.java:598)
at android.app.SharedPreferencesImpl.access$800 (SharedPreferencesImpl.java:51)
at android.app.SharedPreferencesImpl$2.run (SharedPreferencesImpl.java:512)
- locked <@addr=0x130d7710> (a java.lang.Object)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
at java.lang.Thread.run (Thread.java:818)
 

Taritz

Member
Nov 4, 2017
11
0
0
Visit site
You need to supply more information before anyone can help you.

What are you trying to do? Are you using any third party tools or what components are involved? When does the error occur?

Looks like some kind of race condition involving SharedPreferences but hard to say without knowing more.