Loading [MathJax]/extensions/tex2jax.js

From Global to Local Quiescence: Wait-Free Code Patching of Multi-Threaded Processes

Research output: Chapter in book/report/conference proceedingConference contributionResearchpeer review

Authors

  • Florian Rommel
  • Christian Dietrich
  • Daniel Friesel
  • Marcel Köppen
  • Daniel Lohmann

External Research Organisations

  • Osnabrück University

Details

Original languageEnglish
Title of host publicationOSDI'20: Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation
Pages651-666
Number of pages16
ISBN (electronic)978-1-939133-19-9
Publication statusPublished - 4 Nov 2020

Abstract

Live patching has become a common technique to keep long-running system services secure and up-to-date without causing downtimes during patch application. However, to safely apply a patch, existing live-update methods require the entire process to enter a state of quiescence, which can be highly disruptive for multi-threaded programs: Having to halt all threads (e.g., at a global barrier) for patching not only hampers quality of service, but can also be tremendously difficult to implement correctly without causing deadlocks or other synchronization issues. In this paper, we present WFPATCH, a wait-free approach to inject code changes into running multi-threaded programs. Instead of having to stop the world before applying a patch, WFPATCH can gradually apply it to each thread individually at a local point of quiescence, while all other threads can make uninterrupted progress. We have implemented WFPATCH as a kernel service and user-space library for Linux 5.1 and evaluated it with OpenLDAP, Apache, Memcached, Samba, Node.js, and MariaDB on Debian 10 (“buster”). In total, we successfully applied 33 different binary patches into running programs while they were actively servicing requests; 15 patches had a CVE number or were other critical updates. Applying a patch with WFPATCH did not lead to any noticeable increase in request latencies - even under high load - while applying the same patch after reaching global quiescence increases tail latencies by a factor of up to 41× for MariaDB.

ASJC Scopus subject areas

Cite this

From Global to Local Quiescence: Wait-Free Code Patching of Multi-Threaded Processes. / Rommel, Florian; Dietrich, Christian; Friesel, Daniel et al.
OSDI'20: Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation. 2020. p. 651-666.

Research output: Chapter in book/report/conference proceedingConference contributionResearchpeer review

Rommel, F, Dietrich, C, Friesel, D, Köppen, M, Borchert, C, Müller, M, Spinczyk, O & Lohmann, D 2020, From Global to Local Quiescence: Wait-Free Code Patching of Multi-Threaded Processes. in OSDI'20: Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation. pp. 651-666. <https://dl.acm.org/doi/10.5555/3488766.3488803>
Rommel, F., Dietrich, C., Friesel, D., Köppen, M., Borchert, C., Müller, M., Spinczyk, O., & Lohmann, D. (2020). From Global to Local Quiescence: Wait-Free Code Patching of Multi-Threaded Processes. In OSDI'20: Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation (pp. 651-666) https://dl.acm.org/doi/10.5555/3488766.3488803
Rommel F, Dietrich C, Friesel D, Köppen M, Borchert C, Müller M et al. From Global to Local Quiescence: Wait-Free Code Patching of Multi-Threaded Processes. In OSDI'20: Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation. 2020. p. 651-666
Rommel, Florian ; Dietrich, Christian ; Friesel, Daniel et al. / From Global to Local Quiescence : Wait-Free Code Patching of Multi-Threaded Processes. OSDI'20: Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation. 2020. pp. 651-666
Download
@inproceedings{4a45567f1b8b406a85e0ae70c40efd31,
title = "From Global to Local Quiescence: Wait-Free Code Patching of Multi-Threaded Processes",
abstract = "Live patching has become a common technique to keep long-running system services secure and up-to-date without causing downtimes during patch application. However, to safely apply a patch, existing live-update methods require the entire process to enter a state of quiescence, which can be highly disruptive for multi-threaded programs: Having to halt all threads (e.g., at a global barrier) for patching not only hampers quality of service, but can also be tremendously difficult to implement correctly without causing deadlocks or other synchronization issues. In this paper, we present WFPATCH, a wait-free approach to inject code changes into running multi-threaded programs. Instead of having to stop the world before applying a patch, WFPATCH can gradually apply it to each thread individually at a local point of quiescence, while all other threads can make uninterrupted progress. We have implemented WFPATCH as a kernel service and user-space library for Linux 5.1 and evaluated it with OpenLDAP, Apache, Memcached, Samba, Node.js, and MariaDB on Debian 10 (“buster”). In total, we successfully applied 33 different binary patches into running programs while they were actively servicing requests; 15 patches had a CVE number or were other critical updates. Applying a patch with WFPATCH did not lead to any noticeable increase in request latencies - even under high load - while applying the same patch after reaching global quiescence increases tail latencies by a factor of up to 41× for MariaDB.",
author = "Florian Rommel and Christian Dietrich and Daniel Friesel and Marcel K{\"o}ppen and Christoph Borchert and Michael M{\"u}ller and Olaf Spinczyk and Daniel Lohmann",
note = "Funding information: We thank our anonymous reviewers and our shepherd Andrew Baumann for their constructive feedback and the efforts they made to improve this paper. We also thank Lennart Glauer for his work on an early WFPATCH prototype. This work was supported by the German Research Council (DFG) under the grants LO 1719/3, LO 1719/4, SP 968/9-2.",
year = "2020",
month = nov,
day = "4",
language = "English",
pages = "651--666",
booktitle = "OSDI'20: Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation",

}

Download

TY - GEN

T1 - From Global to Local Quiescence

T2 - Wait-Free Code Patching of Multi-Threaded Processes

AU - Rommel, Florian

AU - Dietrich, Christian

AU - Friesel, Daniel

AU - Köppen, Marcel

AU - Borchert, Christoph

AU - Müller, Michael

AU - Spinczyk, Olaf

AU - Lohmann, Daniel

N1 - Funding information: We thank our anonymous reviewers and our shepherd Andrew Baumann for their constructive feedback and the efforts they made to improve this paper. We also thank Lennart Glauer for his work on an early WFPATCH prototype. This work was supported by the German Research Council (DFG) under the grants LO 1719/3, LO 1719/4, SP 968/9-2.

PY - 2020/11/4

Y1 - 2020/11/4

N2 - Live patching has become a common technique to keep long-running system services secure and up-to-date without causing downtimes during patch application. However, to safely apply a patch, existing live-update methods require the entire process to enter a state of quiescence, which can be highly disruptive for multi-threaded programs: Having to halt all threads (e.g., at a global barrier) for patching not only hampers quality of service, but can also be tremendously difficult to implement correctly without causing deadlocks or other synchronization issues. In this paper, we present WFPATCH, a wait-free approach to inject code changes into running multi-threaded programs. Instead of having to stop the world before applying a patch, WFPATCH can gradually apply it to each thread individually at a local point of quiescence, while all other threads can make uninterrupted progress. We have implemented WFPATCH as a kernel service and user-space library for Linux 5.1 and evaluated it with OpenLDAP, Apache, Memcached, Samba, Node.js, and MariaDB on Debian 10 (“buster”). In total, we successfully applied 33 different binary patches into running programs while they were actively servicing requests; 15 patches had a CVE number or were other critical updates. Applying a patch with WFPATCH did not lead to any noticeable increase in request latencies - even under high load - while applying the same patch after reaching global quiescence increases tail latencies by a factor of up to 41× for MariaDB.

AB - Live patching has become a common technique to keep long-running system services secure and up-to-date without causing downtimes during patch application. However, to safely apply a patch, existing live-update methods require the entire process to enter a state of quiescence, which can be highly disruptive for multi-threaded programs: Having to halt all threads (e.g., at a global barrier) for patching not only hampers quality of service, but can also be tremendously difficult to implement correctly without causing deadlocks or other synchronization issues. In this paper, we present WFPATCH, a wait-free approach to inject code changes into running multi-threaded programs. Instead of having to stop the world before applying a patch, WFPATCH can gradually apply it to each thread individually at a local point of quiescence, while all other threads can make uninterrupted progress. We have implemented WFPATCH as a kernel service and user-space library for Linux 5.1 and evaluated it with OpenLDAP, Apache, Memcached, Samba, Node.js, and MariaDB on Debian 10 (“buster”). In total, we successfully applied 33 different binary patches into running programs while they were actively servicing requests; 15 patches had a CVE number or were other critical updates. Applying a patch with WFPATCH did not lead to any noticeable increase in request latencies - even under high load - while applying the same patch after reaching global quiescence increases tail latencies by a factor of up to 41× for MariaDB.

UR - http://www.scopus.com/inward/record.url?scp=85096787683&partnerID=8YFLogxK

M3 - Conference contribution

SP - 651

EP - 666

BT - OSDI'20: Proceedings of the 14th USENIX Conference on Operating Systems Design and Implementation

ER -