Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Sentry sdk cause ANR #2084

Closed
cj3479 opened this issue Aug 9, 2023 · 10 comments
Closed

Android Sentry sdk cause ANR #2084

cj3479 opened this issue Aug 9, 2023 · 10 comments
Labels

Comments

@cj3479
Copy link

cj3479 commented Aug 9, 2023

Description
The Sentry flutter version is 6.22.0

When I monitor weak network,I can reproduce the ANR. The below is ANR stack trace

"main" prio=5 tid=1 TimedWaiting
| group="main" sCount=1 dsCount=0 flags=1 obj=0x72ead6a8 self=0x6fa1862380
| sysTid=14241 nice=-10 cgrp=default sched=0/0 handle=0x70c81764f8
| state=S schedstat=( 124935273208 15636228127 402071 ) utm=8709 stm=3783 core=6 HZ=100
| stack=0x7fecc02000-0x7fecc04000 stackSize=8192KB
| held mutexes=
at sun.misc.Unsafe.park(Native method)

waiting on an unknown object
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2109)
at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1486)
at io.sentry.transport.AsyncHttpTransport.close(AsyncHttpTransport.java:3)
at io.sentry.SentryClient.close(SentryClient.java:3)
at io.sentry.Hub.close(Hub.java:10)
at io.sentry.Sentry.init(Sentry.java:22)
locked <0x070858c1> (a java.lang.Class<io.sentry.Sentry>)
at io.sentry.Sentry.init(Sentry.java:6)
at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:7)
locked <0x0fdec866> (a java.lang.Class<io.sentry.android.core.SentryAndroid>)
at io.sentry.android.core.SentryAndroid.init(SentryAndroid.java:3)
at io.sentry.flutter.SentryFlutterPlugin.initNativeSdk(SentryFlutterPlugin.kt:7)
at io.sentry.flutter.SentryFlutterPlugin.onMethodCall(SentryFlutterPlugin.kt:18)
at o.a.d.a.i$a.a(MethodChannel.java:4)
at o.a.c.b.f.c.d(DartMessenger.java:1)
at o.a.c.b.f.a.run(lambda:11)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

@getsantry
Copy link

getsantry bot commented Aug 9, 2023

Assigning to @getsentry/support for routing ⏲️

@getsantry
Copy link

getsantry bot commented Aug 9, 2023

Routing to @getsentry/product-owners-issues for triage ⏲️

@ceorourke
Copy link
Member

Should this go to the https://github.com/getsentry/sentry-dart repo? This seems like an SDK issue rather than something to do with issues.

@arc-yong
Copy link

arc-yong commented May 31, 2024

any update on this? I face the same issue.

@leeandher leeandher self-assigned this Jun 3, 2024
@leeandher leeandher transferred this issue from getsentry/sentry Jun 3, 2024
@leeandher leeandher removed their assignment Jun 3, 2024
@buenaflor
Copy link
Contributor

@arc-yong what sdk version are you using?

@toannmdev
Copy link

I faced the same issue
My sentry_flutter version is 7.13.1
This issue happens when my Sentry server is down.

jdk.internal.misc.Unsafe.park (Native method)
java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:234)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2123)
java.util.concurrent.ThreadPoolExecutor.awaitTermination (ThreadPoolExecutor.java:1461)
io.sentry.transport.AsyncHttpTransport.close (AsyncHttpTransport.java:143)
io.sentry.SentryClient.close (SentryClient.java:903)
io.sentry.Hub.close (Hub.java:359)
io.sentry.Sentry.init (Sentry.java:222)
io.sentry.Sentry.init (Sentry.java:147)
io.sentry.android.core.SentryAndroid.init (SentryAndroid.java:89)
io.sentry.android.core.SentryAndroid.init (SentryAndroid.java:70)
io.sentry.flutter.SentryFlutterPlugin.initNativeSdk (SentryFlutterPlugin.kt:126)
io.sentry.flutter.SentryFlutterPlugin.onMethodCall (SentryFlutterPlugin.kt:57)
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage (MethodChannel.java:258)
io.flutter.embedding.engine.dart.DartMessenger.invokeHandler (DartMessenger.java:295)
io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0 (DartMessenger.java:322)
android.os.Handler.handleCallback (Handler.java:942)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:240)
android.os.Looper.loop (Looper.java:351)
android.app.ActivityThread.main (ActivityThread.java:8423)
java.lang.reflect.Method.invoke (Native method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:584)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)

@toannmdev
Copy link

jdk.internal.misc.Unsafe.park (Native method)
java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:234)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2123)
java.util.concurrent.ThreadPoolExecutor.awaitTermination (ThreadPoolExecutor.java:1461)
io.sentry.transport.AsyncHttpTransport.close (AsyncHttpTransport.java:143)
io.sentry.SentryClient.close (SentryClient.java:903)
io.sentry.Hub.close (Hub.java:359)
io.sentry.Sentry.init (Sentry.java:222)
io.sentry.Sentry.init (Sentry.java:147)
io.sentry.android.core.SentryAndroid.init (SentryAndroid.java:89)
io.sentry.android.core.SentryAndroid.init (SentryAndroid.java:70)
io.sentry.flutter.SentryFlutterPlugin.initNativeSdk (SentryFlutterPlugin.kt:126)
io.sentry.flutter.SentryFlutterPlugin.onMethodCall (SentryFlutterPlugin.kt:57)
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage (MethodChannel.java:258)
io.flutter.embedding.engine.dart.DartMessenger.invokeHandler (DartMessenger.java:295)
io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0 (DartMessenger.java:322)
android.os.Handler.handleCallback (Handler.java:942)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loopOnce (Looper.java:240)
android.os.Looper.loop (Looper.java:351)
android.app.ActivityThread.main (ActivityThread.java:8423)
java.lang.reflect.Method.invoke (Native method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:584)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)

This happens on android only

@buenaflor
Copy link
Contributor

@toannmdev this might be related to this fix getsentry/sentry-java#3200

try to upgrade to our flutter sdk >= 7.17.0 and see if this problem remains

@toannmdev
Copy link

utter sdk >= 7.17.0 and see if this

Thank you, Let me try this

@getsantry
Copy link

getsantry bot commented Jul 9, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Jul 9, 2024
@getsantry getsantry bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Archived in project
Archived in project
Development

No branches or pull requests

6 participants