SlideShare a Scribd company logo
1 of 17
Download to read offline
Incinerator 
Detecting & Resolving 
Stale References 
in Java 
Koutheir ATTOUCHI1,2, Gaël THOMAS1, André BOTTARO2, Gilles MULLER1 
1 Laboratoire d’Informatique de Paris 6, France. 
2 Orange Labs, Grenoble, France. 
Wednesday 29th of October 2014 1
The Smart Home 
Multiple Application Domains 
§ Security 
§ Energy 
§ Healthcare 
§ Comfort 
§ Well being 
§ Multimedia 
§ Content sharing 
§ Games 
Wednesday 29th of October 2014 2
The Smart Home 
Connected devices 
Devices are 
§ Connected 
§ Easy to install 
§ Affordable 
§ Fridge 
§ Thermostat 
§ Fork 
§ Oven 
§ etc. 
Connected devices 
§ Toothbrush 
§ Washing machine 
§ Scale 
§ Locks 
§ Dishwasher 
Wednesday 29th of October 2014 3
Home Automation Gateway 
Offered by a Smart Home Operator 
One common embedded platform 
§ Hosting applications delivered by various tiers1 
Objectives 
§ Reduce service 
deployment costs 
§ Share connected 
devices between 
tiers 
1 Condry et al. (IECON’99); Royon and Frénot (2007) 
Wednesday 29th of October 2014 4
Hypothesis 
Unreliable and long-running applications 
§ Applications can be 
– Buggy 
– Malicious 
§ The platform runs for long duration 
§ Abrupt restarts of the platform can be dangerous for 
– Devices 
– Inhabitants 
Wednesday 29th of October 2014 5
Addressed Issues 
Resolve stale references in Java applications 
Stale reference 
§ A reference to a stale object: an object that became unusable 
– Many objects become unusable after updates and uninstallation of 
applications 
StaRlef Rereefnecreen ce 
Object in App1 O1 Object in App2 
Wednesday 29th of October 2014 6 
O2 
App2 uninstalled ! O2 stale
Smart Home Alarm Application 
Motivation by an example 
Gas Sensor 
1 
Stale 
Reference Siren Driver 2.0 
GasSensor Driver Siren Driver 1.0 
Alarm Application 
Siren Configuration 
(Format: Simple Text) 
Wednesday 29th of October 2014 7 
Alarm Siren 
(Format: XML) 
3 
1 
2 
3 
Update Siren Driver è version 2.0 
Convert Siren configuration format è XML 
Forget to update the reference to Siren Driver 1.0 
3 
2 
1 
2 
Memory leak 
Data corruption 
Physical hazard
Significant Memory Leak 
Caused by Stale References1 
O1 
C2 C4 
ClassLoader(S) 
S 
1 Lindholm and Yellin (1999); Johnson and Dawson (2014) 
Wednesday 29th of October 2014 8 
C3 
Class(S) 
Stale reference 
Stale object
Significant Memory Leak 
Caused by Stale References 
Memory leaks caused by stale references appearing after 
multiple updates of a buggy application 
Wednesday 29th of October 2014 9
Incinerator 
Approach 
§ Detect and eliminate* stale 
references 
§ Incinerator transforms stale 
references to null references 
during garbage collection cycle 
* The Devil is in the Details… 
Incinerator 
O1 
Wednesday 29th of October 2014 10 
O2 
S2 
S1 
O3 
O4 
Stale reference Stale object
Cleaning up resources 
in Object.finalize() 
Objective: 
§ Allow objects to cleanup their 
resources 
– Execute Object.finalize() 
without risking exceptions due 
to stale references 
§ Incinerator allows unreachable 
finalizable objects to hold stale 
references 
– Defer stale references 
elimination to the following 
garbage collection cycle 
Incinerator 
Defer 
Unreachable finalizable object 
Wednesday 29th of October 2014 11 
S1 
O3 
O4 
F1 
Stale reference Stale object
Synchronization Issues 
when Eliminating Stale References 
Incinerator 
S1 
T1 T2 T3 
T1, T2 and T3 synchronize and T2 blocked on forever 
the monitor of S1 
Stale reference Stale object Active thread Blocked thread 
Wednesday 29th of October 2014 12
Synchronization Handling 
when Eliminating Stale References 
MMoonniittoorr((SS11)) "= S Sttaalele 
S1 
Incinerator 
Wake up! 
T1 T2 T3 
! Wake up! 
NPE 
! 
NPE 
! 
NPE 
Stale reference Stale object Active thread Blocked thread 
Wednesday 29th of October 2014 13
Implementation 
§ 1000 lines of C++ in the J3/VMKit1 JVM 
§ Tested on Knopflerfish2, an open source recognized 
implementation of OSGi 
– 10 lines added to Knopflerfish 
§ Independent of the garbage collector algorithm 
§ Open source 
– http://llvm.org/svn/llvm-project/vmkit/branches/incinerator/ 
1 Geoffray et al. (VEE’10) 
2 Makewave AB Corp. (2014) 
Wednesday 29th of October 2014 14
Functional Evaluation 
Micro benchmarks 
§ 10 scenarios of stale references, divided by: 
– Visibility from the OSGi framework 
– Scope of stale references 
– Synchronization on stale references 
– Finalization of objects holding stale references 
§ Stale references detection results 
Scenario 1 2 3 4 5 6 7 8 9 10 
J3/Hotspot û û û û û û û û û û 
Service Coroner1 ü û û û û û û û û û 
Incinerator ü ü ü ü ü ü ü ü ü ü 
§ Incinerator also eliminates all detected stale references 
1 Gama and Donsez (SEAA’08) 
Wednesday 29th of October 2014 15
Performance Evaluation 
DaCapo1 benchmark suite 
Low-end computer High-end computer 
Average cost in execution time of DaCapo test suites on J3 and on Incinerator 
Execution cost < 4% 
1 Blackburn et al. (OOPSLA’06) 
Wednesday 29th of October 2014 16
Conclusion 
Incinerator 
§ Incinerator detects and eliminates stale references, avoiding: 
– Memory leaks 
– Data corruption 
– Physical hazards 
§ And makes stale references visible to Java/OSGi developers 
§ Execution cost < 4% è Tolerable in: 
– Constrained production environments 
– Test environments 
§ Implementation is mostly independent of: 
– The OSGi framework implementation 
– The garbage collection algorithm 
Wednesday 29th of October 2014 17 
Thank you!

