Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

"mmap failed errno 12 Out of memory" after several minutes of Location tracking #6429

Closed
ASnegoff opened this issue Sep 22, 2016 · 12 comments
Closed
Labels
Android Mapbox Maps SDK for Android

Comments

@ASnegoff
Copy link

Platform: Android 5.1.1
Device: Nexus 7
Mapbox SDK version: 4.1.1

Steps to trigger behavior

  1. Run the "track user location" example (LocationTrackingActivity)
  2. Simulate user tracking for several minutes (~ 7-10 min)

The same issue occurs without enabled MyLocation if map's center is changed every second using animateCamera() API.

Expected behavior

There is no performance degradation and crashes.

Actual behavior

Performance of animation deteriorated after several minutes and finally a crash is occured:
W/Adreno-GSL( 6482): <sharedmem_gpumem_alloc_id:1554>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
E/Adreno-GSL( 6482): <gsl_memory_alloc_pure:1576>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
F/libc ( 6482): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x14 in tid 6482 (pboxandroiddemo)

@cammace cammace added the Android Mapbox Maps SDK for Android label Sep 22, 2016
@cammace
Copy link
Contributor

cammace commented Sep 22, 2016

Did a quick test on my Nexus 5x using the same activity you pointed out and was unable to reproduce. I had it follow a fake route (camera was constantly moving) and let it run for ~20 minutes. I'll have to try later on using a Nexus 7.

@ASnegoff
Copy link
Author

ASnegoff commented Sep 23, 2016

I tried another Nexus 7 device and got the same crash.
However, it's not reproduced on Nexus 9

@ASnegoff
Copy link
Author

Below is a callstack from Nexus 7, but for other app that uses the same code for tracking as in the LocationTrackingActivity:

F/libc (15974): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x14 in tid 15974 (x.test.mapbox)
I/DEBUG ( 1330): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1330): Build fingerprint: 'google/razor/flo:5.1.1/LMY48M/2167285:user/release-keys'
I/DEBUG ( 1330): Revision: '0'
I/DEBUG ( 1330): ABI: 'arm'
I/DEBUG ( 1330): pid: 15974, tid: 15974, name: x.test.mapbox >>> com.example.mapbox.test.mapbox <<<
I/DEBUG ( 1330): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x14
I/DEBUG ( 1330): r0 00000100 r1 7c000000 r2 00108002 r3 02000108
I/DEBUG ( 1330): r4 b4845c24 r5 00000000 r6 b489c900 r7 b4b41000
I/DEBUG ( 1330): r8 b4b11000 r9 00000001 sl 00000004 fp 00000000
I/DEBUG ( 1330): ip 00052200 sp beed4098 lr 28000250 pc aaf2c6e4 cpsr 60000030
I/DEBUG ( 1330):
I/DEBUG ( 1330): backtrace:
I/DEBUG ( 1330): #00 pc 000b16e4 /system/vendor/lib/egl/libGLESv2_adreno.so
I/DEBUG ( 1330): #1 pc 000b2c61 /system/vendor/lib/egl/libGLESv2_adreno.so (oxili_loadexecutable+232)
I/DEBUG ( 1330): #2 pc 000832bd /system/vendor/lib/egl/libGLESv2_adreno.so (rb_gpuprogram_loadexecutable_internal+24)
I/DEBUG ( 1330): #3 pc 0005a177 /system/vendor/lib/egl/libGLESv2_adreno.so
I/DEBUG ( 1330): #4 pc 0005a50d /system/vendor/lib/egl/libGLESv2_adreno.so (core_glDrawArraysInstancedXXX+316)
I/DEBUG ( 1330): #5 pc 0005a877 /system/vendor/lib/egl/libGLESv2_adreno.so (core_glDrawArrays+6)
I/DEBUG ( 1330): #6 pc 00049acb /system/vendor/lib/egl/libGLESv2_adreno.so (glDrawArrays+24)
I/DEBUG ( 1330): #7 pc 0019a2cc /data/app/com.example.mapbox.test.mapbox-1/lib/arm/libmapbox-gl.so (mbgl::Painter::drawClippingMasks(std::__1::map<mbgl::UnwrappedTileID, mbgl::ClipID, std::__1::lessmbgl::UnwrappedTileID, std::__1::allocator<std::__1::pair<mbgl::UnwrappedTileID const, mbgl::ClipID> > > const&)+684)
I/DEBUG ( 1330): #8 pc 00197828 /data/app/com.example.mapbox.test.mapbox-1/lib/arm/libmapbox-gl.so (mbgl::Painter::render(mbgl::Style const&, mbgl::FrameData const&, mbgl::SpriteAtlas&)+1616)
I/DEBUG ( 1330): #9 pc 00183794 /data/app/com.example.mapbox.test.mapbox-1/lib/arm/libmapbox-gl.so (mbgl::Map::Impl::render()+188)
I/DEBUG ( 1330): #10 pc 001835b8 /data/app/com.example.mapbox.test.mapbox-1/lib/arm/libmapbox-gl.so (mbgl::Map::render()+144)
I/DEBUG ( 1330): #11 pc 000c87fc /data/app/com.example.mapbox.test.mapbox-1/lib/arm/libmapbox-gl.so (mbgl::android::NativeMapView::render()+68)
I/DEBUG ( 1330): #12 pc 000e4534 /data/app/com.example.mapbox.test.mapbox-1/lib/arm/libmapbox-gl.so

@cammace
Copy link
Contributor

cammace commented Sep 26, 2016

Got my hands on the office Nexus 7 and tested this out. A few differences were that I'm using the latest beta, 4.2.0-beta.3 and the device is using Android 6.0.1. I ran a route simulation similar to what I did when I tested on my Nexus 5x making the camera track the user location as it is constantly moving. After ~15 minutes I still haven't experienced a crash and performance hasn't degraded. Could you try again using the beta and see if this fixes the issue. If not, any additional information to help me reproduce this would be helpful.

cc: @zugaldia

@ASnegoff
Copy link
Author

I'll try the beta on Oct 10. Don't have access to Nexus 7 right now.

@ASnegoff
Copy link
Author

Was able to reproduce it on 4.2.0-beta.3 + Android 5.1.1

But it's not reproduced after update up to Android 6.0.1

@cammace
Copy link
Contributor

cammace commented Oct 12, 2016

Could you share any of your code to help us reproduce this issue? Otherwise is this ticket safe to close?

@ASnegoff
Copy link
Author

Attached code. It's based on official examples and the issue was also reproduced using official Mapbox Dev Preview app from Google play (LocationTrackingActivity) as I stated in the initial post.
MainActivity.java.txt
activity_main.xml.txt

Please let me know if additional details are needed.

@cammace
Copy link
Contributor

cammace commented Oct 18, 2016

@tobrun do you have a older device by chance to test this issue out on?

@tobrun
Copy link
Member

tobrun commented Aug 14, 2017

MyLocationView and related tracking modes can now be found in the related LocationLayer plugin

@tobrun tobrun closed this as completed Aug 14, 2017
@niteshgrg
Copy link

Facing the same issue How is it closed didn't understand your explanation. What does LocationLayer plugin has to do with this ? @tobrun

@zugaldia
Copy link
Member

@niteshgrg The location layer plugin is gonna replace the functionality currently provided by the features in LocationTrackingActivity. Could you give that plugin a try and see if it solves your issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

5 participants