AAPS 3.3.3.0_dev_b froze
This happened several times. I look at AAPS and find out that is has frozen during the night. I thought that it was related to Play Protect but it froze again this morning (a bit before 7 AM) and Play protect is OFF.
As you can see, there was a "catch-up" in BGs when I force closed, cleared cache and restarted AAPS.
The logs after force close and restart.
Got an other freeze to this night.
Since last time I enabled everything to log as I don't know what can cause those freeze.
I just updated to latest dev this morning after the freeze, I will see if it happen again
Edit : BG was back after a short time.
This happened several times. I look at AAPS and find out that is has frozen during the night. I thought that it was related to Play Protect but it froze again this morning (a bit before 7 AM) and Play protect is OFF.
No reason is visible in logs
I experienced the same 2 times on (86fb), reboot of phone fixed it. Checked the logs and also no reason visible. It didnt crash, it just hung on the latest sate. (it showed last bg was 3 min ago, so upon checking first i didnt notice it was broken). I pulled latest commits and see if i can get a logcat dump when it happens again:
Extras: Phone: Samsung S21FE, OneUI 6.1 (Android 14)
It happened on older commit (f737) but nothing in log. Can't replicate issue as it is random.
I'm on Android 15 (galaxy S23)
It didnt crash, it just hung on the latest state.
Same here. No crash, just froze. No reaction to taps etc.
Same here. No crash, just froze. No reaction to taps etc.
Only AAPS freezes - other apps and phone are then still responsive?
Only AAPS, I'm using byoda and it still get BG as usually. Phone can be use as usual
o meu AAPS 3.3.2.0 também trava. O comportamento dele é parecido com o LOOP Aberto. A quantidade de hidratos informada não diminui e as correções não acontecem. O problema é aleatório. Essa noite ele não fez uma única correção e amanheci com a glicemia alta, com 60g de hidratos que foram do meu jantar de ontem. Estava ativa somente a basal programada. Quando fui na aba SMB e atualizei ele gerou uma correção e aplicou, mas se não tivesse feito isso permaneceria congelado. Agora tomei meu café da manhã e parece que está funcionando o LOOP Fechado, mas se isso ficar acontecendo eu pensei em fazer um downgrade de versão, porque na 3.3.1 isso não acontecia.
o meu AAPS 3.3.2.0 também trava.
English please?
My AAPS 3.3.2.0 also freezes. Its behavior is similar to Open Loop. The amount of carbs entered does not decrease, and corrections do not happen. The problem is random. Last night, it didn’t make a single correction, and I woke up with high blood sugar, with 60g of carbs remaining from my dinner yesterday. Only the programmed basal was active. When I went to the SMB tab and refreshed it, it generated a correction and applied it, but if I hadn’t done that, it would have remained frozen. Now I’ve had breakfast, and it looks like Closed Loop is working, but if this keeps happening, I’m considering downgrading the version because this didn’t happen in 3.3.1
Latest dev (86fb) froze again last night, will pull logs and add to this comment in an hour. Weird behaviour is that I force closed AAPS and relaunched, but xdrip values are not being processed by AAPS (xdrip itself works fine, AAPS is functional except receiving BG), that might be a clue in the right direction
The same for me, xDrip had gotten all the BGs but they did NOT catch-up when AAPS was "force restarted".
One explanation is : AAPS didn't totally froze as it continued "listening" to arriving BGs but never registered or acted on them. When forced restart, it didn't say, last BG was hours ago, I need to catch-up but said, "ok, last BG was 2 min ago, waiting the next".
As it is NOT AAPS requesting BGs but xDrip sending them, and as xDrip sent normally all the past BGs, it just sends the next one when available.
The other (and more probable) explanation is : (This needs testing) Does, a forced closed AAPS catch-up BGs (when started 15+ minutes later) or not ?
Will test this today. My guess is that the BGs are missing in AAPS because xDrip had already sent them regularly and "doesn't care" if nobody was listening.
xDrip had gotten all the BGs but they did NOT catch-up when AAPS was "force restarted".
This happened for me too, i went to the shower and when i got back (phone was in range all the time), AAPS started receiving BG's again. Here's my reconstruction
- Freeze around 4:17
- Discovered around 6:50 (got pop upAAPS froze, force closed it and restarted AAPS <no bg's being received AFTER restart>
- BG's received since 07:08 (approx 20 min after restart)
Logcat logs mentioning AAPS (unfortunately crash is out of retention period)
froze_redacted_aaps_log.txt logcat_filtered_aaps.txt
Using BYODA and AAPS latest dev versions. Not experiencing "freezes" and It seems to me problems reported most are with xDrip+
My 2cts: (1) It seems to mee Google has been making Play Protect behaving more and more aggressive. Since my phone received an OS update month ago, it started to "block" AAPS. I can unblock, but (Samsungs) phones security keeps reminding about it being a "security risk"
(2) What is reported in this issue looks similar to what I experienced with BYODA some weeks ago after my Samsung S22 Ultra (running A14) received an OS update where Play Protect suddenly started to behave even much more aggressive. Until then I never had a need to switch it off.
Shortly after, on updating AAPS, Play Protect threw a big pop-up. Ignored it and installed AAPS anyway. That night I experienced with AAPS which has a striking resemblance with the "freezing" reported here: No problem with BYODA/Dexcom which was receiving BG values as usual, but AAPS just stopped receiving BG values from BYODA and loop stopped. Could not find the problem so got through the night with just profile basals.
Next morning it took me at least an hour to solve the problem:
- AAPS did not show any problems other than not receiving BG from BYODA.
- Switching of Play Protect and any power savings still active did not solve. Still, my idea was this could have do with permissions, but all permissions seemed OK ?!?
Then I noticed under AAPS permissions, "additional permissions" it now showed the "Access Dexcom app". Allowing/adding this permission solved the problem and AAPS immediately started receiving BG values! Noticed that the Dexcom app (BYODA) now also shows itself under "App Additional permissions" which I find a bit odd?
@MilosKozak I do have xDrip+ on the phone as a companion app, only receiving BG's from AAPS. For AAPS there is no such permission for xDrip+ under "App Additional permissions". Could it be AAPS needs to set some additional permissions similar to BYODA?
@All Did any of you try uninstalling xDrip, restarting the phone and then reinstalling latest xDrip+ (assuming this would reset permissions)?
Strange, I had that "App Additional permissions" line in AAPS permissions but when I checked right now, I can't see it.
It was there for some time now and had receive data from xDrip (os sth similar)
I'm using BYODA and i'm having same behavior randomly. What i've made since my last freeze :
- Updating AAPS
- Reset permissions and giving all access again
- Reinstall BYODA (to be sure and because last freeze was giving me trouble to get bg again in aaps (around 15 min after restart of aaps and then all bg were backfilled))
- Check again if play protect is off (it was)
About Additionnal Persmissions it was a while since it is here (can't remember when I saw it) but it was already on for me.
Using : Samsung S23 - Android 15 AAPS-dev- e266 Not using dynisf nor autoisf nor autosens.
Edit : No freeze since my report last week (or more)
I'm in a freeze state right now, and am watching logcat for androidAPS, while the app hangs, i see a lot of these warnings pass by:
2025-05-24 17:55:54.157 28348-24686 SQLiteConnectionPool info.nightscout.androidaps W The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 1368 (RxCachedThreadScheduler-277) with flags 0x2 for 1757.128 seconds.
Connections: 0 active, 1 idle, 3 available.
2025-05-24 17:55:54.158 28348-28971 SQLiteConnectionPool info.nightscout.androidaps W The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 181 (arch_disk_io_2) with flags 0x2 for 1757.129 seconds.
Connections: 0 active, 1 idle, 3 available.
2025-05-24 17:55:54.159 28348-28988 SQLiteConnectionPool info.nightscout.androidaps W The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 184 (arch_disk_io_3) with flags 0x2 for 1757.1171 seconds.
Connections: 0 active, 1 idle, 3 available.
2025-05-24 17:55:55.019 28348-5570 SQLiteConnectionPool info.nightscout.androidaps W The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 1510 (RxCachedThreadScheduler-290) with flags 0x2 for 1721.1881 seconds.
Connections: 0 active, 1 idle, 3 available.
2025-05-24 17:55:56.952 28348-26280 SQLiteConnectionPool info.nightscout.androidaps W The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 1381 (RxCachedThreadScheduler-278) with flags 0x2 for 1733.1411 seconds.
Connections: 0 active, 1 idle, 3 available.
These are logs from before and at the freeze (happening at 17:26)
05-24 17:25:59.047 1850 7290 W JobScheduler: Job didn't exist in JobStore: 9a13618 {androidx.work.systemjobscheduler} #u0a335/2125467 @[email protected]/androidx.work.impl.background.systemjob.SystemJobService
05-24 17:25:59.148 4318 4318 D PluginAODManager: onNotificationInfoUpdated() 0|info.nightscout.androidaps|4711|null|10335
05-24 17:25:59.244 4318 4318 D PluginAODManager: onNotificationInfoUpdated() 0|info.nightscout.androidaps|4711|null|10335
05-24 17:25:59.518 784 784 D io_stats: !@ Read_top(KB): loop46(5127) 256 cout.androidaps(28348) 168 loop12(913) 52
05-24 17:25:59.518 784 784 D io_stats: !@ Write_top(KB): cout.androidaps(28348) 1140 system_server(1850) 368 kworker/u16:4(28296) 172
05-24 17:26:18.314 784 784 D io_stats: !@ Write_top(KB): cout.androidaps(28348) 692 gearhead:shared(17478) 8
05-24 17:26:22.318 784 784 D io_stats: !@ Write_top(KB): kworker/u16:15(29596) 556 cout.androidaps(28348) 252 soft.appmanager(30653) 16
05-24 17:26:23.153 28348 28368 I cout.androidaps: Background concurrent copying GC freed 30MB AllocSpace bytes, 1(16KB) LOS objects, 25% free, 71MB/95MB, paused 120us,194us total 129.754ms
05-24 17:26:23.646 28348 28597 I NotificationManager: info.nightscout.androidaps: notify(4711, null, Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)) as user
05-24 17:26:23.660 4318 10179 D SecFgsManagerController: onForegroundStateChanged: [dialog:false]:[isForeground:true]:[packageName:info.nightscout.androidaps]:[token:android.os.BinderProxy@6ac0de2]:[userId:0]
05-24 17:26:23.662 28348 28348 D CORE : [main]: [DummyService.onStartCommand():68]: Starting DummyService with ID 4711 notification Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0)
05-24 17:26:23.664 4318 5766 D SecFgsManagerController: onForegroundStateChanged: [dialog:false]:[isForeground:true]:[packageName:info.nightscout.androidaps]:[token:android.os.BinderProxy@6ac0de2]:[userId:0]
05-24 17:26:23.866 1850 1850 D EdgeLightingManager: showForNotification : isInteractive=false, isHeadUp=true, color=0, canBypassDnd=false, sbn = StatusBarNotification(pkg=info.nightscout.androidaps user=UserHandle{0} id=4711 tag=null key=0|info.nightscout.androidaps|4711|null|10335: Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE|NO_CLEAR|FOREGROUND_SERVICE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0))
05-24 17:26:23.867 1850 1850 D EdgeLightingPolicyManager.NotificationGroup: Remove previous child data. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.867 1850 1850 I EdgeLightingManager: showForNotificationScreenOff Alert once notification. sbn: StatusBarNotification(pkg=info.nightscout.androidaps user=UserHandle{0} id=4711 tag=null key=0|info.nightscout.androidaps|4711|null|10335: Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE|NO_CLEAR|FOREGROUND_SERVICE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0))
05-24 17:26:23.878 1850 1850 D EdgeLightingManager: showForNotification : isInteractive=false, isHeadUp=true, color=0, canBypassDnd=false, sbn = StatusBarNotification(pkg=info.nightscout.androidaps user=UserHandle{0} id=4711 tag=null key=0|info.nightscout.androidaps|4711|null|10335: Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE|NO_CLEAR|FOREGROUND_SERVICE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0))
05-24 17:26:23.878 1850 1850 D EdgeLightingPolicyManager.NotificationGroup: Remove previous child data. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.878 1850 1850 I EdgeLightingManager: showForNotificationScreenOff Alert once notification. sbn: StatusBarNotification(pkg=info.nightscout.androidaps user=UserHandle{0} id=4711 tag=null key=0|info.nightscout.androidaps|4711|null|10335: Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE|NO_CLEAR|FOREGROUND_SERVICE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0))
05-24 17:26:23.884 1850 1850 D EdgeLightingManager: showForNotification : isInteractive=false, isHeadUp=true, color=0, canBypassDnd=false, sbn = StatusBarNotification(pkg=info.nightscout.androidaps user=UserHandle{0} id=4711 tag=null key=0|info.nightscout.androidaps|4711|null|10335: Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE|NO_CLEAR|FOREGROUND_SERVICE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0))
05-24 17:26:23.884 1850 1850 D EdgeLightingPolicyManager.NotificationGroup: Remove previous child data. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.884 1850 1850 I EdgeLightingManager: showForNotificationScreenOff Alert once notification. sbn: StatusBarNotification(pkg=info.nightscout.androidaps user=UserHandle{0} id=4711 tag=null key=0|info.nightscout.androidaps|4711|null|10335: Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE|NO_CLEAR|FOREGROUND_SERVICE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0))
05-24 17:26:23.892 4318 4318 D Bubbles : onEntryUpdated : shouldBubbleUp=true ,key=0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.893 4762 7451 I HoneySpace.NotificationListener: onNotificationPosted info.nightscout.androidaps: 0|info.nightscout.androidaps|4711|null|10335: 0
05-24 17:26:23.893 4762 7451 I HoneySpace.BadgeDataSourceImpl: Get notification count. PK(p='info.nightscout.androidaps', u=UserHandle{0}) - forceBadgeCount: false, notification listener: 1, badge provider: 0
05-24 17:26:23.894 4762 9118 I HoneySpace.PackageEventOperator: [CustomApplistViewModel] badge count is updated. info.nightscout.androidaps/app.aaps.MainActivity#UserHandle{0}|149 : 1
05-24 17:26:23.894 4318 4318 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.896 4318 4318 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.905 4762 7451 I HoneySpace.NotificationListener: onNotificationPosted info.nightscout.androidaps: 0|info.nightscout.androidaps|4711|null|10335: 0
05-24 17:26:23.905 4762 7451 I HoneySpace.BadgeDataSourceImpl: Get notification count. PK(p='info.nightscout.androidaps', u=UserHandle{0}) - forceBadgeCount: false, notification listener: 1, badge provider: 0
05-24 17:26:23.905 4762 7451 I HoneySpace.NotificationListener: onNotificationPosted info.nightscout.androidaps: 0|info.nightscout.androidaps|4711|null|10335: 0
05-24 17:26:23.905 4762 10147 I HoneySpace.PackageEventOperator: [CustomApplistViewModel] badge count is updated. info.nightscout.androidaps/app.aaps.MainActivity#UserHandle{0}|149 : 1
05-24 17:26:23.906 4762 7451 I HoneySpace.BadgeDataSourceImpl: Get notification count. PK(p='info.nightscout.androidaps', u=UserHandle{0}) - forceBadgeCount: false, notification listener: 1, badge provider: 0
05-24 17:26:23.906 4762 10148 I HoneySpace.PackageEventOperator: [CustomApplistViewModel] badge count is updated. info.nightscout.androidaps/app.aaps.MainActivity#UserHandle{0}|149 : 1
05-24 17:26:23.909 4318 4318 D Bubbles : onEntryUpdated : shouldBubbleUp=true ,key=0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.910 4318 4318 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.910 4318 4318 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.911 4318 4318 D Bubbles : onEntryUpdated : shouldBubbleUp=true ,key=0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.911 4318 4318 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.912 4318 4318 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.918 4318 4318 I View : setRequestedFrameRate frameRate=-2.0, this=StatusBarIconView(slot='info.nightscout.androidaps/0x1267' alpha=1.0 icon=StatusBarIcon(icon=Icon(typ=RESOURCE pkg=info.nightscout.androidaps id=0x7f0801a5) visible user=0 ) visibleState=ICON iconColor=#ffffffff staticDrawableColor=#ffffffff decorColor=#ffffffff animationStartColor=#0 currentSetColor=#ffffffff notification=StatusBarNotification(pkg=info.nightscout.androidaps user=UserHandle{0} id=4711 tag=null key=0|info.nightscout.androidaps|4711|null|10335: Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE|NO_CLEAR|FOREGROUND_SERVICE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0))), caller=com.android.systemui.statusbar.StatusBarIconView.onAttachedToWindow:6 android.view.View.dispatchAttachedToWindow:24133 android.view.ViewGroup.addViewInner:5556 android.view.ViewGroup.addView:5332 android.view.ViewGroup.addView:5272
05-24 17:26:23.924 4318 4318 I View : setRequestedFrameRate frameRate=-2.0, this=StatusBarIconView(slot='info.nightscout.androidaps/0x1267' alpha=1.0 icon=StatusBarIcon(icon=Icon(typ=RESOURCE pkg=info.nightscout.androidaps id=0x7f0801a5) visible user=0 ) visibleState=ICON iconColor=#fffafaff staticDrawableColor=#ffb7caff decorColor=#ff1b6cf7 animationStartColor=#0 currentSetColor=#fffafaff notification=StatusBarNotification(pkg=info.nightscout.androidaps user=UserHandle{0} id=4711 tag=null key=0|info.nightscout.androidaps|4711|null|10335: Notification(channel=AndroidAPS-Ongoing shortcut=null contentView=null vibrate=null sound=null defaults=0 flags=ONGOING_EVENT|ONLY_ALERT_ONCE|NO_CLEAR|FOREGROUND_SERVICE color=0x00000000 category=status vis=PRIVATE semFlags=0x0 semPriority=0 semMissedCount=0))), caller=com.android.systemui.statusbar.StatusBarIconView.onAttachedToWindow:6 android.view.View.dispatchAttachedToWindow:24133 android.view.ViewGroup.addViewInner:5556 android.view.ViewGroup.addView:5332 android.view.ViewGroup.addView:5272
05-24 17:26:23.935 4318 4318 D PluginAODManager: onNotificationInfoUpdated() 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:23.957 4318 4318 I AppIconSolution: start to load, pkg=info.nightscout.androidaps, bg=192-192, dr=126-126, forDefault=true, density=0
05-24 17:26:23.958 4318 4318 I AppIconSolution: getIconScale, pkg=info.nightscout.androidaps, size=126, iconScale=IconScale[alpha=5, scale=0.72, isCrop=false]
05-24 17:26:23.962 4318 4318 I AppIconSolution: default container[Contain], pkg=info.nightscout.androidaps, bg=162-162, dr=126-126, isNight = true
05-24 17:26:24.003 4318 4318 I AppIconSolution: start to load, pkg=info.nightscout.androidaps, bg=192-192, dr=126-126, forDefault=true, density=0
05-24 17:26:24.004 4318 4318 I AppIconSolution: getIconScale, pkg=info.nightscout.androidaps, size=126, iconScale=IconScale[alpha=5, scale=0.72, isCrop=false]
05-24 17:26:24.008 4318 4318 I AppIconSolution: default container[Contain], pkg=info.nightscout.androidaps, bg=162-162, dr=126-126, isNight = true
05-24 17:26:24.028 4318 4318 D PluginAODManager: onNotificationInfoUpdated() 0|info.nightscout.androidaps|4711|null|10335
05-24 17:26:24.054 28348 28368 I cout.androidaps: Background concurrent copying GC freed 34MB AllocSpace bytes, 1(20KB) LOS objects, 24% free, 72MB/96MB, paused 92us,139us total 151.947ms
05-24 17:26:25.092 28348 28368 I cout.androidaps: Background concurrent copying GC freed 30MB AllocSpace bytes, 0(0B) LOS objects, 25% free, 71MB/95MB, paused 1.716ms,230us total 166.652ms
05-24 17:26:26.664 28348 28368 I cout.androidaps: Background concurrent copying GC freed 29MB AllocSpace bytes, 0(0B) LOS objects, 25% free, 69MB/93MB, paused 1.666ms,227us total 147.306ms
05-24 17:26:31.495 28348 28368 I cout.androidaps: Background concurrent copying GC freed 26MB AllocSpace bytes, 174(3468KB) LOS objects, 25% free, 70MB/94MB, paused 89us,94us total 151.793ms
05-24 17:26:31.900 4502 12017 I BtGatt.GattService: clientConnect(info.nightscout.androidaps) - address = XX:XX:XX:XX:2F:63, addressType=0, isDirect=true transport=2, clientIf=9, opportunistic=false, phy=1
05-24 17:26:32.468 27891 12802 W FA-SVC : Gms url request failed, app: info.nightscout.androidaps, CONFIG, m1.ll: Exception in CronetUrlRequest: net::ERR_CONNECTION_REFUSED, ErrorCode=7, InternalErrorCode=-102, Retryable=false
05-24 17:26:33.004 784 784 D io_stats: !@ Read_top(KB): cout.androidaps(28348) 4
05-24 17:26:33.004 784 784 D io_stats: !@ Write_top(KB): cout.androidaps(28348) 484 kworker/u16:12(28302) 304 kworker/u16:11(19590) 132
05-24 17:26:34.033 4502 5006 W BtGatt.GattService: pkgName : info.nightscout.androidaps
05-24 17:26:41.020 784 784 D io_stats: !@ Read_top(KB): ssgtzd(1459) 748 id.gms.unstable(11681) 40 cout.androidaps(28348) 12
05-24 17:26:41.020 784 784 D io_stats: !@ Write_top(KB): kworker/u16:14(12552) 640 cout.androidaps(28348) 132
05-24 17:26:41.031 28348 28971 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 181 (arch_disk_io_2) with flags 0x2 for 4.0 seconds.
05-24 17:26:41.031 28348 28968 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 180 (arch_disk_io_1) with flags 0x2 for 4.0 seconds.
05-24 17:26:41.032 28348 24686 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 1368 (RxCachedThreadScheduler-277) with flags 0x2 for 4.0020003 seconds.
05-24 17:26:41.032 28348 28721 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 157 (arch_disk_io_0) with flags 0x2 for 4.0010004 seconds.
05-24 17:26:41.042 28348 28988 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 184 (arch_disk_io_3) with flags 0x2 for 4.0 seconds.
05-24 17:26:45.032 28348 28971 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 181 (arch_disk_io_2) with flags 0x2 for 8.002001 seconds.
05-24 17:26:45.033 28348 28968 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 180 (arch_disk_io_1) with flags 0x2 for 8.001 seconds.
05-24 17:26:45.033 28348 24686 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 1368 (RxCachedThreadScheduler-277) with flags 0x2 for 8.004001 seconds.
05-24 17:26:45.033 28348 28721 W SQLiteConnectionPool: The connection pool for database '/data/user/0/info.nightscout.androidaps/databases/androidaps.db' has been unable to grant a connection to thread 157 (arch_disk_io_0) with flags 0x2 for 8.002001 seconds.
Pretty sure its related to the database connection failing for some reason
Update 26-05 22:00: Froze again, same SQLiteConnectionPool error. Completely disabled play protect after last weeks freeze. Will now fully reinstall both Xdrip and AAPS to see if that solves anything, Oneui 7, android 15, samsung s21FE
Update: Did a full reinstall, of xdrip and AAPS 3.3.3.0-dev (e2666), (i think we should really streamline the process of setting up permissions etc), when pulling all data from NS, i experienced a hang again and it was the same SQLiteConnectionPool error
(i'll update this post as i try to debug whats happening)
database overloading after full sync is resolved in dev
@MilosKozak I had not done any full sync ( but my phone only uploads to NS (api v3) when charging at night) but had the freezes too.
Didn't have any freezes for some days. Running dev built on 18/05.
Did a full reinstall, of xdrip and AAPS 3.3.3.0-dev (e2666)
That's older commit form May 15th without the fix. Try latest?
That's older commit form May 15th without the fix. Try latest?
Yeah that was me not having my morning coffee yet, i pulled latest and am expieriencing instant freezes, this is what my logcat shows me:
Update: After a database reset this seems to happen during a NS full sync, the Queue numbers stopped going down (now going down very very slowly) when these logcat messages appear (40k entries remaining)
the calculation progress bar is very slow, eventually it finishes
AAPS export is being corrupted.
Update: Cleared database and synced NS(3) again:
(this includes a hang and pop up from android)
temp workaround, not fully syncing NS (historical BG)
last update (for this debug session):
This is also my reproducable way: set everything up, without ns backsync (but with profile pull etc), everything works as expected, when i click full sync, ns sync goes through with a few "isn't responding" notifications because it's so busy with the NS entries, after the sync i get in a very slow state of the app with repeating "isnt responding" notifications, where logcat is wating for blocking GC Allocs. My suspicion now is that it's in the statistics calculation. Froze state can be reset by clearing the database and pulling everything from NS except historical BG data.
Update:... just realized I have been merging PR3968: @MilosKozak With that I do not experience any freezing.
Just installed current AAPS dev commit without merging PR3968 on my Nokia 5.4 test phone: it completely freezes (close app / wait pop-up) when trying a full NS sync.... When I then "close" AAPS, on reopen I can continue full sync successfully. Subsequent sync are experiencing som app freezing but eventually finish successfully also.
Also noted during full sync queue is not used (at least UI shows "queue: n.a")
So PR3968 fixes a problem that is in current dev?
Solved my issue, in the database was a carbs entry with a duration of 216000000000 (default for unlimited). This caused the carbs.expand function to create loads of allocations, freezing my app:
Solved by running a debug version and removing the duration field of that carb entry
Solved my issue, in the database was a carbs entry with a duration of 216000000000 (default for unlimited).
Good find! Question is, how did it get there ;-)
Do you know how it happened?
Solved my issue, in the database was a carbs entry with a duration of 216000000000 (default for unlimited).
Good find! Question is, how did it get there ;-)
Been able to reproduce the issue now
My steps:
- Clear database
- Attempt full sync
- Switch to action tab during sync
- App freezes for me with following logcat messages:
- Quit app as suggested by prompt
- Start app again
- This behavior likely corrupts/interrupts the database entry Proof that the mongo entry is okay:
Solving this issue completely would likely require an overhaul of the database entry / sync mechanism to catch these occurrences, suggested fix in #4002 is a solution to prevent the app from freezing if it happens
Managed to grab the logcat entries during import:
05-27 08:47:22.420 27144 27207 I XDRIP : [DefaultDispatcher-worker-3]: [DataSyncSelectorXdripImpl.processChangedCarbs():238]: Loading Carbs data Start: 2522 CA(id=2523, version=0, dateCreated=1748327791841, isValid=true, referenceId=null, ids=IDs(nightscoutSystemId=null, nightscoutId=15afcda2-34f1-5831-9932-9ab9cdf64276, pumpType=null, pumpSerial=null, temporaryId=null, pumpId=null, startId=null, endId=null), timestamp=1741621206000, utcOffset=3600000, duration=216000000000, amount=10.0, notes=) forID: 2523
05-27 09:07:43.878 27144 27571 D NSCLIENT: [DefaultDispatcher-worker-7]: [NsIncomingDataProcessor.processTreatments():147]: Received NS treatment: NSCarbs(date=1741621206000, device=null, identifier=15afcda2-34f1-5831-9932-9ab9cdf64276, units=MG_DL, srvModified=1741624820156, srvCreated=1741624820156, utcOffset=60, subject=wessel, isReadOnly=false, isValid=true, eventType=CARBS_CORRECTION, notes=, pumpId=null, endId=null, pumpType=null, pumpSerial=null, app=null, carbs=10.0, duration=216000000000)
05-27 09:13:33.204 27144 27561 D NSCLIENT: [DefaultDispatcher-worker-6]: [NsIncomingDataProcessor.processTreatments():147]: Received NS treatment: NSCarbs(date=1741621206000, device=null, identifier=15afcda2-34f1-5831-9932-9ab9cdf64276, units=MG_DL, srvModified=1741624820156, srvCreated=1741624820156, utcOffset=60, subject=wessel, isReadOnly=false, isValid=true, eventType=CARBS_CORRECTION, notes=, pumpId=null, endId=null, pumpType=null, pumpSerial=null, app=null, carbs=10.0, duration=216000000000)
I think i nailed it down to the exact issue @MilosKozak :
On 2025-03-10 (when i was running a dev built on 03-03), something caused a Carb correction with the duration of 3600000 entry in my nightscout database (too far back to trace what caused this exactly, but it's there)
The logic in ThreatmentMapper.kt: https://github.com/nightscout/AndroidAPS/blob/9c1e037d4d89549d22a84484456f97d41def1791/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/mapper/TreatmentMapper.kt#L60
(if i understand it correctly) Which will: set durationinMilliseconds to durationInMilliseconds, which does not extist in the incoming document, so it'll take the duration (3600000) and convert it to milliseconds, maxing out the value to 216000000000 (max database value)
Whenever i enter a new carb entry (dev branch), the duration gets set correctly to minutes, so it's likely a past issue which has been resolved already, but still lives in my nightscout database (again, was running build from 03-03 that time), there has been one commit related to handling this information in april: https://github.com/nightscout/AndroidAPS/commit/9b90eea7740e86d8e614ce3b6b98a912348e2668 https://github.com/nightscout/AndroidAPS/issues/3917
(top document is what i just entered) so no issue will arise.
Ideally we would check this on importing before multiplying to milliseconds, but the proposed change is a simple and effective safeguard if this happens in the database
Froze again this morning, around 6:25 AM. I'm on Android 15 OneUI 7.0 now.
When I look in the treatments tab, the only thing near 6:25 is this. And it is a bit strange, 14 min not 15 min !temp basal.
@robertrub by any chance are you able to pull a logcat from the time around the freeze?
Adb.exe logcat > log.txt
or in android studio in the left lower bottom (here you can filter for androidAPS which)
Logcat doesn't go back in time very long, depending on how many logs often an hour or 2.