-
I don't recall ever having things like that in my logs. I am not running the same version as you, I stick to stable. Not sure if it could make a difference since AFAIK your daily version was the same as the 24.04-1.2 stable 12 days ago, I take it that the problem is older than that for you ? I never tried the daily, do you really upgrade your phone every day ?
-
@slowcyclist You're not the only one... I'm having the exact same issue, also on FP5. I'm running 24.04-1.2 stable
-
I'm having the exact same issue, also on FP5. I'm running 24.04-1.2 stable
hum, do you have only the same symptoms, or do you also have segfaults and unaligned errors in your logs ?
I have the same phone with the exact same version, I may have had the same symptoms (not sure), but definitely not the unaligned errors, at least for the 5 weeks worth of journal data that I have on my phone. @slowcyclist don't use the same version of UT I think, it's daily instead of stable.
-
My apologies, I replied to the initial post of @slowcyclist, and while re-reading my own post it is indeed not very clear.
I'm having the both mallooc and segfaults. Especially the segfaults result into freezing navigation apps.Mar 07 09:42:25 ubuntu-phablet lomiri-location-serviced-wrapper[1708]: malloc(): unaligned fastbin chunk detected Mar 07 09:42:25 ubuntu-phablet systemd[1]: lomiri-location-service.service: Main process exited, code=killed, status=6/ABRT Mar 07 09:42:25 ubuntu-phablet systemd[1]: lomiri-location-service.service: Failed with result 'signal'. Mar 07 09:42:25 ubuntu-phablet systemd[1]: lomiri-location-service.service: Consumed 6.437s CPU time.Mar 08 20:48:56 ubuntu-phablet systemd[1]: lomiri-location-service.service: Main process exited, code=killed, status=11/SEGV Mar 08 20:48:56 ubuntu-phablet systemd[1]: lomiri-location-service.service: Failed with result 'signal'. Mar 08 20:48:56 ubuntu-phablet systemd[1]: lomiri-location-service.service: Consumed 3.987s CPU time. -
thanks for the precisions, now my guess is that I have yet not seen this problem because I have not used GPS a lot in the recent past.
-
I finally nailed it! After a simple change and recompiling a package, I could have gps working continuously for over 3 hours, which had never happened previously on my FP5.The problem was indeed in ubuntu_application_gps_hidl_for_hybris.cpp part of the package libubuntu-platform-hardware-api3 whose repo is at https://gitlab.com/ubports/development/core/platform-api, and lomiri-location-services calls this library to access the android drivers (through hybris). The problem was that the code continued to use a chunk of memory that had been supposedly freed (use-after-free) and the memory corruption only became visible when the allocator reused that freed memory chunk for a new allocation. At that point two pieces of code competed for the same memory, leading to crashing. The issue is more likely to happen quickly when many applications are running, explaining the somewhat random duration before the crash.On my Xperia X, a different piece of code was used (ubuntu_application_gps_for_hybris.cpp, not ubuntu_application_gps_hidl_for_hybris.cpp) which explains why it never had this problem.That gps_hidl piece of code has not been touched since 2020 and I believe UBports uses it in all phones running running Android 10+ vendor blobs, meaning that the problem should not be specific to the FP5. Yet, I find it really strange that no one reported the issue previously and that only @WillemHexspoor confirmed it here. Does that mean that UBports users either never use their gps for extended periods (e.g. routing with PureMaps or uNav) or that they only do so under waydroid, or that other phones access the gps through a different scheme (another library)?I have filed a merge request to that package.EDIT: I take back all what I said yesterday, it eventually crashed all the same after (except after a very long time (~10h), and then this morning again after only 3h... So the root cause is not yet found... I'm digging further.
-
Interesting find, thanks for the effort.
never use their gps for extended periods
Yes that's the case for me, although these last days I just tried that, and I got effectively 2 occurences of GPS not updating any more (launched Puremaps and Gps app together to make it more interesting). For me the reason is that the FP5 is gulping energy at such a rate that I try to stop services when not actually in use.
The only difference is that the GPS service (lomiri-location-service) never stopped for me (according to systemctl status) so no crash with unaligned errors, although I got the second time (did not think to check for that first time) segfaults and several restarts of sensorfwd service, maybe caused by this problem.
-
S slowcyclist referenced this topic
-
Sorry for the previous noise... I continued working on that issue and I believe I now have a truly working fix : Gps positions continuously obtained for over 24h, twice. For that, I had to patch two repos, touching both the android side (hybris) and the linux side. While examining the code I realized I also could upgrade it so that the fp5 can now use more than than 32 (gps-only) satellites and provides more data (notably altitude uncertainty which was blank in sensor status so far). When the weather is clear my phone sees ~80 sats outdoors, but the android-side code clips at 64, and I'm not going to fight that... With the 64 sats clip the fp5 now still gets fixes indoors at my place while before it would stop when getting inside.
I'll post the corresponding merge requests in the two repos in the next days. -
wow.
In the course of your investigations did you happen to take a look at the xtra service ? I have looked on and off at it and have not yet even understood why sometimes it downloads stuff from the qualcomm site(s) and then decides to not do anything for days. -
@gpatel-fr No, I haven't. The UBPorts code definitely has some stuff related with that (dating from the ubuntu era...), but I have not spent time looking into it. I looked into geoclue2 as reported in this other thread, and realized that what is described there only uses wifi or cell; Geoclue2 does not switch to gps afterwards because it connects to gps chips through modemmanager while UBPorts manages the modem with ofono instead... I believe it would be easy to make a geoclue2 plugin for lomitri-location-service to first get a quick inaccurate location from local networks through geoclue2, with lomitri-location-service later automatically switching to gps when a fix becomes available. Of course, a working native AGPS lomiry-location-service implementation would be cleaner and preferable (geoclue2 is essentially duplicating the functionality of lomiry-location-service).
What I'd also like is to have gps apps continuing to receive fixes when the screen is off. I would very much like activitytracker to be able to record tracks, or PureMaps continuing to give routing voice indications while cycling, without the present unnecessary screen-on battery drain.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login