SlideShare a Scribd company logo
1 of 39
Download to read offline
Android Crash Analysis and The Dalvik
Garbage Collector - Tips
Oren BarAd
Mobile Security Team Leader
AVG
2
100,000,000
3
Intro
• App on the market
• Crashes will happen
• Need to Fix the Bugs!
• Identify the root issues
4
Who?
• Developing for Android since 2008
• The first employee of DroidSecurity
– First company to release An antivirus to the Android
market (2009)
– Later acquired by AVG (2011)
• Mobile Security Research Team Leader @AVG
• B.Sc Information System Engineering from BGU
5
Agenda
• Android app crash Collection & Analysis
• The Android Garbage Collector
• Memory analysis Tools
• Tips and tricks
6
How to collect crash information?
7
What to fix first?
• Easy to fix
• Affects most users
• The ones users complain most about
• Affects the most popular device
8
Root cause analysis
• Stare at data:
–Crash type
–Exception Type
–Device
–Manufacturer
–OS version
–Locale
• And stare some more…
9
Ultimate debugging method!
• What is the answer to this bug?
– 42
• We don’t know the answer
– Brainstorming
– Developing tools
• Learning something new…
10
Root cause analysis – Real world example
• Concurrent.Timeout exception
– ~10% of total crashes for AVG antivirus.
– Unhelpful stack traces
– Second place in top 10 crashes (and number 5, and number 9)
java.util.concurrent.TimeoutException: android.os.BinderProxy.finalize() timed out after 10
seconds
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:401)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
at java.lang.Thread.run(Thread.java:841)
java.util.concurrent.TimeoutException: com.android.internal.os.BinderInternal$GcWatcher.finalize() timed out after 10 seconds
java.util.concurrent.TimeoutException: android.os.Parcel.finalize() timed out after 10 seconds
java.util.concurrent.TimeoutException: java.io.FileInputStream.finalize() timed out after 10 seconds
11
Device and OS analysis
33%
66%
Device
Galaxy S3
49%
38%
13%
19%
10%
71%
OS
Crash Dashboard
4.2.2
4.3
Other OS
Versions
12
What next?
• After going deep into the Code…
• Get S3 and use
13
Android GC – little bit of history
Gingerbread
14
Complex
Object
Tricolor collector at work
roots rootsroots
object object object
object object object
object
object
object object
15
object
Tricolor collector at work
roots rootsroots
object object object
object object object
object
object
object object
16
object
Tricolor collector at work
roots rootsroots
object object object
object object object
object
object
object object
17
object
Tricolor collector at work
roots rootsroots
object object object
object object object
object
object
object object
18
Complex
Object
Tricolor collector at work
roots rootsroots
object object object
object object object
object
object
object object
19
Complex
Object
Tricolor collector at work
roots rootsroots
object object object
object object object
object
object
object object
20
Garbage collector observed behavior
Cause Effect
GC_FOR_MALLOC Stop The world GC
Use complex Objects GC takes longer
A lot of small objects GC take Longer
Use more memory GC takes longer
USE_LARGE_HEAP All of the above
21
Trying to replicate the problem
• The GC_Test project
– Test the GC performance under load
– Android app to test the behavior of the GC on android
– https://github.com/oba2cat3/GCTest
• Useful logcat python script
– https://github.com/oba2cat3/logcat2memorygraph
• Available from GitHub
22
Logcat output
02-04 12:40:33.185: D/dalvikvm(2496): GC_EXPLICIT freed <1K, 19% free 14383K/17720K, paused 1ms+1ms, total 17ms
02-04 12:40:33.265: D/dalvikvm(3279): GC_CONCURRENT freed 661K, 27% free 14934K/20336K, paused 5ms+3ms, total 21ms
02-04 12:40:33.460: D/dalvikvm(5637): GC_CONCURRENT freed 834K, 22% free 15516K/19644K, paused 6ms+3ms, total 33ms
02-04 12:40:33.480: D/dalvikvm(3279): GC_CONCURRENT freed 313K, 27% free 15022K/20336K, paused 3ms+9ms, total 30ms
02-04 12:40:33.665: D/dalvikvm(5637): GC_CONCURRENT freed 369K, 21% free 15658K/19644K, paused 2ms+2ms, total 18ms
02-04 12:40:33.725: D/dalvikvm(5730): GC_CONCURRENT freed 1166K, 23% free 15188K/19644K, paused 4ms+2ms, total 25ms
02-04 12:40:33.765: D/dalvikvm(5637): GC_CONCURRENT freed 430K, 20% free 15740K/19644K, paused 7ms+2ms, total 22ms
02-04 12:40:33.865: D/dalvikvm(5730): GC_CONCURRENT freed 325K, 23% free 15256K/19644K, paused 2ms+3ms, total 22ms
02-04 12:40:34.065: D/dalvikvm(5637): GC_CONCURRENT freed 1811K, 25% free 15934K/21040K, paused 3ms+2ms, total 29ms
02-04 12:40:34.160: D/dalvikvm(5637): GC_CONCURRENT freed 99K, 23% free 16354K/21040K, paused 2ms+4ms, total 31ms
02-04 12:40:34.250: D/dalvikvm(3403): GC_EXPLICIT freed 172K, 24% free 14956K/19628K, paused 3ms+4ms, total 28ms
02-04 12:40:34.315: D/dalvikvm(5766): GC_CONCURRENT freed 1185K, 23% free 15148K/19628K, paused 3ms+3ms, total 28ms
02-04 12:40:34.350: D/dalvikvm(5637): GC_CONCURRENT freed 1140K, 26% free 15766K/21040K, paused 3ms+3ms, total 30ms
02-04 12:40:34.495: D/dalvikvm(4155): GC_CONCURRENT freed 1274K, 24% free 15093K/19660K, paused 7ms+5ms, total 56ms
02-04 12:40:34.635: D/dalvikvm(3333): GC_CONCURRENT freed 574K, 24% free 14982K/19620K, paused 3ms+2ms, total 19ms
02-04 12:40:34.780: D/dalvikvm(5694): GC_CONCURRENT freed 1268K, 24% free 15100K/19656K, paused 3ms+1ms, total 25ms
02-04 12:40:34.840: D/dalvikvm(2960): GC_EXPLICIT freed 1236K, 10% free 53524K/58860K, paused 4ms+7ms, total 130ms
02-04 12:40:34.915: D/dalvikvm(5637): GC_FOR_ALLOC freed 143K, 25% free 15978K/21040K, paused 26ms, total 26ms
02-04 12:40:33.480: D/dalvikvm(3279): GC_CONCURRENT freed 313K, 27% free 15022K/20336K, paused 3ms+9ms, total 30ms
02-04 12:40:33.665: D/dalvikvm(5637): GC_CONCURRENT freed 369K, 21% free 15658K/19644K, paused 2ms+2ms, total 18ms
02-04 12:40:33.725: D/dalvikvm(5730): GC_CONCURRENT freed 1166K, 23% free 15188K/19644K, paused 4ms+2ms, total 25ms
02-04 12:40:33.765: D/dalvikvm(5637): GC_CONCURRENT freed 430K, 20% free 15740K/19644K, paused 7ms+2ms, total 22ms
02-04 12:40:33.865: D/dalvikvm(5730): GC_CONCURRENT freed 325K, 23% free 15256K/19644K, paused 2ms+3ms, total 22ms
02-04 12:40:34.065: D/dalvikvm(5637): GC_CONCURRENT freed 1811K, 25% free 15934K/21040K, paused 3ms+2ms, total 29ms
23
Script result - Heap size and GC delays
0
0.2
0.4
0.6
0.8
1
1.2
0
20000
40000
60000
80000
100000
120000
140000
160000
Time in MSheap size in KB
dalvikvm event timestamps
current heap
max heap
24
Script result - Heap size and GC delays
0
50
100
150
200
250
300
350
400
0
20000
40000
60000
80000
100000
120000
140000
160000
Time in MSheap size in KB
dalvikvm event timestamps
current heap
max heap
ui pause time
total pause
25
Script result - Heap size and GC delays
0
50
100
150
200
250
300
350
400
0
20000
40000
60000
80000
100000
120000
140000
160000
Time in MSheap size in KB
dalvikvm event timestamps
current heap
max heap
ui pause time
total pause
webview
start
26
Memory Analyzer Tool tricks
27
Memory Analyzer Tool tricks
28
Memory Analyzer Tool tricks
29
Memory Analyzer Tool tricks
30
Memory Analyzer Tool tricks
31
Memory Analyzer Tool tricks
32
Memory Analyzer Tool tricks
33
Memory Analyzer Tool tricks
34
Tips for managing GC
Do How
Avoid GC_FOR_ALLOC Load stuff in Splash
Use Object Pools For large/heavy objects
Avoid Complex Objects Use simpler Objects
Perform Heap analysis Use MAT and DDMS
Reduce memory use …
35
Summary
• Application will crash
–Collect and Analyze
–Understand and Fix
• Fixing the bug is half the fun
36
Back to the problem
• JNI objects are a special case
• Dalvik will finalize and Destroy
• Timeouts will happen... And they Do!
37
Q&A
• Questions?
• Contact: Oren.barad@avg.com
• We are hiring!
• Come talk to us in the AVG booth
38
Links and resources
• http://android-developers.blogspot.co.il/2011/03/memory-
analysis-for-android.html
• http://www.brpreiss.com/books/opus5/html/page424.html
• http://java-is-the-new-c.blogspot.co.il/2013/07/tuning-and-
benchmarking-java-7s-garbage.html
• http://www.slideshare.net/muhammedshakirmisarwala/java-
performance-monitoring-tuning
• http://www.slideshare.net/VikasBalikai/gc-in-android
• http://www.javacodegeeks.com/2012/01/practical-garbage-
collection-part-1.html
39
Links and resources
• https://android.googlesource.com/platform/dalvik/+/android-
4.3_r2/vm/alloc/MarkSweep.cpp
• https://android.googlesource.com/platform/dalvik/+log/android-
4.4.2_r2/vm/alloc/MarkSweep.cpp
• https://android.googlesource.com/platform/dalvik/+/gingerbread/vm/alloc/MarkSwe
ep.c
• https://android.googlesource.com/platform/dalvik/+/froyo-
release/vm/alloc/MarkSweep.c

