UpStare

UpStare is a dynamic software updating system (compiler, runtime, patch-generator) for multi-threaded userspace applications. It allows updating applications that until now could not be updated at runtime at all or could be updated but with a possibly indefinite delay between the time an update is initiated and the time the update is effected (during this period no service is provided). Unlike existing approaches, we allow arbitrary changes to functions active on the stack and without requiring the user to anticipate the future evolution of a program. This capability is needed to dynamically update common real applications.

At the heart of our approach is a stack reconstruction technique that allows all functions on the call stack to be updated at the same time to guarantee that all active functions have the same version after an update. This is the first general approach that maintains both code and data representation consistency for multi-threaded applications.

Dynamic updates UpStare was able to successfully carry out include:

  • Recursion. Updating an application recursively computing Fibonacci numbers, while nested deep in the stack, to report additional information when the recursion unrolls.
  • Network Sockets. Updating a server application while serving multiple clients without closing the network socket.
  • Multi-threaded Applications. Updating the main function body executed by multiple threads of an application. Also, updating in a producer/consumer multi-threaded application only the consumer threads while the producer threads remained unmodified.
  • Multi-nested Long-Lived Loops. Updating in the middle of executing Bubblesort, a multi-nested long-lived loop, to continue executing from the middle of a different multi-nested long-lived loop implementing Selectionsort while reusing the existing program state. Additionally, updating from Bubblesort to Heapsort, which is a drastically different sorting algorithm executing over different loop iterators.
  • vsFTPd. Applying 13 updates spanning 5.5 years of the multi-process (forked processes do not communicate) vsFTPd server (about 12,000 lines of code).
  • PostgreSQL. Updating the multi-process (forked processes communicate) PostgreSQL 7.4.16 database server (more than 200,000 lines of code).

Documentation:
A users manual is available. [HTML single page][HTML multiple pages][PDF]

Papers:

  • Whole-Program Dynamic Software Updating, Kristis Makris, Ph.D Dissertation, December 2009. [PDF] [BibTex]
  • Dynamic Software Updates: The State Mapping Problem. Rida A. Bazzi, Kristis Makris, Peyman Nayeri, Jun Shen, The 2nd ACM Workshop on Hot Topics in Software Upgrades (HotSWUp '09), October 2009. [PDF] [BibTex][presentation slides]
  • Immediate Multi-Threaded Dynamic Software Updates Using Stack Reconstruction. Kristis Makris, Rida A. Bazzi, USENIX 2009, June 2009. [PDF] [BibTex][presentation slides]
  • Immediate Multi-Threaded Dynamic Software Updates Using Stack Reconstruction. Kristis Makris, Rida Bazzi, Technical Report, Department of Computer Science and Engineering, Arizona State University, April 2008, TR-08-007. [PDF] [BibTex]

Software:
Releases always pass some basic regression tests. Releases are available here.

Resources:
- Mailing list upstare-users
- News and RSS feed.





This work was partially supported by NSF grant CSR-0849980 through DUOSS at ASU. The findings do not necessarily reflect the opinion of NSF.


|