[CRIU] CRIU with GNU Screen: dumping and restoring entire process trees under Screen

Pavel Tikhomirov snorcht at gmail.com
Fri Apr 24 12:00:05 MSK 2020


Hello Nikhil!

I'm not sure anyone actually checked that criu works on wsl, some
kernel interfaces may be not implemented.

I've just tried criu on WSL and got some errors:


:/home/snorch/devel/criu# criu check
Warn  (criu/kerndat.c:659): Can't load /run/criu.kdat
Error (criu/util.c:714): exited, status=3
Error (criu/util.c:714): exited, status=3
Error (criu/kerndat.c:47): Can't open 0/pagemap on procfs: No such
file or directory
Error (criu/sysctl.c:368): Can't open sysctl vm/mmap_min_addr: No such
file or directory
Warn  (criu/kerndat.c:137): Can't fetch vm/mmap_min_addr value, use
default 0x10000
:/home/snorch/devel/criu#

Best Regards, Tikhomirov Pavel.

пт, 17 апр. 2020 г. в 13:06, Nikhil Nair <nnair at pobox.com>:
>
> Hi,
>
> I'm completely new to CRIU, and it sounds very interesting.
>
> On the website, I found a page about using CRIU to dump and restore entire
> process trees under screen, but it seems the page is empty, and has been so
> for 3 years.
>
> I'm hopeful, though, that the existence of that page means this is very
> doable indeed.  Is that right?  I've searched the archive of this list for
> an answer to this, as well as Googling it, but couldn't find anything.
>
> Ideally, I'd like to be able to have a script running in the background
> which will take a snapshot of my screen session (which typically has one
> Emacs session running within it, plus a number of bash shells with
> different CWDs and screen contents) every several minutes (and then delete
> old snapshots so that it only keeps the last few at any time).  I presume
> taking a snapshot will involve both a CRIU dump and taking a copy of my
> relevant working directories.
>
> The reason I'm looking at this is that I'm shifting to develop on Windows
> 10 using their Windows Subsystem for Linux (WSL), running Ubuntu.  It's
> pretty much binary compatible with Ubuntu running on a normal AMD64
> platform with a text console (I'm not using X).
>
> The issue is that, sometimes, the host Windows machine reboots, without
> always asking my permission - or, at least, only waiting so long, so if I'm
> away from the machine, I could come back to find the machine rebooted, and
> my screen session lost.  There are things I can do to make reboots less
> likely, but I don't trust Windows not to reboot if it considers it
> important, without giving me a chance to save my work.
>
> But honestly, even if I did have a chance to save my work, taking a
> snapshot would be much easier than setting up the screen session from
> scratch, anyway.
>
> So... what's the situation?  Is this reasonably straightforward?
>
> If the above won't work, I could look into using lxc under WSL, and
> snapshot the container; but that seems overkill, for what I'm after.
> Docker would have been an option, but I gather (from the CRIU website) that
> dumping an interactive container isn't yet enabled in Docker.
>
> Cheers,
>
> Nikhil.
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu



More information about the CRIU mailing list