More Related Content

What's hot

Frida Android run time hooking - Bhargav Gajera & Vitthal Shinde
Frida  Android run time hooking - Bhargav Gajera & Vitthal ShindeFrida  Android run time hooking - Bhargav Gajera & Vitthal Shinde
Frida Android run time hooking - Bhargav Gajera & Vitthal ShindeNSConclave
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia FrameworkOpersys inc.
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Opersys inc.
 
Wowza설치및사용법
Wowza설치및사용법Wowza설치및사용법
Wowza설치및사용법dasom im
 
도메인구현 KSUG 20151128
도메인구현 KSUG 20151128도메인구현 KSUG 20151128
도메인구현 KSUG 20151128beom kyun choi
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)Ishin Vin
 
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiRunning Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiChris Simmonds
 
옥트리의 구축
옥트리의 구축옥트리의 구축
옥트리의 구축sj k
 
Android datastorage
Android datastorageAndroid datastorage
Android datastorageKrazy Koder
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementationChethan Pchethan
 
Primeiros passos com a API do Zabbix - Webinar JLCP
Primeiros passos com a API do Zabbix - Webinar JLCPPrimeiros passos com a API do Zabbix - Webinar JLCP
Primeiros passos com a API do Zabbix - Webinar JLCPRobert Silva
 
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveAndroid graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveBin Chen
 
