Comment 3 for bug 994063

Revision history for this message
Shane DeMeulenaere (shanemd) wrote :

Potential recovery:

For what it's worth. I just ran into this issue and recovered using reptyr. I had to build it from source from https://github.com/nelhage/reptyr though, as apt was locked up.

* run 'pstree -p' to find the PID to reconnect to. The tree looked something like:

  - trusty - ??? - bash - emacs

You want to PID of the leaf node here (in this case emacs)

* Then run 'reptyr PID'. This will land you back in your editor with potentially a bunged up terminal state (which is why you're in this mess to begin with). Exit your editor safely (in my case, emacs wouldn't accept C- commands, but handled ESC-x save-buffers-kill-terminal).

* Clean up whatever you were cleaning up (being careful of course)

* Run 'exit', as do-release-upgrade instructed

In my case, I was still slightly screwed because I messed up the pty of the 'trusty' process above while I was trying to figure this out. My apt and dpgk state was okay though, so I could just restart the upgrade. But I think this will allow you to resume your current release upgrade unscathed. I'd be interested to hear reports if anyone tries this.

Hopefully this helps someone!