More Related Content

Similar to Incinerator - Eliminating Stale References in Dynamic OSGi Applications - K Attouchi & A Bottaro

Cost-effective software reliability through autonomic tuning of system resources
Cost-effective software reliability through autonomic tuning of system resourcesCost-effective software reliability through autonomic tuning of system resources
Cost-effective software reliability through autonomic tuning of system resourcesVincenzo De Florio
 
BDM29: AdamCloud Project - Part I
BDM29: AdamCloud Project - Part IBDM29: AdamCloud Project - Part I
BDM29: AdamCloud Project - Part IDavid Lauzon
 
Education using FIRE
Education using FIREEducation using FIRE
Education using FIREFORGE project
 
Make for docker
Make for dockerMake for docker
Make for dockermat f.
 
EclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL TutorialEclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL TutorialEric Cloninger
 
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.Hayoung Yoon
 
Realise the Value in modern Data Center Infrastructure
Realise the Value in modern Data Center InfrastructureRealise the Value in modern Data Center Infrastructure
Realise the Value in modern Data Center InfrastructurePanduit
 
Swimming upstream: OPNFV Doctor project case study
Swimming upstream: OPNFV Doctor project case studySwimming upstream: OPNFV Doctor project case study
Swimming upstream: OPNFV Doctor project case studyOPNFV
 
Education using FIRE
Education using FIRE Education using FIRE
Education using FIRE FORGE project
 
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Stamo Petkov
 
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraftstackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with UnikraftNETWAYS
 
Using Embedded Linux for Infrastructure Systems
Using Embedded Linux for Infrastructure SystemsUsing Embedded Linux for Infrastructure Systems
Using Embedded Linux for Infrastructure SystemsYoshitake Kobayashi
 
Observability For You and Me with openTelemetry
Observability For You and Me with openTelemetryObservability For You and Me with openTelemetry
Observability For You and Me with openTelemetryAll Things Open
 
Open Source 101 - Observability For You and Me with OpenTelemetry
Open Source 101 - Observability For You and Me with OpenTelemetryOpen Source 101 - Observability For You and Me with OpenTelemetry
Open Source 101 - Observability For You and Me with OpenTelemetryEric D. Schabell
 
Lessons learned running large real-world Docker environments
Lessons learned running large real-world Docker environmentsLessons learned running large real-world Docker environments
Lessons learned running large real-world Docker environmentsAlois Mayr
 
DCSF19 CMD and Conquer: Containerizing the Monolith
DCSF19 CMD and Conquer: Containerizing the Monolith  DCSF19 CMD and Conquer: Containerizing the Monolith
DCSF19 CMD and Conquer: Containerizing the Monolith Docker, Inc.
 
3 Pitfalls Everyone Should Avoid with Cloud Native Observability
3 Pitfalls Everyone Should Avoid with Cloud Native Observability3 Pitfalls Everyone Should Avoid with Cloud Native Observability
3 Pitfalls Everyone Should Avoid with Cloud Native ObservabilityEric D. Schabell
 
Easy applications deployment on OpenStack clouds
Easy applications deployment on OpenStack cloudsEasy applications deployment on OpenStack clouds
Easy applications deployment on OpenStack cloudsGiovanni Toraldo
 

Similar to Incinerator - Eliminating Stale References in Dynamic OSGi Applications - K Attouchi & A Bottaro (20)

Cost-effective software reliability through autonomic tuning of system resources
Cost-effective software reliability through autonomic tuning of system resourcesCost-effective software reliability through autonomic tuning of system resources
Cost-effective software reliability through autonomic tuning of system resources
 
BDM29: AdamCloud Project - Part I
BDM29: AdamCloud Project - Part IBDM29: AdamCloud Project - Part I
BDM29: AdamCloud Project - Part I
 
Education using FIRE
Education using FIREEducation using FIRE
Education using FIRE
 
Make for docker
Make for dockerMake for docker
Make for docker
 
EclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL TutorialEclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL Tutorial
 
How to Run Solr on Docker and Why
How to Run Solr on Docker and WhyHow to Run Solr on Docker and Why
How to Run Solr on Docker and Why
 
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.[Dec./2017] My Personal/Professional Journey after Graduate Univ.
[Dec./2017] My Personal/Professional Journey after Graduate Univ.
 
Realise the Value in modern Data Center Infrastructure
Realise the Value in modern Data Center InfrastructureRealise the Value in modern Data Center Infrastructure
Realise the Value in modern Data Center Infrastructure
 
Swimming upstream: OPNFV Doctor project case study
Swimming upstream: OPNFV Doctor project case studySwimming upstream: OPNFV Doctor project case study
Swimming upstream: OPNFV Doctor project case study
 
Education using FIRE
Education using FIRE Education using FIRE
Education using FIRE
 
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...Deploy secure, scalable, and highly available web apps with Azure Front Door ...
Deploy secure, scalable, and highly available web apps with Azure Front Door ...
 
Ug soar 22sep21
Ug soar 22sep21Ug soar 22sep21
Ug soar 22sep21
 
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraftstackconf 2022: It’s Time to Debloat the Cloud with Unikraft
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
 
Using Embedded Linux for Infrastructure Systems
Using Embedded Linux for Infrastructure SystemsUsing Embedded Linux for Infrastructure Systems
Using Embedded Linux for Infrastructure Systems
 
Observability For You and Me with openTelemetry
Observability For You and Me with openTelemetryObservability For You and Me with openTelemetry
Observability For You and Me with openTelemetry
 
Open Source 101 - Observability For You and Me with OpenTelemetry
Open Source 101 - Observability For You and Me with OpenTelemetryOpen Source 101 - Observability For You and Me with OpenTelemetry
Open Source 101 - Observability For You and Me with OpenTelemetry
 
Lessons learned running large real-world Docker environments
Lessons learned running large real-world Docker environmentsLessons learned running large real-world Docker environments
Lessons learned running large real-world Docker environments
 
DCSF19 CMD and Conquer: Containerizing the Monolith
DCSF19 CMD and Conquer: Containerizing the Monolith  DCSF19 CMD and Conquer: Containerizing the Monolith
DCSF19 CMD and Conquer: Containerizing the Monolith
 
3 Pitfalls Everyone Should Avoid with Cloud Native Observability
3 Pitfalls Everyone Should Avoid with Cloud Native Observability3 Pitfalls Everyone Should Avoid with Cloud Native Observability
3 Pitfalls Everyone Should Avoid with Cloud Native Observability
 
Easy applications deployment on OpenStack clouds
Easy applications deployment on OpenStack cloudsEasy applications deployment on OpenStack clouds
Easy applications deployment on OpenStack clouds
 

More from mfrancis

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruumfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)mfrancis
 

More from mfrancis (20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
 
OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
 
How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
 

Recently uploaded

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 

Recently uploaded (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

Incinerator - Eliminating Stale References in Dynamic OSGi Applications - K Attouchi & A Bottaro

  • 1. Incinerator Detecting & Resolving Stale References in Java Koutheir ATTOUCHI1,2, Gaël THOMAS1, André BOTTARO2, Gilles MULLER1 1 Laboratoire d’Informatique de Paris 6, France. 2 Orange Labs, Grenoble, France. Wednesday 29th of October 2014 1
  • 2. The Smart Home Multiple Application Domains § Security § Energy § Healthcare § Comfort § Well being § Multimedia § Content sharing § Games Wednesday 29th of October 2014 2
  • 3. The Smart Home Connected devices Devices are § Connected § Easy to install § Affordable § Fridge § Thermostat § Fork § Oven § etc. Connected devices § Toothbrush § Washing machine § Scale § Locks § Dishwasher Wednesday 29th of October 2014 3
  • 4. Home Automation Gateway Offered by a Smart Home Operator One common embedded platform § Hosting applications delivered by various tiers1 Objectives § Reduce service deployment costs § Share connected devices between tiers 1 Condry et al. (IECON’99); Royon and Frénot (2007) Wednesday 29th of October 2014 4
  • 5. Hypothesis Unreliable and long-running applications § Applications can be – Buggy – Malicious § The platform runs for long duration § Abrupt restarts of the platform can be dangerous for – Devices – Inhabitants Wednesday 29th of October 2014 5
  • 6. Addressed Issues Resolve stale references in Java applications Stale reference § A reference to a stale object: an object that became unusable – Many objects become unusable after updates and uninstallation of applications StaRlef Rereefnecreen ce Object in App1 O1 Object in App2 Wednesday 29th of October 2014 6 O2 App2 uninstalled ! O2 stale
  • 7. Smart Home Alarm Application Motivation by an example Gas Sensor 1 Stale Reference Siren Driver 2.0 GasSensor Driver Siren Driver 1.0 Alarm Application Siren Configuration (Format: Simple Text) Wednesday 29th of October 2014 7 Alarm Siren (Format: XML) 3 1 2 3 Update Siren Driver è version 2.0 Convert Siren configuration format è XML Forget to update the reference to Siren Driver 1.0 3 2 1 2 Memory leak Data corruption Physical hazard
  • 8. Significant Memory Leak Caused by Stale References1 O1 C2 C4 ClassLoader(S) S 1 Lindholm and Yellin (1999); Johnson and Dawson (2014) Wednesday 29th of October 2014 8 C3 Class(S) Stale reference Stale object
  • 9. Significant Memory Leak Caused by Stale References Memory leaks caused by stale references appearing after multiple updates of a buggy application Wednesday 29th of October 2014 9
  • 10. Incinerator Approach § Detect and eliminate* stale references § Incinerator transforms stale references to null references during garbage collection cycle * The Devil is in the Details… Incinerator O1 Wednesday 29th of October 2014 10 O2 S2 S1 O3 O4 Stale reference Stale object
  • 11. Cleaning up resources in Object.finalize() Objective: § Allow objects to cleanup their resources – Execute Object.finalize() without risking exceptions due to stale references § Incinerator allows unreachable finalizable objects to hold stale references – Defer stale references elimination to the following garbage collection cycle Incinerator Defer Unreachable finalizable object Wednesday 29th of October 2014 11 S1 O3 O4 F1 Stale reference Stale object
  • 12. Synchronization Issues when Eliminating Stale References Incinerator S1 T1 T2 T3 T1, T2 and T3 synchronize and T2 blocked on forever the monitor of S1 Stale reference Stale object Active thread Blocked thread Wednesday 29th of October 2014 12
  • 13. Synchronization Handling when Eliminating Stale References MMoonniittoorr((SS11)) "= S Sttaalele S1 Incinerator Wake up! T1 T2 T3 ! Wake up! NPE ! NPE ! NPE Stale reference Stale object Active thread Blocked thread Wednesday 29th of October 2014 13
  • 14. Implementation § 1000 lines of C++ in the J3/VMKit1 JVM § Tested on Knopflerfish2, an open source recognized implementation of OSGi – 10 lines added to Knopflerfish § Independent of the garbage collector algorithm § Open source – http://llvm.org/svn/llvm-project/vmkit/branches/incinerator/ 1 Geoffray et al. (VEE’10) 2 Makewave AB Corp. (2014) Wednesday 29th of October 2014 14
  • 15. Functional Evaluation Micro benchmarks § 10 scenarios of stale references, divided by: – Visibility from the OSGi framework – Scope of stale references – Synchronization on stale references – Finalization of objects holding stale references § Stale references detection results Scenario 1 2 3 4 5 6 7 8 9 10 J3/Hotspot û û û û û û û û û û Service Coroner1 ü û û û û û û û û û Incinerator ü ü ü ü ü ü ü ü ü ü § Incinerator also eliminates all detected stale references 1 Gama and Donsez (SEAA’08) Wednesday 29th of October 2014 15
  • 16. Performance Evaluation DaCapo1 benchmark suite Low-end computer High-end computer Average cost in execution time of DaCapo test suites on J3 and on Incinerator Execution cost < 4% 1 Blackburn et al. (OOPSLA’06) Wednesday 29th of October 2014 16
  • 17. Conclusion Incinerator § Incinerator detects and eliminates stale references, avoiding: – Memory leaks – Data corruption – Physical hazards § And makes stale references visible to Java/OSGi developers § Execution cost < 4% è Tolerable in: – Constrained production environments – Test environments § Implementation is mostly independent of: – The OSGi framework implementation – The garbage collection algorithm Wednesday 29th of October 2014 17 Thank you!