Gradle Kotlin 컨벤션 플러그인으로 효율적으로 멀티 모듈 관리하기
Gradle Kotlin 컨벤션 플러그인으로 효율적으로 멀티 모듈 관리하기Gradle Kotlin 컨벤션 플러그인으로 효율적으로 멀티 모듈 관리하기
Gradle Kotlin 컨벤션 플러그인으로 효율적으로 멀티 모듈 관리하기YoungjikYoon
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewYu-Hsin Hung
 

What's hot (20)

Android Internals
Android InternalsAndroid Internals
Android Internals
 
Android Binder: Deep Dive
Android Binder: Deep DiveAndroid Binder: Deep Dive
Android Binder: Deep Dive
 
Frida Android run time hooking - Bhargav Gajera & Vitthal Shinde
Frida  Android run time hooking - Bhargav Gajera & Vitthal ShindeFrida  Android run time hooking - Bhargav Gajera & Vitthal Shinde
Frida Android run time hooking - Bhargav Gajera & Vitthal Shinde
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Android's Multimedia Framework
Android's Multimedia FrameworkAndroid's Multimedia Framework
Android's Multimedia Framework
 
Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)Embedded Android : System Development - Part IV (Android System Services)
Embedded Android : System Development - Part IV (Android System Services)
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...Using and Customizing the Android Framework / part 4 of Embedded Android Work...
Using and Customizing the Android Framework / part 4 of Embedded Android Work...
 
Wowza설치및사용법
Wowza설치및사용법Wowza설치및사용법
Wowza설치및사용법
 
도메인구현 KSUG 20151128
도메인구현 KSUG 20151128도메인구현 KSUG 20151128
도메인구현 KSUG 20151128
 
Go Programming Language (Golang)
Go Programming Language (Golang)Go Programming Language (Golang)
Go Programming Language (Golang)
 
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiRunning Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
 
옥트리의 구축
옥트리의 구축옥트리의 구축
옥트리의 구축
 
Android datastorage
Android datastorageAndroid datastorage
Android datastorage
 
Overview of Android binder IPC implementation
Overview of Android binder IPC implementationOverview of Android binder IPC implementation
Overview of Android binder IPC implementation
 
Primeiros passos com a API do Zabbix - Webinar JLCP
Primeiros passos com a API do Zabbix - Webinar JLCPPrimeiros passos com a API do Zabbix - Webinar JLCP
Primeiros passos com a API do Zabbix - Webinar JLCP
 
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspectiveAndroid graphic system (SurfaceFlinger) : Design Pattern's perspective
Android graphic system (SurfaceFlinger) : Design Pattern's perspective
 
Gradle Kotlin 컨벤션 플러그인으로 효율적으로 멀티 모듈 관리하기
Gradle Kotlin 컨벤션 플러그인으로 효율적으로 멀티 모듈 관리하기Gradle Kotlin 컨벤션 플러그인으로 효율적으로 멀티 모듈 관리하기
Gradle Kotlin 컨벤션 플러그인으로 효율적으로 멀티 모듈 관리하기
 
Introduction to Eclipse IDE
Introduction to Eclipse IDEIntroduction to Eclipse IDE
Introduction to Eclipse IDE
 
Project meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture OverviewProject meeting: Android Graphics Architecture Overview
Project meeting: Android Graphics Architecture Overview
 

Viewers also liked

Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debuggingAshish Agrawal
 
Murali_BlockChain_Technology_6_May_2016.pptx
Murali_BlockChain_Technology_6_May_2016.pptxMurali_BlockChain_Technology_6_May_2016.pptx
Murali_BlockChain_Technology_6_May_2016.pptxMurali krishna
 
iOS Mobile App crash - Analysis
iOS Mobile App crash - Analysis iOS Mobile App crash - Analysis
iOS Mobile App crash - Analysis Murali krishna
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of AndroidTetsuyuki Kobayashi
 
Memory leak patterns in javascript
Memory leak patterns in javascriptMemory leak patterns in javascript
Memory leak patterns in javascriptMurali krishna
 
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)Egor Elizarov
 
ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?Tetsuyuki Kobayashi
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with NougatOpersys inc.
 

