ANR when getting RouterInfo #47
Open
opened 2025-04-21 14:45:17 -04:00 by idk
·
6 comments
No Branch/Tag Specified
master
i2p-android-2.8.0-androidx
2.3.0-translations
i2p-android-2.9.0
i2p-android-2.8.2
i2p-android-2.8.0-1
i2p-android-2.8.0
i2p-android-2.7.1
2.7.1
i2p-android-2.7.0
i2p-android-2.6.0
i2p-android-2.5.1
i2p-android-2.5.2
i2p-android-2.5.0
i2p-android-2.4.2-test
i2p-android-2.4.1-test
i2p-android-2.4.0
i2p-2.3.0
android-2.2.1
i2p-android-2.2.0
i2p-android-2.1.1
android-2.1.0
android-2.0.1
android-2.0.0
android-1.9.0
i2p-android-1.8.1
android-1.8.1
android-1.8.0
android-1.7.1
android-1.7.0
android-1.6.1
android-1.6.0
android-1.5.0
android-0.9.50
android-0.9.49
android-0.9.48
0.9.48
android-0.9.47-1
android-0.9.47
android-0.9.46
android-0.9.45
android-0.9.44
android-0.9.43
android-0.9.42
android-0.9.41
android-0.9.40
android-0.9.39
android-0.9.38
android-0.9.37
android-0.9.36
android-0.9.35
android-0.9.34
android-0.9.29
android-helper-0.9.3
android-client-0.9.29
android-0.9.28
android-helper-0.9.2
android-client-0.9.28
android-0.9.27
android-helper-0.9.1
android-client-0.9.27
android-0.9.26
android-client-0.9
android-0.9.25
android-client-0.8
android-0.9.22
android-0.9.20
android-client-0.7
android-0.9.19.1
android-0.9.19
android-client-0.6
android-0.9.18
android-client-0.5.1
android-client-0.5
android-0.9.17.1
android-0.9.17
android-client-0.4
android-client-0.3
android-0.9.15.1
android-0.9.15
android-client-0.2
android-0.9.13-0_b2-API8
android-0.9.13-0_b1-API8
android-0.9.12-0_b1-API8
android-0.9.11-0_b1-API8
android-0.9.10-0_b1-API8
android-0.9.9-0_b0-API8
android-0.9.8.1-0_b1-API8
android-0.9.7.1-0_b4-API8
android-0.9.7-0_b2-API8
android-0.9.1-0_b1-API8
android-0.8.7-4_b1-API8
i2p-0.8.6
i2p-0.8.5
i2p-0.8.4
i2p-0.8.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p_0_3_4_1
i2p_0_3_4
i2p_0_3_3
i2p_0_3_2_3
i2p_0_3_2_2
i2p_0_3_2_1
i2p_0_3_2
i2p_0_3_1_5
i2p_0_3_1_4
i2p_0_3_1_3
i2p_0_3_1_2
i2p_0_3_1_1
i2p_0_3_1
i2p_0_3_0_4
i2p_post_great_renaming
i2p_0_3_0_3
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: I2P_Developers/i2p.android.base#47
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Opened 3 years ago
Last modified 2 years ago
#2096assigneddefect
ANR when getting RouterInfo
Reported by:str4dOwned by:Meeh
Priority:
minor
Milestone:
0.9.42
Component:
apps/android
Version:
0.9.31
Keywords:
I2P Android, hang
Cc:
Parent Tickets:
Sensitive:
no
Description
Seen on various Android devices:
The thread holding the lock isn't shown in any of the reports, but I'm guessing it is a call to
Router.rebuildRouterInfo(blockingRebuild=true)
.Would it make sense to move the publishing of the RouterInfo? outside the lock? Publishing happens after a call to
Router.setRouterInfo(ri)
, at which point other callers toRouter.getRouterInfo()
should be able to proceed fine (and the publisher is one such caller).Subtickets
Familiarizing myself with this issue, looks like the relevant chunk of code from up zzz's post is: https://i2pgit.org/i2p-hackers/i2p.android.base/-/blob/master/app/src/main/java/net/i2p/android/router/util/Util.java#L418 https://i2pgit.org/i2p-hackers/i2p.i2p/-/blob/master/apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryHelper.java#L222
comment:5 Changed 2 years ago by zzz
Milestone:0.9.33 →
0.9.42Owner:
changed from str4d to Meeh
comment:4 Changed 3 years ago by zzz
@str4d please fix for .34 if wasn't fixed in .33, please update this ticket
comment:3 Changed 3 years ago by zzz
Component:router/general →
apps/androidOwner:
set to _str4d_Status:open →
assigned
Changed to a r/w lock in 821022ec07265c32461b5106f2a72b0ef00c2c61 to be 0.9.32-15.
Reassigning to OP to look at Android Util.getNetStatus().
comment:2 Changed 3 years ago by zzz
Milestone:undecided →
0.9.33
I searched and could only find two places in the code where we call rebuildRouterInfo(true).
FloodfillMonitorJob?, where we switch from non-ff to ff, or vice versa. Will never happen on Android.
FloodfillNetworkDatabaseFacade?,shutdown(), when we are floodfill. Will never happen on Android.
However, even when blockingRebuild == false, it may take quite a while, as it calls commSystem.createAddresses() which has locks of its own and may hae a lot of work to do.
In Router, I'll change the locking to a read/write lock, but that won't help if it's stuck in createAddresses().
I think the fix for you is to just remove the call to get the router info, and the detailed checks for what's in the NTCP and SSU addresses in Util.getNetStatus(). This looks like code copied from console SummaryHelper?.reachability(). A lot of the special cases we put into specific error messages in the console aren't really necessary in Android. It's a simpler UI with much less configuration options, a lot less ability for the user to misconfigure something, and less facilities to fix something that's broken.
Now that we have a lot of states that can get returned from commSystem.getStatus(), that should be granular enough without needing to inspect the RouterInfo? contents. If not, we could consider adding yet more states to getStatus().
comment:1 Changed 3 years ago by zzz
Status:new →
open
Worth researching why it's the way it is. netdb.publish(), when inline, can take a while, especially with 1800+ floodfills to choose from.