Difference between revisions of "Reversible Computers"

From Dan Shearer CV
 
Line 1: Line 1:
Reversible Computing and Reversible Debugging are useful applications of [[:Category:Time Shifting|Time Shifting]]. Programs or entire simulated systems are run with regular snapshots taken of full state. To reverse, the snapshots are replayed in the reverse order. Many ways of implementing this have been tried, and I spent two years of my life as Open Source Manager for a company that had one of the best. But in 2021 the plain facts are:
+
Reversible Computing and Reversible Debugging are useful applications of [[:Category:Time Shifting|Time Shifting]]. It is possible to have a network of running computers - say, with Android, Windows or Linux - and to stop them all, reverse back to any point in time. For example, to a point just before a catastrophic error occured, so we can watch that carefully. And again if we want to, any number of times. This is amazing!
   
  +
So, while I personally use and recommend reversibility technologies, they are not ubiquitous. Very difficult problems of unreliable software and unexplainable crashes happen so often that they affect societies. I believe reversibility could potentially help a lot.
# Full simulation reversibility at high speed is possible - including even running and operating system backwards, even unbooting!
 
  +
  +
In 2021 the plain facts are:
  +
 
# Full simulation reversibility at high speed is possible - including even running and operating system backwards, even unbooting. This is well-understood computer science.
 
# The ability to rewind and replay is very powerful for debugging, especially for complex stacks, and rare or non-deterministics bugs.
 
# The ability to rewind and replay is very powerful for debugging, especially for complex stacks, and rare or non-deterministics bugs.
# Very few developers are interested in these features, and until recently they appeared to be commercially unviable. However, see previous point... just about every stack is a complex stack these days, and the overall reliability of software is getting worse by many measures. So we should all be using reversible debugging, right? Apparently not yet.
+
# Very few developers are interested in these features! Until recently they appeared to be commercially unviable, despite offering amazing visibility into the most complicated problems. And despite some implementations being very easy to use.
   
Look how excited I was in 2005 when I [https://sourceware.org/legacy-ml/gdb/2005-05/msg00162.html wrote on the GDB developers list]:
+
See how excited I was in 2005 when I [https://sourceware.org/legacy-ml/gdb/2005-05/msg00162.html wrote on the GDB developers list]:
   
 
:''I think reversibility is the biggest advance in debugging since source code debugging''
 
:''I think reversibility is the biggest advance in debugging since source code debugging''
Line 20: Line 24:
 
* GDB does not need to be driven: it has a well-tested implementation of [https://sourceware.org/gdb/onlinedocs/gdb/Process-Record-and-Replay.html#Process-Record-and-Replay Record/Replay and Reversible Debugging]. GDB can drive a reversible target itself.
 
* GDB does not need to be driven: it has a well-tested implementation of [https://sourceware.org/gdb/onlinedocs/gdb/Process-Record-and-Replay.html#Process-Record-and-Replay Record/Replay and Reversible Debugging]. GDB can drive a reversible target itself.
   
Besides these, Visual Studio has a feature called Time Travel, Simulics is a commercial emulator, and UndoDB is a user-space record/replay solution.
+
Besides these, Visual Studio has a feature called Time Travel, Simulics is a commercial emulator, and UndoDB is a user-space record/replay solution. Perhaps one of these will spark a revolution. I do recommend students try them out!
   
I have an ongoing research project to understand what is needed to encourage developers to use these tools for more deterministic debugging and system testing. I put two years of my life into this and it still seems like a very good idea to me. Will the world ever agree? Even if it does not, we still need much better solutions for debugging complex stacks.
+
I have an ongoing research project to understand what is needed to encourage developers to use these tools for more deterministic debugging and system testing. I put a lot of effort into this topic and I'm curious to see if the world will ever agree! Even if it does not, we still need much better solutions for debugging complex stacks.
   
 
[[Category: Time Shifting]]
 
[[Category: Time Shifting]]

Revision as of 11:04, 16 November 2021

Reversible Computing and Reversible Debugging are useful applications of Time Shifting. It is possible to have a network of running computers - say, with Android, Windows or Linux - and to stop them all, reverse back to any point in time. For example, to a point just before a catastrophic error occured, so we can watch that carefully. And again if we want to, any number of times. This is amazing!

So, while I personally use and recommend reversibility technologies, they are not ubiquitous. Very difficult problems of unreliable software and unexplainable crashes happen so often that they affect societies. I believe reversibility could potentially help a lot.

In 2021 the plain facts are:

  1. Full simulation reversibility at high speed is possible - including even running and operating system backwards, even unbooting. This is well-understood computer science.
  2. The ability to rewind and replay is very powerful for debugging, especially for complex stacks, and rare or non-deterministics bugs.
  3. Very few developers are interested in these features! Until recently they appeared to be commercially unviable, despite offering amazing visibility into the most complicated problems. And despite some implementations being very easy to use.

See how excited I was in 2005 when I wrote on the GDB developers list:

I think reversibility is the biggest advance in debugging since source code debugging

The world did not agree with me. Wind River does not advertise Simics' reverse execution feature so I presume it has been dropped, and VMware Player dropped theirs in 2011. Jakob Engblom's Comprehensive Reversibility List is maintained by my former Simics colleague, and it has very few entries since the dawn of commercial source code debugging.

But maybe the world is changing. In the same way that Privacy succeeded where Security had failed to make the pitch to decisionmakers, perhaps now CyberSecurity will succeed where the point about Complexity just isn't working.

In 2021 there are some well-maintained open source solutions:

  • Eclipse has support for driving reversible targets, including full-system targets via the GDB MI interface
  • There are several reversible user mode targets, notably rr
  • DMTCP is a multi-thread user mode trace/replay solution
  • GDB does not need to be driven: it has a well-tested implementation of Record/Replay and Reversible Debugging. GDB can drive a reversible target itself.

Besides these, Visual Studio has a feature called Time Travel, Simulics is a commercial emulator, and UndoDB is a user-space record/replay solution. Perhaps one of these will spark a revolution. I do recommend students try them out!

I have an ongoing research project to understand what is needed to encourage developers to use these tools for more deterministic debugging and system testing. I put a lot of effort into this topic and I'm curious to see if the world will ever agree! Even if it does not, we still need much better solutions for debugging complex stacks.