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

Thread Growth and App Hang in Audio Conferences #461

Open
Mahe2027 opened this issue Dec 13, 2024 · 8 comments
Open

Thread Growth and App Hang in Audio Conferences #461

Mahe2027 opened this issue Dec 13, 2024 · 8 comments

Comments

@Mahe2027
Copy link

Mahe2027 commented Dec 13, 2024

Hi linphone team,

Describe the bug

When creating audio conferences, the number of threads labeled as "video conference" grows continuously, even though the conferences are strictly audio-based. In a single conference, the total thread count increased from 69 to 72. If multiple audio conferences are created without exiting or killing the app, the app eventually hangs and crashes.

This issue was tested and reproduced using the latest Linphone official app from the Play Store, as well as with custom apps built using the Linphone SDK. The SDK versions 5.2.107 and later all exhibit the same issue.

Screenshots are attached showing the total threads increasing from 69 to 72 after creating a single conference.
To Reproduce

Create an audio conference using the Linphone SDK or the official Linphone app.
Use the command adb shell top -H -p [App Process ID] to monitor thread growth.
Observe threads labeled as "video conference" growing after creating the conference.
Repeat the process to create multiple conferences without killing the app and note app instability.

Expected behavior

Thread counts should not grow unexpectedly during audio conferences. The app should remain stable, even after creating multiple conferences.
Please complete the following information

Device: multiple android devices
OS: Android 11 (tested on other versions as well)
Version of the App: Latest Linphone official app from the Play Store
Version of the SDK: 5.2.107 and later
Source: Maven repository

Please include logs to help trace the issue.

Screenshots

Screenshot from 2024-12-13 12-18-45
Screenshot from 2024-12-13 12-19-29

Additional context

It is unclear why threads are labeled as "video conference" in this purely audio scenario. Could this be related to improper thread management within the SDK or the official app?

Thanks
Mahee

@Mahe2027
Copy link
Author

Hi,

I have also tested this issue with the latest Linphone official app, and the behavior remains the same.

Attached are screenshots showing the thread count increasing.

Screenshot from 2024-12-13 14-59-19

Just to clarify, I'm creating the conference on the device (not on the server).

@Viish Viish transferred this issue from BelledonneCommunications/linphone-android Dec 14, 2024
@Viish
Copy link
Member

Viish commented Dec 14, 2024

Hi @Mahe2027,

5.2 SDK is not supported anymore, please reproduce with latest 5.3 or current 5.4-alpha one.

Cheers,

@Viish
Copy link
Member

Viish commented Dec 14, 2024

If you do reproduce, please attach logs.

@Mahe2027
Copy link
Author

Hi @Viish ,

Thanks for replay.

FYI - These screenshots are from SDK version 5.3.95 and the latest Linphone-Android app from the Play Store. The issue persists with both, even with the latest versions available.

@Viish
Copy link
Member

Viish commented Dec 14, 2024

Please attach logs then.

@Mahe2027
Copy link
Author

Hi @Viish

I am adding logs for creating two conferences—first and second—after launching the Linphone official app.

When I initiated the first conference, it created three conference-related threads:
    Audio conferenc thread
    Two additional threads labeled as Video conferenc

After terminating the first conference, the threads did not get cleared; they remained in a sleeping state.

When I initiated the second conference, three new threads were created, making a total of six conference-related threads (three from the first conference and three new ones).

This pattern continues with every new conference initiated. The threads keep growing, and once the device thread limit is reached, the app starts hanging and eventually results in an ANR (Application Not Responding).

I am attaching the following files:
linphone-thread-growth-issue-logs-first-conference.txt

linphone-thread-growth-issue-logs-second-conference.txt
linphone-thread-growth-issue-logs-second-conference.txt

linphone-thread-growth-issue-logs-first-conference.txt

Additionally, I am attaching a screenshot showing the thread count:

0 threads for conferences when the app is launched

Screenshot from 2024-12-14 14-49-36

3 threads after the first conference

Screenshot from 2024-12-14 14-54-59

6 threads after the second conference

Screenshot from 2024-12-14 14-57-22

@smorlat
Copy link
Contributor

smorlat commented Dec 16, 2024

Hi,

Thanks for your report. This issue is fixed in master branch. Release 5.4 scheduled for mid-january wil also contain the fix.

Best regards,

Simon

@Mahe2027
Copy link
Author

Hi,

Thank you for your response. Could you please let me know which specific commit has resolved this issue? It would help me verify and test the fix on my end before the next release.

Thanks
Mahee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants