Safe and timely updates to multi-threaded programs

Many dynamic updating systems have been developed that enable a program to be patched while it runs, to fix bugs or add new features. This paper explores techniques for supporting dynamic updates to multi-threaded programs, focusing on the problem of applying an update in a timely fashion while still producing correct behavior. Past work has shown that this tension of safety versus timeliness can be balanced for single-threaded programs. For multi-threaded programs, the task is more difficult because myriad thread interactions complicate understanding the possible program states to which a patch could be applied. Our approach allows the programmer to specify a few program points (e.g., one per thread) at which a patch may be applied, which simplifies reasoning about safety. To improve timeliness, a combination of static analysis and run-time support automatically expands these few points to many more that produce behavior equivalent to the originals. Experiments with thirteen realistic updates to three multi-threaded servers show that we can safely perform a dynamic update within milliseconds when more straightforward alternatives would delay some updates indefinitely.

[1]  Jeffrey S. Foster,et al.  Understanding source code evolution using abstract syntax tree matching , 2005, MSR.

[2]  Kathryn S. McKinley,et al.  Dynamic software updates: a VM-centric approach , 2009, PLDI '09.

[3]  Jeffrey S. Foster,et al.  LOCKSMITH: context-sensitive correlation analysis for race detection , 2006, PLDI '06.

[4]  Haibo Chen,et al.  POLUS: A POwerful Live Updating System , 2007, 29th International Conference on Software Engineering (ICSE'07).

[5]  Kathryn S. McKinley,et al.  Dynamic Software Updates for Java : A VM-Centric Approach , 2008 .

[6]  Andrew Schultz,et al.  OPUS: Online Patches and Updates for Security , 2005, USENIX Security Symposium.

[7]  Michael Hicks,et al.  Mutatis Mutandis : Safe and predictable dynamic software updating , 2007 .

[8]  Angelos D. Keromytis,et al.  Band-aid patching , 2007 .

[9]  Pierre Jouvelot,et al.  Polymorphic type, region and effect inference , 1992, Journal of Functional Programming.

[10]  Rida A. Bazzi,et al.  Immediate Multi-Threaded Dynamic Software Updates Using Stack Reconstruction , 2009, USENIX Annual Technical Conference.

[11]  Deepak Gupta,et al.  A Formal Framework for On-line Software Version Change , 1996, IEEE Trans. Software Eng..

[12]  Michael Hicks,et al.  Contextual effects for version-consistent dynamic software updating and safe concurrent programming , 2008, POPL '08.

[13]  Scott Nettles,et al.  Dynamic software updating , 2001, PLDI '01.

[14]  Kyung Dong Ryu,et al.  Dynamic and adaptive updates of non-quiescent subsystems in commodity operating system kernels , 2007, EuroSys '07.

[15]  Haibo Chen,et al.  Live updating operating systems using virtualization , 2006, VEE '06.

[16]  Iulian Neamtiu,et al.  Practical Dynamic Software Updating , 2008 .

[17]  Insup Lee,et al.  DYMOS: a dynamic modification system , 1983 .

[18]  Simon L. Peyton Jones,et al.  Composable memory transactions , 2005, CACM.

[19]  M. Frans Kaashoek,et al.  Ksplice: automatic rebootless kernel updates , 2009, EuroSys '09.

[20]  Dilma Da Silva,et al.  System Support for Online Reconfiguration , 2003, USENIX Annual Technical Conference, General Track.

[21]  Michael Hicks,et al.  Safe and Timely Dynamic Updates for Multi-threaded Programs , 2009, PLDI 2009.

[22]  Christopher D. Walton,et al.  Abstract machines for dynamic computation , 2001 .

[23]  Dilma Da Silva,et al.  Reboots Are for Hardware: Challenges and Solutions to Updating an Operating System on the Fly , 2007, USENIX Annual Technical Conference.

[24]  Feng Long Practical Dynamic Software Updating for C , 2007 .