Viewers also liked (10)

Android crash debugging
Android crash debuggingAndroid crash debugging
Android crash debugging
 
Murali_BlockChain_Technology_6_May_2016.pptx
Murali_BlockChain_Technology_6_May_2016.pptxMurali_BlockChain_Technology_6_May_2016.pptx
Murali_BlockChain_Technology_6_May_2016.pptx
 
iOS Mobile App crash - Analysis
iOS Mobile App crash - Analysis iOS Mobile App crash - Analysis
iOS Mobile App crash - Analysis
 
Inter-process communication of Android
Inter-process communication of AndroidInter-process communication of Android
Inter-process communication of Android
 
Memory leak patterns in javascript
Memory leak patterns in javascriptMemory leak patterns in javascript
Memory leak patterns in javascript
 
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)
Android internals 10 - Debugging/Profiling, Bluetooth/WiFI/RIL (rev_1.1)
 
ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?ADB(Android Debug Bridge): How it works?
ADB(Android Debug Bridge): How it works?
 
Android Debug
Android DebugAndroid Debug
Android Debug
 
Android IPC Mechanism
Android IPC MechanismAndroid IPC Mechanism
Android IPC Mechanism
 
Embedded Android Workshop with Nougat
Embedded Android Workshop with NougatEmbedded Android Workshop with Nougat
Embedded Android Workshop with Nougat
 

Similar to Android Crash analysis and The Dalvik Garbage collector – Tools and Tips

Memory management for_android_apps
Memory management for_android_appsMemory management for_android_apps
Memory management for_android_appsBin Shao
 
OnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform BuildOnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform BuildDavid Rosen
 
DESIGN West 2013 Presentation: Accelerating Android Development and Delivery
DESIGN West 2013 Presentation: Accelerating Android Development and DeliveryDESIGN West 2013 Presentation: Accelerating Android Development and Delivery
DESIGN West 2013 Presentation: Accelerating Android Development and DeliveryDavid Rosen
 
CICS Memory Objects and MEMLIMIT
 CICS Memory Objects and MEMLIMIT CICS Memory Objects and MEMLIMIT
CICS Memory Objects and MEMLIMITDavid Clancy
 
A Survey of NGS Data Analysis on Hadoop
A Survey of NGS Data Analysis on HadoopA Survey of NGS Data Analysis on Hadoop
A Survey of NGS Data Analysis on HadoopChung-Tsai Su
 
Le Bourget 2017 - From earth observation to actionable intelligence
Le Bourget 2017 - From earth observation to actionable intelligenceLe Bourget 2017 - From earth observation to actionable intelligence
Le Bourget 2017 - From earth observation to actionable intelligenceLeonardo
 
Building Windows - how the bits flow from check-in to the fast-ring
Building Windows - how the bits flow from check-in to the fast-ringBuilding Windows - how the bits flow from check-in to the fast-ring
Building Windows - how the bits flow from check-in to the fast-ringMicrosoft Tech Community
 
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020rodburns
 
Main cource book(chapter science)
Main cource book(chapter science)Main cource book(chapter science)
Main cource book(chapter science)rahul4567567
 
Go GC: Prioritizing Low Latency and Simplicity
Go GC: Prioritizing Low Latency and SimplicityGo GC: Prioritizing Low Latency and Simplicity
Go GC: Prioritizing Low Latency and SimplicityC4Media
 
Panoramic Video in Environmental Monitoring Software Development and Applica...
Panoramic Video in Environmental Monitoring Software Development and Applica...Panoramic Video in Environmental Monitoring Software Development and Applica...
Panoramic Video in Environmental Monitoring Software Development and Applica...pycontw
 
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...Cheng Chen
 
Scheduling by Primavera - Training
Scheduling by Primavera - TrainingScheduling by Primavera - Training
Scheduling by Primavera - TrainingMohammed Feroze
 
Real-world Virtual Reality
Real-world Virtual RealityReal-world Virtual Reality
Real-world Virtual RealityC4Media
 
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...Databricks
 
Alex Tellez, Deep Learning Applications
Alex Tellez, Deep Learning ApplicationsAlex Tellez, Deep Learning Applications
Alex Tellez, Deep Learning ApplicationsSri Ambati
 
Mobile Software Diagnostics
Mobile Software DiagnosticsMobile Software Diagnostics
Mobile Software DiagnosticsDmitry Vostokov
 
What's new in Redis v3.2
What's new in Redis v3.2What's new in Redis v3.2
What's new in Redis v3.2Itamar Haber
 

Similar to Android Crash analysis and The Dalvik Garbage collector – Tools and Tips (20)

presentation
presentationpresentation
presentation
 
Memory management for_android_apps
Memory management for_android_appsMemory management for_android_apps
Memory management for_android_apps
 
OnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform BuildOnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform Build
 
DESIGN West 2013 Presentation: Accelerating Android Development and Delivery
DESIGN West 2013 Presentation: Accelerating Android Development and DeliveryDESIGN West 2013 Presentation: Accelerating Android Development and Delivery
DESIGN West 2013 Presentation: Accelerating Android Development and Delivery
 
CICS Memory Objects and MEMLIMIT
 CICS Memory Objects and MEMLIMIT CICS Memory Objects and MEMLIMIT
CICS Memory Objects and MEMLIMIT
 
A Survey of NGS Data Analysis on Hadoop
A Survey of NGS Data Analysis on HadoopA Survey of NGS Data Analysis on Hadoop
A Survey of NGS Data Analysis on Hadoop
 
Le Bourget 2017 - From earth observation to actionable intelligence
Le Bourget 2017 - From earth observation to actionable intelligenceLe Bourget 2017 - From earth observation to actionable intelligence
Le Bourget 2017 - From earth observation to actionable intelligence
 
Building Windows - how the bits flow from check-in to the fast-ring
Building Windows - how the bits flow from check-in to the fast-ringBuilding Windows - how the bits flow from check-in to the fast-ring
Building Windows - how the bits flow from check-in to the fast-ring
 
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
SC20 SYCL and C++ Birds of a Feather 19th Nov 2020
 
Main cource book(chapter science)
Main cource book(chapter science)Main cource book(chapter science)
Main cource book(chapter science)
 
Go GC: Prioritizing Low Latency and Simplicity
Go GC: Prioritizing Low Latency and SimplicityGo GC: Prioritizing Low Latency and Simplicity
Go GC: Prioritizing Low Latency and Simplicity
 
Panoramic Video in Environmental Monitoring Software Development and Applica...
Panoramic Video in Environmental Monitoring Software Development and Applica...Panoramic Video in Environmental Monitoring Software Development and Applica...
Panoramic Video in Environmental Monitoring Software Development and Applica...
 
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
Big Data Competition: maximizing your potential
 exampled with the 2014 Higgs...
 
Scheduling by Primavera - Training
Scheduling by Primavera - TrainingScheduling by Primavera - Training
Scheduling by Primavera - Training
 
Real-world Virtual Reality
Real-world Virtual RealityReal-world Virtual Reality
Real-world Virtual Reality
 
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
Streaming Trend Discovery: Real-Time Discovery in a Sea of Events with Scott ...
 
Kelompok A.pptx
Kelompok A.pptxKelompok A.pptx
Kelompok A.pptx
 
Alex Tellez, Deep Learning Applications
Alex Tellez, Deep Learning ApplicationsAlex Tellez, Deep Learning Applications
Alex Tellez, Deep Learning Applications
 
Mobile Software Diagnostics
Mobile Software DiagnosticsMobile Software Diagnostics
Mobile Software Diagnostics
 
What's new in Redis v3.2
What's new in Redis v3.2What's new in Redis v3.2
What's new in Redis v3.2
 

More from DroidConTLV

Mobile Development in the Information Age - Yossi Elkrief, Nike
Mobile Development in the Information Age - Yossi Elkrief, NikeMobile Development in the Information Age - Yossi Elkrief, Nike
Mobile Development in the Information Age - Yossi Elkrief, NikeDroidConTLV
 
Doing work in the background - Darryn Campbell, Zebra Technologies
Doing work in the background - Darryn Campbell, Zebra TechnologiesDoing work in the background - Darryn Campbell, Zebra Technologies
Doing work in the background - Darryn Campbell, Zebra TechnologiesDroidConTLV
 
No more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola SolutionsNo more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola SolutionsDroidConTLV
 
Mobile at Scale: from startup to a big company - Dor Samet, Booking.com
Mobile at Scale: from startup to a big company - Dor Samet, Booking.comMobile at Scale: from startup to a big company - Dor Samet, Booking.com
Mobile at Scale: from startup to a big company - Dor Samet, Booking.comDroidConTLV
 
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, ClimacellLiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, ClimacellDroidConTLV
 
MVVM In real life - Lea Cohen Tannoudji, Lightricks
MVVM In real life - Lea Cohen Tannoudji, LightricksMVVM In real life - Lea Cohen Tannoudji, Lightricks
MVVM In real life - Lea Cohen Tannoudji, LightricksDroidConTLV
 
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)DroidConTLV
 
Building Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice NinjaBuilding Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice NinjaDroidConTLV
 
New Android Project: The Most Important Decisions - Vasiliy Zukanov
New Android Project: The Most Important Decisions - Vasiliy ZukanovNew Android Project: The Most Important Decisions - Vasiliy Zukanov
New Android Project: The Most Important Decisions - Vasiliy ZukanovDroidConTLV
 
Designing a Design System - Shai Mishali, Gett
Designing a Design System - Shai Mishali, GettDesigning a Design System - Shai Mishali, Gett
Designing a Design System - Shai Mishali, GettDroidConTLV
 
The Mighty Power of the Accessibility Service - Guy Griv, Pepper
The Mighty Power of the Accessibility Service - Guy Griv, PepperThe Mighty Power of the Accessibility Service - Guy Griv, Pepper
The Mighty Power of the Accessibility Service - Guy Griv, PepperDroidConTLV
 
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDevKotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDevDroidConTLV
 
Flutter State Management - Moti Bartov, Tikal
Flutter State Management - Moti Bartov, TikalFlutter State Management - Moti Bartov, Tikal
Flutter State Management - Moti Bartov, TikalDroidConTLV
 
Reactive UI in android - Gil Goldzweig Goldbaum, 10bis
Reactive UI in android - Gil Goldzweig Goldbaum, 10bisReactive UI in android - Gil Goldzweig Goldbaum, 10bis
Reactive UI in android - Gil Goldzweig Goldbaum, 10bisDroidConTLV
 
Fun with flutter animations - Divyanshu Bhargava, GoHighLevel
Fun with flutter animations - Divyanshu Bhargava, GoHighLevelFun with flutter animations - Divyanshu Bhargava, GoHighLevel
Fun with flutter animations - Divyanshu Bhargava, GoHighLevelDroidConTLV
 
DroidconTLV 2019
DroidconTLV 2019DroidconTLV 2019
DroidconTLV 2019DroidConTLV
 
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, Monday
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, MondayOk google, it's time to bot! - Hadar Franco, Albert + Stav Levi, Monday
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, MondayDroidConTLV
 
Introduction to React Native - Lev Vidrak, Wix
Introduction to React Native - Lev Vidrak, WixIntroduction to React Native - Lev Vidrak, Wix
Introduction to React Native - Lev Vidrak, WixDroidConTLV
 
Bang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGeneBang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGeneDroidConTLV
 
Educating your app – adding ML edge to your apps - Maoz Tamir
Educating your app – adding ML edge to your apps - Maoz TamirEducating your app – adding ML edge to your apps - Maoz Tamir
Educating your app – adding ML edge to your apps - Maoz TamirDroidConTLV
 

More from DroidConTLV (20)

Mobile Development in the Information Age - Yossi Elkrief, Nike
Mobile Development in the Information Age - Yossi Elkrief, NikeMobile Development in the Information Age - Yossi Elkrief, Nike
Mobile Development in the Information Age - Yossi Elkrief, Nike
 
Doing work in the background - Darryn Campbell, Zebra Technologies
Doing work in the background - Darryn Campbell, Zebra TechnologiesDoing work in the background - Darryn Campbell, Zebra Technologies
Doing work in the background - Darryn Campbell, Zebra Technologies
 
No more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola SolutionsNo more video loss - Alex Rivkin, Motorola Solutions
No more video loss - Alex Rivkin, Motorola Solutions
 
Mobile at Scale: from startup to a big company - Dor Samet, Booking.com
Mobile at Scale: from startup to a big company - Dor Samet, Booking.comMobile at Scale: from startup to a big company - Dor Samet, Booking.com
Mobile at Scale: from startup to a big company - Dor Samet, Booking.com
 
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, ClimacellLiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
LiveData on Steroids - Giora Shevach + Shahar Ben Moshe, Climacell
 
MVVM In real life - Lea Cohen Tannoudji, Lightricks
MVVM In real life - Lea Cohen Tannoudji, LightricksMVVM In real life - Lea Cohen Tannoudji, Lightricks
MVVM In real life - Lea Cohen Tannoudji, Lightricks
 
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)
Best Practices for Using Mobile SDKs - Lilach Wagner, SafeDK (AppLovin)
 
Building Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice NinjaBuilding Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice Ninja
 
New Android Project: The Most Important Decisions - Vasiliy Zukanov
New Android Project: The Most Important Decisions - Vasiliy ZukanovNew Android Project: The Most Important Decisions - Vasiliy Zukanov
New Android Project: The Most Important Decisions - Vasiliy Zukanov
 
Designing a Design System - Shai Mishali, Gett
Designing a Design System - Shai Mishali, GettDesigning a Design System - Shai Mishali, Gett
Designing a Design System - Shai Mishali, Gett
 
The Mighty Power of the Accessibility Service - Guy Griv, Pepper
The Mighty Power of the Accessibility Service - Guy Griv, PepperThe Mighty Power of the Accessibility Service - Guy Griv, Pepper
The Mighty Power of the Accessibility Service - Guy Griv, Pepper
 
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDevKotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
Kotlin Multiplatform in Action - Alexandr Pogrebnyak - IceRockDev
 
Flutter State Management - Moti Bartov, Tikal
Flutter State Management - Moti Bartov, TikalFlutter State Management - Moti Bartov, Tikal
Flutter State Management - Moti Bartov, Tikal
 
Reactive UI in android - Gil Goldzweig Goldbaum, 10bis
Reactive UI in android - Gil Goldzweig Goldbaum, 10bisReactive UI in android - Gil Goldzweig Goldbaum, 10bis
Reactive UI in android - Gil Goldzweig Goldbaum, 10bis
 
Fun with flutter animations - Divyanshu Bhargava, GoHighLevel
Fun with flutter animations - Divyanshu Bhargava, GoHighLevelFun with flutter animations - Divyanshu Bhargava, GoHighLevel
Fun with flutter animations - Divyanshu Bhargava, GoHighLevel
 
DroidconTLV 2019
DroidconTLV 2019DroidconTLV 2019
DroidconTLV 2019
 
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, Monday
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, MondayOk google, it's time to bot! - Hadar Franco, Albert + Stav Levi, Monday
Ok google, it's time to bot! - Hadar Franco, Albert + Stav Levi, Monday
 
Introduction to React Native - Lev Vidrak, Wix
Introduction to React Native - Lev Vidrak, WixIntroduction to React Native - Lev Vidrak, Wix
Introduction to React Native - Lev Vidrak, Wix
 
Bang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGeneBang-Bang, you have been hacked - Yonatan Levin, KolGene
Bang-Bang, you have been hacked - Yonatan Levin, KolGene
 
Educating your app – adding ML edge to your apps - Maoz Tamir
Educating your app – adding ML edge to your apps - Maoz TamirEducating your app – adding ML edge to your apps - Maoz Tamir
Educating your app – adding ML edge to your apps - Maoz Tamir
 

Recently uploaded

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Recently uploaded (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

Android Crash analysis and The Dalvik Garbage collector – Tools and Tips

  • 1. Android Crash Analysis and The Dalvik Garbage Collector - Tips Oren BarAd Mobile Security Team Leader AVG
  • 3. 3 Intro • App on the market • Crashes will happen • Need to Fix the Bugs! • Identify the root issues
  • 4. 4 Who? • Developing for Android since 2008 • The first employee of DroidSecurity – First company to release An antivirus to the Android market (2009) – Later acquired by AVG (2011) • Mobile Security Research Team Leader @AVG • B.Sc Information System Engineering from BGU
  • 5. 5 Agenda • Android app crash Collection & Analysis • The Android Garbage Collector • Memory analysis Tools • Tips and tricks
  • 6. 6 How to collect crash information?
  • 7. 7 What to fix first? • Easy to fix • Affects most users • The ones users complain most about • Affects the most popular device
  • 8. 8 Root cause analysis • Stare at data: –Crash type –Exception Type –Device –Manufacturer –OS version –Locale • And stare some more…
  • 9. 9 Ultimate debugging method! • What is the answer to this bug? – 42 • We don’t know the answer – Brainstorming – Developing tools • Learning something new…
  • 10. 10 Root cause analysis – Real world example • Concurrent.Timeout exception – ~10% of total crashes for AVG antivirus. – Unhelpful stack traces – Second place in top 10 crashes (and number 5, and number 9) java.util.concurrent.TimeoutException: android.os.BinderProxy.finalize() timed out after 10 seconds at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:401) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73) at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170) at java.lang.Thread.run(Thread.java:841) java.util.concurrent.TimeoutException: com.android.internal.os.BinderInternal$GcWatcher.finalize() timed out after 10 seconds java.util.concurrent.TimeoutException: android.os.Parcel.finalize() timed out after 10 seconds java.util.concurrent.TimeoutException: java.io.FileInputStream.finalize() timed out after 10 seconds
  • 11. 11 Device and OS analysis 33% 66% Device Galaxy S3 49% 38% 13% 19% 10% 71% OS Crash Dashboard 4.2.2 4.3 Other OS Versions
  • 12. 12 What next? • After going deep into the Code… • Get S3 and use
  • 13. 13 Android GC – little bit of history Gingerbread
  • 14. 14 Complex Object Tricolor collector at work roots rootsroots object object object object object object object object object object
  • 15. 15 object Tricolor collector at work roots rootsroots object object object object object object object object object object
  • 16. 16 object Tricolor collector at work roots rootsroots object object object object object object object object object object
  • 17. 17 object Tricolor collector at work roots rootsroots object object object object object object object object object object
  • 18. 18 Complex Object Tricolor collector at work roots rootsroots object object object object object object object object object object
  • 19. 19 Complex Object Tricolor collector at work roots rootsroots object object object object object object object object object object
  • 20. 20 Garbage collector observed behavior Cause Effect GC_FOR_MALLOC Stop The world GC Use complex Objects GC takes longer A lot of small objects GC take Longer Use more memory GC takes longer USE_LARGE_HEAP All of the above
  • 21. 21 Trying to replicate the problem • The GC_Test project – Test the GC performance under load – Android app to test the behavior of the GC on android – https://github.com/oba2cat3/GCTest • Useful logcat python script – https://github.com/oba2cat3/logcat2memorygraph • Available from GitHub
  • 22. 22 Logcat output 02-04 12:40:33.185: D/dalvikvm(2496): GC_EXPLICIT freed <1K, 19% free 14383K/17720K, paused 1ms+1ms, total 17ms 02-04 12:40:33.265: D/dalvikvm(3279): GC_CONCURRENT freed 661K, 27% free 14934K/20336K, paused 5ms+3ms, total 21ms 02-04 12:40:33.460: D/dalvikvm(5637): GC_CONCURRENT freed 834K, 22% free 15516K/19644K, paused 6ms+3ms, total 33ms 02-04 12:40:33.480: D/dalvikvm(3279): GC_CONCURRENT freed 313K, 27% free 15022K/20336K, paused 3ms+9ms, total 30ms 02-04 12:40:33.665: D/dalvikvm(5637): GC_CONCURRENT freed 369K, 21% free 15658K/19644K, paused 2ms+2ms, total 18ms 02-04 12:40:33.725: D/dalvikvm(5730): GC_CONCURRENT freed 1166K, 23% free 15188K/19644K, paused 4ms+2ms, total 25ms 02-04 12:40:33.765: D/dalvikvm(5637): GC_CONCURRENT freed 430K, 20% free 15740K/19644K, paused 7ms+2ms, total 22ms 02-04 12:40:33.865: D/dalvikvm(5730): GC_CONCURRENT freed 325K, 23% free 15256K/19644K, paused 2ms+3ms, total 22ms 02-04 12:40:34.065: D/dalvikvm(5637): GC_CONCURRENT freed 1811K, 25% free 15934K/21040K, paused 3ms+2ms, total 29ms 02-04 12:40:34.160: D/dalvikvm(5637): GC_CONCURRENT freed 99K, 23% free 16354K/21040K, paused 2ms+4ms, total 31ms 02-04 12:40:34.250: D/dalvikvm(3403): GC_EXPLICIT freed 172K, 24% free 14956K/19628K, paused 3ms+4ms, total 28ms 02-04 12:40:34.315: D/dalvikvm(5766): GC_CONCURRENT freed 1185K, 23% free 15148K/19628K, paused 3ms+3ms, total 28ms 02-04 12:40:34.350: D/dalvikvm(5637): GC_CONCURRENT freed 1140K, 26% free 15766K/21040K, paused 3ms+3ms, total 30ms 02-04 12:40:34.495: D/dalvikvm(4155): GC_CONCURRENT freed 1274K, 24% free 15093K/19660K, paused 7ms+5ms, total 56ms 02-04 12:40:34.635: D/dalvikvm(3333): GC_CONCURRENT freed 574K, 24% free 14982K/19620K, paused 3ms+2ms, total 19ms 02-04 12:40:34.780: D/dalvikvm(5694): GC_CONCURRENT freed 1268K, 24% free 15100K/19656K, paused 3ms+1ms, total 25ms 02-04 12:40:34.840: D/dalvikvm(2960): GC_EXPLICIT freed 1236K, 10% free 53524K/58860K, paused 4ms+7ms, total 130ms 02-04 12:40:34.915: D/dalvikvm(5637): GC_FOR_ALLOC freed 143K, 25% free 15978K/21040K, paused 26ms, total 26ms 02-04 12:40:33.480: D/dalvikvm(3279): GC_CONCURRENT freed 313K, 27% free 15022K/20336K, paused 3ms+9ms, total 30ms 02-04 12:40:33.665: D/dalvikvm(5637): GC_CONCURRENT freed 369K, 21% free 15658K/19644K, paused 2ms+2ms, total 18ms 02-04 12:40:33.725: D/dalvikvm(5730): GC_CONCURRENT freed 1166K, 23% free 15188K/19644K, paused 4ms+2ms, total 25ms 02-04 12:40:33.765: D/dalvikvm(5637): GC_CONCURRENT freed 430K, 20% free 15740K/19644K, paused 7ms+2ms, total 22ms 02-04 12:40:33.865: D/dalvikvm(5730): GC_CONCURRENT freed 325K, 23% free 15256K/19644K, paused 2ms+3ms, total 22ms 02-04 12:40:34.065: D/dalvikvm(5637): GC_CONCURRENT freed 1811K, 25% free 15934K/21040K, paused 3ms+2ms, total 29ms
  • 23. 23 Script result - Heap size and GC delays 0 0.2 0.4 0.6 0.8 1 1.2 0 20000 40000 60000 80000 100000 120000 140000 160000 Time in MSheap size in KB dalvikvm event timestamps current heap max heap
  • 24. 24 Script result - Heap size and GC delays 0 50 100 150 200 250 300 350 400 0 20000 40000 60000 80000 100000 120000 140000 160000 Time in MSheap size in KB dalvikvm event timestamps current heap max heap ui pause time total pause
  • 25. 25 Script result - Heap size and GC delays 0 50 100 150 200 250 300 350 400 0 20000 40000 60000 80000 100000 120000 140000 160000 Time in MSheap size in KB dalvikvm event timestamps current heap max heap ui pause time total pause webview start
  • 34. 34 Tips for managing GC Do How Avoid GC_FOR_ALLOC Load stuff in Splash Use Object Pools For large/heavy objects Avoid Complex Objects Use simpler Objects Perform Heap analysis Use MAT and DDMS Reduce memory use …
  • 35. 35 Summary • Application will crash –Collect and Analyze –Understand and Fix • Fixing the bug is half the fun
  • 36. 36 Back to the problem • JNI objects are a special case • Dalvik will finalize and Destroy • Timeouts will happen... And they Do!
  • 37. 37 Q&A • Questions? • Contact: Oren.barad@avg.com • We are hiring! • Come talk to us in the AVG booth
  • 38. 38 Links and resources • http://android-developers.blogspot.co.il/2011/03/memory- analysis-for-android.html • http://www.brpreiss.com/books/opus5/html/page424.html • http://java-is-the-new-c.blogspot.co.il/2013/07/tuning-and- benchmarking-java-7s-garbage.html • http://www.slideshare.net/muhammedshakirmisarwala/java- performance-monitoring-tuning • http://www.slideshare.net/VikasBalikai/gc-in-android • http://www.javacodegeeks.com/2012/01/practical-garbage- collection-part-1.html
  • 39. 39 Links and resources • https://android.googlesource.com/platform/dalvik/+/android- 4.3_r2/vm/alloc/MarkSweep.cpp • https://android.googlesource.com/platform/dalvik/+log/android- 4.4.2_r2/vm/alloc/MarkSweep.cpp • https://android.googlesource.com/platform/dalvik/+/gingerbread/vm/alloc/MarkSwe ep.c • https://android.googlesource.com/platform/dalvik/+/froyo- release/vm/alloc/MarkSweep.c