-
Notifications
You must be signed in to change notification settings - Fork 535
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 thread scheduling issue #126
Comments
You can easily test a new glib version with cerbero. 2.42 iirc |
@Rugvip did you test that already? If it's still broken with 2.42 this is really a big problem and will bite us sooner or later in other situations too (it would mean that probably GPoll is broken, which is also used in other places). |
I haven't been able to build for Android using cerbero, there's some issue with the icu build. The build fails when trying to build icu for OS X, which is needed for a cross build. I haven't had time to look any further into that issue yet. |
Can you send me details about that build failure? |
I just tried building glib 2.42 and glib-networking with the current build scripts, and it doesn't seem to have fixed the issue. I'm doing a full rebuild of dependencies atm, just in case. And here's the failed cerbero build:
...
|
Ok, we're going to fix the icu build. If the problem still exists with 2.42 you won the price for finding the worst GLib bug on Android so far. I assume you didn't succeed in creating a simpler testcase for it? |
I can reproduce the ICU problem, and I'm working on fixing it in the recipe. Edit: Fix turned out to be simpler than I expected; this should be working now. |
The host platform doesn't set CPP, so the cross-build value gets used instead. This causes a build failure on OS X (although it's wrong everywhere). Just to be sure, do the same for CC/CXX as well. EricssonResearch/openwebrtc#126 (comment)
This fix resolved the icu build issue for me, now I'm down to a failure on the compile step of the openwebrtc recipe:
Look familiar? |
@Rugvip - looks like those bindings are out of sync perhaps? |
@jrosssavant Yep, I'm running into the same issue. Turns out that you still need a updated build for your host platform when building for android, since cerbero also copies Owr-0.1.gir from the host build. Try building for osx/linux first and then for Android. |
I rebuilt it for OS X, and that itself didn't fix the issue, but when the install failed I chose "[1] rebuild the recipe from scratch", and that did fix it. |
The jars end up in ~/cerbero/dist/android_armv7/lib/jni/, and are not included in any .pkg. I'm getting a loadLibrary error when loading the .jar thought, which I'm fixing atm. |
From discussion on irc: the .jars are a bit broken atm, standby :) |
Thanks for the info. After rebuilding for OS X I was able to get the Android build to complete without any errors per your suggestion. I'll hold off testing with this for now until you confirm the jars are in working order. |
Ok, let's go back to the original issue here instead of build problems. Please create new tickets for that. @Rugvip did you have any success with trying a newer GLib version? If not we should start creating a minimal testcase for this and make sure to fix it. If it breaks in Owr, it will also cause problems in GStreamer elements that use a custom GMainContext internally. |
Rugvip created a ticket for the jar problems a while ago: #161 |
Yes, I don't care about that in this ticket 😛 This is about GMainContext being broken on Android |
@Rugvip any response? |
@Rugvip - this seems to no longer happen when using glib built with cerbero, right? |
Or is that just gone because of the workaround that was merged? |
Could be but I think @Rugvip tested updating glib with the build scripts and still saw the issue. I'll let him respond about that though. |
@sdroege The workaround was removed as a part of the owr_init patch, since it didn't seem to be needed anymore. So either something else that was different between the builds script and cerbero builds fixed the issue, or the issue is still there and we haven't noticed it yet. For now the workaround is removed and I'm keeping an eye out in case the issue isn't gone. |
Haven't had any more trouble with this. |
There is an issue with glib and thread scheduling on Android that causes the main owr thread to not get awoken instantly when e.g. a idle GSource is attached. This can cause a delay of up to several minutes when setting up a call.
The first step in debugging this is to move to a newer glib version, meanwhile, here's a temporary fix for the issue:
Rugvip@038146a
The text was updated successfully, but these errors were encountered: