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

Crash in DefaultAudioClientObserver#onMetrics #419

Closed
tmilovan123 opened this issue Apr 8, 2022 · 7 comments
Closed

Crash in DefaultAudioClientObserver#onMetrics #419

tmilovan123 opened this issue Apr 8, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@tmilovan123
Copy link

Describe the bug
A fatal crash encountered for one of our customers in production. Opening a tracking issue.

To Reproduce
Happened during AV session at some point during metric emission.

Expected behavior
No crash

Logs
Stacktrace:

java.util.ConcurrentModificationException: null
    at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:760)
    at java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:793)
    at java.util.LinkedHashMap$LinkedEntryIterator.next(LinkedHashMap.java:791)
    at com.amazonaws.services.chime.sdk.meetings.internal.metric.DefaultClientMetricsCollector.maybeEmitMetrics(DefaultClientMetricsCollector.kt:88)
    at com.amazonaws.services.chime.sdk.meetings.internal.metric.DefaultClientMetricsCollector.processAudioClientMetrics(DefaultClientMetricsCollector.kt:31)
    at com.amazonaws.services.chime.sdk.meetings.internal.audio.DefaultAudioClientObserver.onMetrics(DefaultAudioClientObserver.kt:340)

Test environment Info (please complete the following information):

  • Device: SM-G991U
  • OS: Android 12
  • Version amazon-chime-sdk: 0.13.1
  • Version amazon-chime-sdk-media: 0.13.1
  • Can you reproduce this in the demo app? No
@dingyishen-amazon
Copy link
Contributor

Thank you for reporting. If it cannot be reproduced on demo app, it’d be more efficient to compare the difference of implementation logic between your application and demo app.

@tmilovan123
Copy link
Author

It most likely can be reproduced since, as it's evident from the stack trace, DefaultClientMetricsCollector is using a non-thread-safe collections to store in-memory data. Something that can definitely be corrected.

@hokyungh
Copy link
Contributor

Thanks for reporting. As you stated, It does look like it is not thread-safe. Will update the ticket once we have solutions.

@hokyungh hokyungh added the bug Something isn't working label Apr 12, 2022
@georgezy-amzn
Copy link
Collaborator

According to the stacktrace, it happens at DefaultClientMetricsCollector.maybeEmitMetrics(DefaultClientMetricsCollector.kt:88). I checked DefaultClientMetricsCollector for v0.13.1, there is no line 88.
Are you using a custom build?

@tmilovan123
Copy link
Author

Hi George,

No, we always used the binaries downloaded from here: https://github.com/aws/amazon-chime-sdk-android/releases

Next release we're updating to 0.15.3 / Maven dependencies.

Thanks,
Tanya

@georgezy-amzn
Copy link
Collaborator

Hi @tmilovan123,

Do you still observe the crashes with newer version of SDK?

@ziyiz-amzn
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants