[Frieza] Location service fails to start cleanly, entering restart loop - service crashes on start

Bug #1573168 reported by Thomas Voß
150
This bug affects 28 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Thomas Voß
The Avila project
Fix Committed
Undecided
Unassigned
frieza
Fix Released
Undecided
Unassigned
krillin
Fix Released
Critical
John McAleely
platform-api
In Progress
Critical
Thomas Voß
vegetahd
Fix Released
Critical
John McAleely
location-service (Ubuntu)
Invalid
Critical
Thomas Voß

Bug Description

See http://makeagif.com/i/QlHXU7 for further details.

Related branches

Revision history for this message
Thomas Voß (thomas-voss) wrote :

@Victor: Do you happen to know if the users experiencing the issue did an OTA or if they are using the pristine version present on the tablet?

Changed in location-service (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in location-service (Ubuntu):
status: New → Confirmed
Revision history for this message
Mitchell (curious-mitchell) wrote :

Hi Thomas, I can confirm this bug on Freiza. Currently gps and location is unusable. This happened both before updating to ota 10, and on 9.5. Any workarounds?

Thanks,

Mitchell

Revision history for this message
Tomas Öqvist (tomoqv) wrote :

I can confirm this too on my Freiza with OTA-10.1. Also have no positioning through the GPS in Sensorsstats or any other app I have tried.

Revision history for this message
Sergi Quiles Pérez (sergiqp) wrote :

The button on the location tap from the top bar flashes even with GPS off.

Revision history for this message
Sergi Quiles Pérez (sergiqp) wrote :

Today the icon is showed and doesn't have the behavior shown in http://makeagif.com/i/QlHXU7.

And the situation described in comment #5 has disappeared.

Anyway, SensorsStatus nor uNAv nor Nearby scope can't get my position.

Revision history for this message
Sergi Quiles Pérez (sergiqp) wrote :

Now it has again the same behavior as described on the title. :(

Revision history for this message
LlamasJM (llamasfortesjm) wrote :

For my Bq M10 Ubuntu the bug affects only the Scopes (as I can see). The GPS and localization run well in any other app: Unav, Here, Weather, Réaltaí, etc. But no scope say me where am I.

Revision history for this message
Bob Harvey (bobharvey) wrote :

I have the M10 tablet on OTA10.1. The Location indicator is blinking on and off, making the mail indicator shift from left to right.

If I pull down the 'notifications curtain' for the location, the slide switch and legend for 'location detection' are blinking too.

I installed the SensorStatus app and that shows no values at all for GPS results. There does not appear to be any way to display satellite lock, constalation, or ephemeris age.

Here Maps reports 'Can't find your location' ; uNav says 'GPS denied'; those seem to be different to what Llamas.JM reported in comment 8. Much more like Sergi reports in comemnt 5,7

The tablet was delivered with OTA9.5 and location services worked before I applied the update.

Revision history for this message
Victor gonzalez (victor-gonzalez-0) wrote :

Hi @Thomas,

Yes, the user said he updated the device to 10.1 firs off all and then he noticed the GPS indicator behaviour.

Revision history for this message
Rolf Veen (rolf-veen) wrote :
Download full text (5.0 KiB)

I also have an M10 tablet with OTA10.1 with an non functioning location service and intermitent GPS icon. As per BQ's request I'm attaching some (fragments of) logs.

1) "# ubuntu-location-serviced-cli --bus system --test" outputs text like this:

 length=27 context=0x3b9968
I0425 12:36:40.585892 14050 android_hardware_abstraction_layer.cpp:135] static void com::ubuntu::location::providers::gps::android::HardwareAbstractionLayer::on_nmea_update(int64_t, const char*, int, void*): timestamp=1461635998000 nmea=$GPRMC,235958.010,V,8960.0000,N,00000.0000,E,0.000,0.00,050180,,,N*4C
 length=71 context=0x3b9968
I0425 12:36:40.585973 14050 android_hardware_abstraction_layer.cpp:135] static void com::ubuntu::location::providers::gps::android::HardwareAbstractionLayer::on_nmea_update(int64_t, const char*, int, void*): timestamp=1461635998000 nmea=$GPVTG,0.00,T,,M,0.000,N,0.000,K,N*32
000,E,0.000,0.00,050180,,,N*4C
 length=39 context=0x3b9968

and exits with a segmentation fault at a random moment in time.

2) Syslog filtered by 'location':

Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395044] (0)[11591:ubuntu-location]ubuntu-location[11591]: unhandled level 3 translation fault (11) at 0x00000000, esr 0x83000007
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395064] (0)[11591:ubuntu-location]pgd = ffffffc0551c9000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395100] (0)[11591:ubuntu-location][00000000] *pgd=000000009500f003, *pmd=0000000069405003, *pte=0000000000000000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395157] (0)[11591:ubuntu-location]
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395180] (0)[11591:ubuntu-location]CPU: 0 PID: 11591 Comm: ubuntu-location Tainted: G W 3.10.93+ #1
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395198] (0)[11591:ubuntu-location]task: ffffffc036b62a00 ti: ffffffc036b18000 task.ti: ffffffc036b18000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395213] (0)[11591:ubuntu-location]PC is at 0x0
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395226] (0)[11591:ubuntu-location]LR is at 0x0
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395242] (0)[11591:ubuntu-location]pc : [<0000000000000000>] lr : [<0000000000000000>] pstate: 60070010
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395254] (0)[11591:ubuntu-location]sp : 0000000000000000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395265] (0)[11591:ubuntu-location]x29: 0000000000000000 x28: 0000000000000000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395286] (0)[11591:ubuntu-location]x27: 0000000000000000 x26: 0000000000000000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395306] (0)[11591:ubuntu-location]x25: 0000000000000000 x24: 0000000000000000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395325] (0)[11591:ubuntu-location]x23: 0000000000000000 x22: 0000000000000000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395345] (0)[11591:ubuntu-location]x21: 0000000000000000 x20: 0000000000000000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395364] (0)[11591:ubuntu-location]x19: 0000000000000000 x18: 0000000000000000
Apr 25 12:31:57 ubuntu-phablet kernel: [ 405.395384] (0)[11591:ubuntu-location]x17: 0000000000000000 x16: 0000000000000000
Apr 25 12:31:57 ubu...

Read more...

Revision history for this message
Steven Wijgerse (januari) wrote :

Can confirm this bug, looks the same as the GIF of the original poster.

Revision history for this message
Bob Harvey (bobharvey) wrote :

OK, that's weird. My M10 tablet has stopped doing thatthung that's in the gif. it was flickering away before I powered it down, and when I powered up - no flickering.. I did two things before powering down that might have affected it
* I switched to 'gps only'
* I logged into HERE maps

The 'location' indicator is now off, and there is no gps position..

Revision history for this message
Bob Harvey (bobharvey) wrote :

I have switched back to gps/wifi and still don't have a location in HERE or nuMaps

Revision history for this message
Sergi Quiles Pérez (sergiqp) wrote :

@bobharvey The same situation happened to me (comment #6).

Revision history for this message
Bob Harvey (bobharvey) wrote :

Also odd.
My phone (BQ 4.5) has never done this. It, too, has been upgraded to OTA 10.1 . It currently works fine, with a gps position, and mapping apps can display a location.

Revision history for this message
Thomas Voß (thomas-voss) wrote :

@Mitchell: No workaround, yet. I'm investigating why the service starts crashing after the OTA. Stay tuned.

Changed in location-service (Ubuntu):
importance: High → Critical
status: Confirmed → In Progress
Revision history for this message
Steven Wijgerse (januari) wrote :

It by the way seems to put a heavy drain on battery. Normally when putting the tablet away it uses a few percent per day.

Over last night I charged the tablet to 100%, took it off the charger this morning, hardly used it (it showed 98% battery left), picked the tablet up now (which is 6 hours later) and there is only 64% battery left......

Revision history for this message
Steven Wijgerse (januari) wrote :

I'm on 15.04 OTA-10.1

Revision history for this message
Chris Reeve (cjreeve) wrote :

Vacation stopped working for me on Aquaris M0 (15.04 OA-10) after an update until I turned off location services, turned off WIFI and GPS in the power saving preferences, then turned it back on and then rebooted. I'm not sure how well GPS is working but it now knows where I am and the location icon has stopped blinking.

Revision history for this message
Chris Reeve (cjreeve) wrote :

*Location I meant. Don't seem to be able to edit?

Revision history for this message
Stefan Kamps (stefan-kamps) wrote :

Hi,

I have the Ubuntu M10 (updated to 10.1 after arrival) for a week now and successfully
used GPS with uNav, SensorStatus and Here Maps.

Since yesterday I encounter the above-mentioned bug. I would like to add the following observations:

After reboot everything is fine, but when I start one of the GPS apps the GPS symbol in the indicator menu
starts blinking (frequency: once per second). When I check the app
permissions I see that the list with apps which have requested GPS
access is empty.
When I reboot the M10 again the blinking stops and the list with apps which
requested GPS access is there again.
When the GPS indicator symbol is blinking (because I launched
SensorStatus) and then I start uNav, uNav gives the following error message:
    "GPS Denied"
    "Error reading the GPS status"
    "Please review your device settings"
When I go to device settings I see the following:
- Location Settings: GPS and anoymised Wi-Fi (HERE)
- Battery Settings: GPS enabled
- Secury & privacy -> Apps Permissions -> Location:0

The only way to make the GPS indicator symbol stop blinking is to switch
off GPS location detection.

Revision history for this message
Gareth France (gareth-france) wrote :

No idea if this will be any help but I'm getting repeated over and over in the log indicator-location.log

** (process:2470):WARNING **: Error calling dbus method:
GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method "Get" with signature "ss" on interface "org.freedesktop.DBus.Properties" doesn't exist

Changed in canonical-devices-system-image:
status: New → In Progress
status: In Progress → New
Revision history for this message
Victor gonzalez (victor-gonzalez-0) wrote :

Hi @stefan-kamps,

That sounds like 1565469

Changed in canonical-devices-system-image:
status: New → Incomplete
status: Incomplete → Confirmed
importance: Undecided → High
assignee: nobody → Thomas Voß (thomas-voss)
Revision history for this message
Joan CiberSheep (cibersheep) wrote :

Hi. Similar behaviour here.
I use bq E5 -> updated to OTA 10.1. GPS works perfect.
I have bq m10 that came with OTA9.5 and directly updated to 10.1. GPS seems not to work at all (no blinking location icon but I was unable to detect exact position).

I wanted to test if GPS was working with OTA 9.5 so I reset the tablet but it restarted with OTA10.1. Location icon, this time blinks:
- Switching off GPS in battery is not possible (GPS keeps restarting)
- Switching off GPS from notification panel turns it off but keeps blinking (off)

Deactivated all scopes that requires location, installed SensorsStatus.
- SensorsStatus give no GPS data
- SensorsStatus: Found supported backend

Some reboots.
Location icon stopped blinking.

"sudo ubuntu-location-serviced-cli --bus system --test" give no output. Location icon in notifications panel keeps in on position but grey. It is not possible to tap or turn off

¿Defective GPS?

I hope those logs helps
http://paste.ubuntu.com/16371046/
http://paste.ubuntu.com/16371257/

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

/usr/bin/ubuntu-location-serviced is crashing for me when I load google maps in the browser and try to get my location by touching the bullseye in the page. This is the backtrace I see:

#0 0x00000000 in ?? ()
#1 0xf56549d6 in nmea_reader_parse (r=0xf54c0818) at hardware/mediatek/gps/HAL/gps_mtk_aosp.c:2299
#2 nmea_reader_addc (c=<optimized out>, r=0xf54c0818) at hardware/mediatek/gps/HAL/gps_mtk_aosp.c:2326
#3 gps_state_thread (arg=0xf565f544) at hardware/mediatek/gps/HAL/gps_mtk_aosp.c:3863
#4 0xf7696436 in thread_start_wrapper (arg=0xf5a179a0) at ubuntu/platform-api/android/hybris/ubuntu_application_gps_for_hybris.cpp:155
#5 0xf7413490 in start_thread (arg=0x0) at pthread_create.c:335
#6 0xf72d0c4c in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:89 from /lib/arm-linux-gnueabihf/libc.so.6

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

The crash happens when trying to call gnss_sv_status_cb(), which appears in the definition of GpsCallbacks in the device gps.h, but not in the AOSP one.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Hmm, in fact it looks more like the whole GpsCallbacks structure contains garbage, so it is probably an initialization issue.

Revision history for this message
Thomas Voß (thomas-voss) wrote :

@Alfonso: Thanks a lot for the backtrace, I think the underlying issue is a race on initialization, see frame #6: start thread is presented with a null pointer. With that, I think we are seeing a race on boot and whenever the gps first receives an NMEA sequence, trying to hand it to upper layers of the stack, things go south with a segfault being the ultimate consequence.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Setting to critical because it makes location unusable on the device with a trivial case:
Start google map or HERE maps and accept the trust prompt when you request a location for the first time, then the service crashes.

Changed in canonical-devices-system-image:
importance: High → Critical
tags: added: lt-blocker
Changed in canonical-devices-system-image:
milestone: none → 11
summary: [Frieza] Location service fails to start cleanly, entering restart loop
+ - service crashes on start
tags: added: regression-proposed
Revision history for this message
Dave Morley (davmor2) wrote :

I have flashed image 3 from Stable and location gets a fix almost instantly so this is definitely a regression over the current stable image.

Revision history for this message
Dave Morley (davmor2) wrote :

On flashing RC 11 I see the crash file everyone is seeing.

Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Changed in platform-api:
status: New → In Progress
importance: Undecided → Critical
Changed in location-service (Ubuntu):
status: In Progress → Invalid
Changed in platform-api:
assignee: nobody → Thomas Voß (thomas-voss)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Attached full backtrace and strace until the service crashed. This is with lp:~thomas-voss/platform-api/retry-loading-of-gps-hal applied (with a modification to increase the number of retries).

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in krillin:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → John McAleely (john.mcaleely)
Changed in vegetahd:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → John McAleely (john.mcaleely)
Revision history for this message
John McAleely (john.mcaleely) wrote :
Changed in avila:
status: New → Fix Committed
milestone: none → 11
Changed in frieza:
status: New → Fix Released
Changed in krillin:
status: In Progress → Fix Released
Changed in vegetahd:
status: In Progress → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Revision history for this message
Bob Harvey (bobharvey) wrote :

Seems to be working fine in OTA11.

Well done!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.