[CRIU] Saving the state of Google Earth

Pavel Emelyanov xemul at virtuozzo.com
Thu Apr 28 03:29:09 PDT 2016


On 04/27/2016 09:52 PM, Teresa e Junior wrote:
> Yesterday, I saw the page "Usage scenarios", where it talks about the
> ability to save the state of games. Not exactly a game, but very
> similar, sometimes Google Earth crashes, and we lose hours of work.
> There is no auto-save feature, neither does it have a keyboard shortcut
> to save, so we ended up with a shell script that watches for window
> events, blocks all input, and runs with the keyboard to File » Save »
> Save my places. It is somehow fast, but annoying and error prone,
> frequently it ends up choosing undesired options from the menu.
> Unfortunately, we don't have an open source alternative for this
> particular work.

:)

> So based on CRIU's usage scenarios, yesterday we have recompiled the
> Liquorix kernel with the needed kernel options (except
> CONFIG_MEM_SOFT_DIRTY, which I thought I had set, but in the end I
> didn't, but it seems to be optional). 

The MEM_SOFT_DIRTY is only needed if you want to track memory changes.
Like -- if regular dump takes too long you may try to go with pre-dump,
that doesn't freeze tasks and the do incremental dump. But that's an
optimization.

> Trying to create a checkpoint for
> Google Earth results in the following (Linux 4.5.2, Ubuntu 16.04):
> 
> $ sudo criu dump -D checkpoint -t "$(pidof googleearth-bin)"
> Error (proc_parse.c:499): Can't handle non-regular mapping on 28567's
> map 7f84d9a11000

This error means, that process 28567 has a virtual memory region at
address 0x7f84... which is neither anonymous, not regular file. Since
you're dumping an X application this should be some mapping to graphics
driver (I'm not an expert in this area). CRIU doesn't support this yet,
because such driver mappings should be special-handled each.

Would you show the output of the "cat /proc/28567/maps" command?

> Error (cr-dump.c:1201): Collect mappings (pid: 28567) failed with -1
> Error (cr-dump.c:1600): Dumping FAILED.
> 
> We have tried researching about the possibility of saving the state of
> Google Earth with CRIU, and there is the page https://criu.org/VNC that
> talks about running graphical applications with VNC. We don't have much
> experience with VNC, but I guess running a 3D application with VNC must
> be a no-no?

Yes, using VNC only to make CRIU work would be not optimal.

> On criu.org there is some stuff about Docker containers too, and we have
> found this page about running 3D applications from Docker:
> https://github.com/gklingler/docker3d
> 
> But what would be the recommended method for us to save the state of
> Google Earth with CRIU? 

We have "dumping graphical app" talk in our todo list, but this is not
in primary goals for Virtuozzo company. Nonetheless we're ready to help 
you or anyone else who is willing to bring this support into CRIU.

To begin, let's find out what the blocking mapping is (from the logs you
provided above), then it would be more clear how to deal with that.

> I guess it would be the same way as a game. I
> think preserving things like the network connection are not really
> needed, the only important thing for us is being able to reopen Google
> Earth and saving the work if needed.
> 
> Thank you for your attention!
> Teresa e Junior

-- Pavel



More information about the CRIU mailing list