I have a situation where one of my transactions on the db is taking a
long time, my application (service)  can deal with it properly and it
manages the lifecycle events as well to be a good citizen on the
phone.

However it gets killed because the the HeapWorker is trying to
finalize a SQLiteProgram object and needs the db lock that my
transaction thread has. See the attached trace back. The transaction
thread holding the lock is running (runnable) and is not blocked (it
is not included in the trace).

My question: Is there a way I can control the timeout for the
HeapWorker in my service ?

-thanks,
sandy8531.


11-20 10:41:11.496 E/dalvikvm( 1585): HeapWorker is wedged: 11561ms
spent inside Landroid/database/sqlite/SQLiteStatement;.finalize()V
11-20 10:41:11.496 I/dalvikvm( 1585): DALVIK THREADS:
11-20 10:41:11.666 I/dalvikvm( 1585):
11-20 10:41:11.666 I/dalvikvm( 1585): "HeapWorker" daemon prio=5 tid=5
WAIT
11-20 10:41:11.666 I/dalvikvm( 1585):   | group="system" sCount=1
dsCount=0 s=0 obj=0x421c6f70
11-20 10:41:11.666 I/dalvikvm( 1585):   | sysTid=1586 nice=0 sched=0/0
handle=1366240
11-20 10:41:11.666 I/dalvikvm( 1585):   at java.lang.Object.wait
(Native Method)
11-20 10:41:11.666 I/dalvikvm( 1585):   - waiting on <0x1c3e40> (a
java.lang.VMThread)
11-20 10:41:11.666 I/dalvikvm( 1585):   at java.lang.Thread.parkFor
(Thread.java:1332)
11-20 10:41:11.666 I/dalvikvm( 1585):   at
java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48)
11-20 10:41:11.666 I/dalvikvm( 1585):   at sun.misc.Unsafe.park
(Unsafe.java:319)
11-20 10:41:11.696 I/dalvikvm( 1585):   at
java.util.concurrent.locks.LockSupport.park(LockSupport.java:117)
11-20 10:41:11.696 I/dalvikvm( 1585):   at
java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt
(AbstractQueuedSynchronizer.java:680)
11-20 10:41:11.696 I/dalvikvm( 1585):   at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued
(AbstractQueuedSynchronizer.java:710)
11-20 10:41:11.696 I/dalvikvm( 1585):   at
java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire
(AbstractQueuedSynchronizer.java:1040)
11-20 10:41:11.696 I/dalvikvm( 1585):   at
java.util.concurrent.locks.ReentrantLock$FairSync.lock
(ReentrantLock.java:193)
11-20 10:41:11.696 I/dalvikvm( 1585):   at
java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:252)
11-20 10:41:11.716 I/dalvikvm( 1585):   at
android.database.sqlite.SQLiteDatabase.lock(SQLiteDatabase.java:222)
11-20 10:41:11.716 I/dalvikvm( 1585):   at
android.database.sqlite.SQLiteDatabase.removeSQLiteClosable
(SQLiteDatabase.java:160)
11-20 10:41:11.716 I/dalvikvm( 1585):   at
android.database.sqlite.SQLiteProgram.onAllReferencesReleased
(SQLiteProgram.java:68)
11-20 10:41:11.716 I/dalvikvm( 1585):   at
android.database.sqlite.SQLiteProgram.finalize(SQLiteProgram.java:242)
11-20 10:41:11.716 I/dalvikvm( 1585):   at
dalvik.system.NativeStart.run(Native Method)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to