[CRIU] CRIT can't decode files.img correctly.

Jun Gan geminijun at gmail.com
Fri Jan 3 04:27:31 MSK 2020


I can use criu successfully dump/restore my application. For some reason, I
need to change vma&opened files to support restore on another computer.

I can use CIRT decode mm.img but met following error when tried to decode
files.img:

# crit-python3 decode -i backup_dir/files.img --pretty
.....................
        {
            "type": "UNIXSK",
            "id": 31,
            "usk": {
                "id": 31,
                "ino": 265331349,
                "type": "STREAM",
                "state": "LISTEN",
                "flags": "0x80002",
                "uflags": "0x0",
                "backlog": 128,
                "peer": 0,
                "fown": {
                    "uid": 0,
                    "euid": 0,
                    "signum": 0,
                    "pid_type": 0,
                    "pid": 0
                },
                "opts": {
                    "so_sndbuf": 212992,
                    "so_rcvbuf": 212992,
                    "so_snd_tmo_sec": 0,
                    "so_snd_tmo_usec": 0,
                    "so_rcv_tmo_sec": 0,
                    "so_rcv_tmo_usec": 0,
                    "reuseaddr": false,
                    "so_priority": 0,
                    "so_rcvlowat": 1,
                    "so_mark": 0,
                    "so_passcred": false,
                    "so_passsec": false,
                    "so_dontroute": false,
                    "so_no_check": false,
                    "so_reuseport": false,
                    "so_broadcast": false
                },
                "name": Traceback (most recent call last):
  File "crit/crit-python3", line 6, in <module>
    cli.main()
  File "crit/pycriu/cli.py", line 410, in main
    opts["func"](opts)
  File "crit/pycriu/cli.py", line 43, in decode
    json.dump(img, f, indent=indent)
  File "/usr/lib64/python3.6/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/usr/lib64/python3.6/json/encoder.py", line 430, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/lib64/python3.6/json/encoder.py", line 404, in _iterencode_dict
    yield from chunks
  File "/usr/lib64/python3.6/json/encoder.py", line 325, in _iterencode_list
    yield from chunks
  File "/usr/lib64/python3.6/json/encoder.py", line 404, in _iterencode_dict
    yield from chunks
  File "/usr/lib64/python3.6/json/encoder.py", line 404, in _iterencode_dict
    yield from chunks
  File "/usr/lib64/python3.6/json/encoder.py", line 437, in _iterencode
    o = _default(o)
  File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
    o.__class__.__name__)
TypeError: Object of type 'bytes' is not JSON serializable


It looks like something about json format, I'm not familiar with python,
can someone help me how to figure out what's wrong here?

I'm using CRIU 3.13 and Python 3.6.8

Thank you very much!!!!

-- 
Jun Gan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20200102/df1c187e/attachment.html>


More information about the CRIU mailing list