skip to main content
10.1145/3365137.3365404acmconferencesArticle/Chapter ViewAbstractPublication PagessospConference Proceedingsconference-collections
research-article

Wait-Free Code Patching of Multi-Threaded Processes

Published: 27 October 2019 Publication History

Abstract

In the operation and maintenance phase of a deployed software component, security and bug-fix updates are regular events. However, for many high-availability services, costly restarts are no acceptable option as the induced downtimes lead to a degradation of the service quality. One solution to this problem are live updates, where we inject the desired software patches directly into the volatile memory of a currently running process. However, before the actual patch gets applied, most live-update methods use a stop-the-world approach to bring the process into a safe state; an operation that is highly disruptive for the execution of multi-threaded programs.
In this paper, we present a wait-free approach to inject code changes into a running multi-threaded process. We avoid the disruption of a global barrier synchronization over all threads by first preparing a patched clone of the process's address space. Into the updated address space, we gradually migrate individual threads at predefined quiescence points while all other threads make uninterrupted progress. In a first case study with a simple network service, we could completely eliminate the impact of applying a live update on the request latency.

References

[1]
Gautam Altekar, Ilya Bagrak, Paul Burstein, and Andrew Schultz. 2005. OPUS: Online Patches and Updates for Security. In Proceedings of the 14th Conference on USENIX Security Symposium - Volume 14 (SSYM '05). USENIX Association, Berkeley, CA, USA, 19--19.
[2]
Jeff Arnold and M. Frans Kaashoek. 2009. Ksplice: automatic rebootless kernel updates. In Proceedings of the ACM SIGOPS/EuroSys European Conference on Computer Systems 2009 (EuroSys '09), John Wilkes, Rebecca Isaacs, and Wolfgang Schröder-Preikschat (Eds.). ACM Press, New York, NY, USA, 187--198. https://doi.org/10.1145/1519065.1519085
[3]
Andrew Baumann, Gernot Heiser, Jonathan Appavoo, Dilma Da Silva, Orran Krieger, Robert W. Wisniewski, and Jeremy Kerr. [n. d.]. Providing Dynamic Update in an Operating System. In Proceedings of the 2005 USENIX Annual Technical Conference. 279--291.
[4]
Haibo Chen, Rong Chen, Fengzhe Zhang, Binyu Zang, and Pen-Chung Yew. 2006. Live Updating Operating Systems Using Virtualization. In Proceedings of the 2Nd International Conference on Virtual Execution Environments (VEE '06). ACM, New York, NY, USA, 35--44. https://doi.org/10.1145/1134760.1134767
[5]
Haibo Chen, Jie Yu, Rong Chen, Binyu Zang, and Pen-Chung Yew. 2007. POLUS: A POwerful Live Updating System. In Proceedings of the 29th International Conference on Software Engineering (ICSE '07). IEEE Computer Society, Washington, DC, USA, 271--281. https://doi.org/10.1109/ICSE.2007.65
[6]
Brad Fitzpatrick. 2004. Distributed Caching with Memcached. Linux Journal 2004, 124 (Aug. 2004), 5-. http://dl.acm.org/citation.cfm?id=1012889.1012894
[7]
Cristiano Giuffrida, Anton Kuijsten, and Andrew S. Tanenbaum. 2013. Safe and automatic live update for operating systems. In Proceedings of the 18th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '13). ACM Press, New York, NY, USA, 279--292. https://doi.org/10.1145/2451116.2451147
[8]
Hannes Goullon, Rainer Isle, and Klaus-Peter Löhr. 1978. Dynamic Restructuring in an Experimental Operating System. IEEE Transactions on Software Engineering SE-4, 4 (1978), 298--307. https://doi.org/10.1109/TSE.1978.231515
[9]
Daniel Gruss, Moritz Lipp, Michael Schwarz, Richard Fellner, Clémentine Maurice, and Stefan Mangard. 2017. KASLR is Dead: Long Live KASLR. In Engineering Secure Software and Systems - 9th International Symposium, ESSoS 2017, Proceedings, Vol. 10379 LNCS. Springer-Verlag Italia, 161--176. https://doi.org/10.1007/978-3-319-62105-0_11
[10]
Christopher M. Hayden, Karla Saur, Edward K. Smith, Michael Hicks, and Jeffrey S. Foster. 2014. Kitsune: Efficient, General-Purpose Dynamic Software Updating for C. ACM Trans. Program. Lang. Syst. 36, 4, Article 13 (Oct. 2014), 38 pages. https://doi.org/10.1145/2629460
[11]
Christopher M. Hayden, Edward K. Smith, Michael Hicks, and Jeffrey S. Foster. 2011. State transfer for clear and efficient runtime updates. In 2011 IEEE 27th International Conference on Data Engineering Workshops. 179--184. https://doi.org/10.1109/ICDEW.2011.5767632
[12]
Terry Ching-Hsiang Hsu, Helge Brügner, Indrajit Roy, Kimberly Keeton, and Patrick Eugster. [n. d.]. NVthreads: Practical Persistence for Multi-Threaded Applications (ECSC). ACM, 468--482. https://doi.org/10.1145/3064176.3064204
[13]
Insup Lee. 1983. DYMOS: A Dynamic Modification System. www.cis.upenn.edu/~lee/mydissertation.doc
[14]
Kristis Makris and Rida A. Bazzi. 2009. Immediate Multi-threaded Dynamic Software Updates Using Stack Reconstruction. In Proceedings of the 2009 Conference on USENIX Annual Technical Conference (USENIX '09). USENIX Association, Berkeley, CA, USA, 31--31.
[15]
Kristis Makris and Kyung Dong Ryu. 2007. Dynamic and adaptive updates of non-quiescent subsystems in commodity operating system kernels. In Proceedings of the ACM SIGOPS/EuroSys European Conference on Computer Systems 2007 (EuroSys '07), Thomas Gross and Paulo Ferreira (Eds.). ACM Press, New York, NY, USA, 327--340. https://doi.org/10.1145/1272996.1273031
[16]
Jagan Singh Meena, Simon Min Sze, Umesh Chand, and Tseung-Yuen Tseng. 2014. Overview of emerging nonvolatile memory technologies. Nanoscale research letters 9, 1 (2014), 526.
[17]
Iulian Neamtiu, Michael Hicks, Gareth Stoyle, and Manuel Oriol. 2006. Practical Dynamic Software Updating for C. In Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '06). ACM, New York, NY, USA, 72--83. https://doi.org/10.1145/1133981.1133991
[18]
Rajesh Nishtala, Hans Fugal, Steven Grimm, Marc Kwiatkowski, Herman Lee, Harry C. Li, Ryan McElroy, Mike Paleczny, Daniel Peek, Paul Saab, David Stafford, Tony Tung, and Venkateshwaran Venkataramani. 2013. Scaling Memcache at Facebook. In Presented as part of the 10th USENIX Symposium on Networked Systems Design and Implementation (NSDI 13). USENIX, Lombard, IL, 385--398.
[19]
Vojtěch Pavlík. 2014. kGraft: Live patching of the Linux kernel. https://www.suse.com/media/presentation/kGraft.pdf, visited 2019-08-05.
[20]
Josh Poimboeuf and Seth Jennings. 2014. Introducing kpatch: Dynamic Kernel Patching. https://rhelblog.redhat.com/2014/02/26/kpatch, visited 2019-08-05.
[21]
Redislab. 2019. Redis. http://redis.io, visited 2019-07-21.
[22]
Florian Rommel, Christian Dietrich, Michael Rodin, and Daniel Lohmann. 2019. Multiverse: Compiler-Assisted Management of Dynamic Variability in Low-Level System Software. In Fourteenth EuroSys Conference 2019 (EuroSys '19). ACM Press, New York, NY, USA. https://doi.org/10.1145/3302424.3303959
[23]
M. Seltzer, V. Marathe, and S. Byan. [n. d.]. An NVM Carol: Visions of NVM Past, Present, and Future. In 2018 IEEE 34th International Conference on Data Engineering (ICDE) (2018-04). 15--23. https://doi.org/10.1109/ICDE.2018.00011

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLOS '19: Proceedings of the 10th Workshop on Programming Languages and Operating Systems
October 2019
79 pages
ISBN:9781450370172
DOI:10.1145/3365137
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 October 2019

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

Conference

SOSP '19
Sponsor:

Acceptance Rates

Overall Acceptance Rate 17 of 32 submissions, 53%

Upcoming Conference

SOSP '25
ACM SIGOPS 31st Symposium on Operating Systems Principles
October 13 - 16, 2025
Seoul , Republic of Korea

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)3
Reflects downloads up to 03 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media