youngj / EnvayaSMS

Simple SMS and MMS gateway running on Android
http://sms.envaya.org
Other
159 stars 177 forks source link

Application Not Responding (ANR) issue... #39

Open carlosfvieira opened 8 years ago

carlosfvieira commented 8 years ago

Anyone experiencing ANR?

When sending hundreds of SMS, sometimes, and only sometimes, the app crashes and stays not responsive ... even clicking in wait button in ANR dialog, the app is still not responsive, and i can't even disable the service... can't go the menu to disable envaya sms. So, when this happens, the only solution is to go to the android applications list in the system configuration and stop the app...

Any idea why is this happening... it seems that there's something that is blocking the UI Thread... but by design it shouldn't...

Thanks!

carlosfvieira commented 8 years ago

found deadlock

"main" prio=5 tid=1 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x74c3ca78 self=0xb4827800
  | sysTid=22450 nice=0 cgrp=apps sched=0/0 handle=0xb6fe9ec8
  | state=S schedstat=( 89457718 75369109 234 ) utm=5 stm=3 core=0 HZ=100
  | stack=0xbe42b000-0xbe42d000 stackSize=8MB
  | held mutexes=
  at org.envaya.sms.Inbox.messageFailed(Inbox.java:97)
  - waiting to lock <0x3c999acf> (a org.envaya.sms.Inbox) held by thread 15 (tid=15)

"IntentService[CheckMessagingService]" prio=5 tid=15 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x22c0c0f0 self=0xab5a5c00
  | sysTid=22487 nice=0 cgrp=apps sched=0/0 handle=0xb4910f00
  | state=S schedstat=( 21676718 13801094 67 ) utm=2 stm=0 core=1 HZ=100
  | stack=0xa1b33000-0xa1b35000 stackSize=1036KB
  | held mutexes=
  at org.envaya.sms.DatabaseHelper.insertPendingMessage(DatabaseHelper.java:176)
  - waiting to lock <0x0e0708e1> (a org.envaya.sms.DatabaseHelper) held by thread 16 (tid=16)
  at org.envaya.sms.Inbox.forwardMessage(Inbox.java:39)
  - locked <0x3c999acf> (a org.envaya.sms.Inbox)

"IntentService[EnabledChangedService]" prio=5 tid=16 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x22c0c160 self=0xab5a6000
  | sysTid=22488 nice=0 cgrp=apps sched=0/0 handle=0xb4911180
  | state=S schedstat=( 41954584 20961093 70 ) utm=3 stm=1 core=0 HZ=100
  | stack=0xa1a2d000-0xa1a2f000 stackSize=1036KB
  | held mutexes=
  at org.envaya.sms.Inbox.forwardMessage(Inbox.java:29)
  - waiting to lock <0x3c999acf> (a org.envaya.sms.Inbox) held by thread 15 (tid=15)
  at org.envaya.sms.DatabaseHelper.restorePendingIncomingMessages(DatabaseHelper.java:118)
  at org.envaya.sms.DatabaseHelper.restorePendingMessages(DatabaseHelper.java:61)
  - locked <0x0e0708e1> (a org.envaya.sms.DatabaseHelper)