checkpoint-restore / criu

Checkpoint/Restore tool
criu.org
Other
2.97k stars 596 forks source link

Ubuntu:22.04 build fails #2314

Open tzvetkovg opened 11 months ago

tzvetkovg commented 11 months ago

I am running on a macOS and I know criu requires linux so that's why I try to build criu via a docker container. My steps are as follows

Steps to reproduce the issue:

  1. docker run --privileged --rm -it -v /var/run/docker.sock:/var/run/docker.sock ubuntu:22.04 bash
  2. Then inside the container I run this to install sudo - apt-get update && apt-get install sudo
  3. Kernel check inside the container returns uname -a Linux f5d30f4b834a 6.5.11-linuxkit #1 SMP PREEMPT Mon Dec 4 11:30:00 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
  4. Inside the container then I install criu - sudo apt-get install criu
  5. criu check and I get
    Error (criu/util.c:635): exited, status=1
    Error (criu/util.c:635): exited, status=1
    Warn  (criu/kerndat.c:869): Can't keep kdat cache on non-tempfs
    Looks good.

    6.sudo criu check --all

    Error (criu/util.c:635): exited, status=1
    Error (criu/util.c:635): exited, status=1
    Warn  (criu/kerndat.c:869): Can't keep kdat cache on non-tempfs
    Warn  (criu/cr-check.c:855): Dirty tracking is OFF. Memory snapshot will not work.
    Warn  (criu/cr-check.c:1284): Do not have API to map vDSO - will use mremap() to restore vDSO
    Error (criu/cr-check.c:1250): UFFD is not supported
    Error (criu/cr-check.c:1250): UFFD is not supported
    sudo: mon_handle_sigchld: waitpid: No child processes
    Error (criu/cr-check.c:1038): failed to mount autofs: No such device
    Warn  (criu/cr-check.c:1204): CRIU built without CONFIG_COMPAT - can't C/R compatible tasks
    Looks good but some kernel features are missing
    which, depending on your process tree, may cause
    dump or restore failure.

    7.Then I am trying to build the simple example as described here https://criu.org/Simple_loop

  6. the dump command works fine inside the docker container (criu dump -t 2221 -vvv -o dump.log && echo OK)
  7. However, it fails on restore command criu restore -d -vvv -o restore.log && echo OK with the exception
    (00.000780) Version: 3.16.1 (gitid 0)
    (00.001096) Running on f5d30f4b834a Linux 6.5.11-linuxkit #1 SMP PREEMPT Mon Dec  4 11:30:00 UTC 2023 aarch64
    (00.001134) File /run/criu.kdat does not exist
    (00.001203) sockets: Probing sock diag modules
    (00.007524) sockets: Done probing
    (00.010336) Error (criu/util.c:635): exited, status=1
    (00.012115) Error (criu/util.c:635): exited, status=1
    (00.012211) Pagemap is fully functional
    (00.012312) Found anon-shmem device at 1
    (00.012320) Reset 810's dirty tracking
    (00.012369)  ... done
    (00.012412) Dirty tracking support is OFF
    (00.012638) Found task size of 1000000000000
    (00.043837) Restoring netdev veth idx 10
    (00.048880) Dumping netns links
    (00.048985)     LD: Got link 1, type 772
    (00.048991)     LD: Got link 2, type 768
    (00.048994)     LD: Got link 3, type 769
    (00.048997)     LD: Got link 10, type 1
    (00.050888) uffd: Lazy pages are not available: Function not implemented
    (00.051256) vdso: Parsing at ffff84c75000 ffff84c76000
    (00.051261) vdso: PT_LOAD p_vaddr: 0
    (00.051262) vdso: DT_HASH: e8
    (00.051264) vdso: DT_STRTAB: 1a8
    (00.051265) vdso: DT_SYMTAB: 118
    (00.051266) vdso: DT_STRSZ: 77
    (00.051268) vdso: DT_SYMENT: 18
    (00.051269) vdso: nbucket 3 nchain 6 bucket ffff84c750f0 chain ffff84c750fc
    (00.051271) vdso: rt [vdso] ffff84c75000-ffff84c76000 [vvar] ffff84c73000-ffff84c75000
    (00.057031) Adjust mmap_min_addr 0x8000 -> 0x10000
    (00.057065) Found mmap_min_addr 0x10000
    (00.057091) files stat: fs/nr_open 1048576
    (00.057296) Warn  (criu/kerndat.c:869): Can't keep kdat cache on non-tempfs
    (00.057381) rlimit: RLIMIT_NOFILE unlimited for self
    (00.057564) kernel pid_max=99999
    (00.057567) Reading image tree
    (00.057642) Add mnt ns 6 pid 708
    (00.057645) Add net ns 2 pid 708
    (00.057647) Add pid ns 1 pid 708
    (00.057721) pstree pid_max=801
    (00.057726) Will restore in 0 namespaces
    (00.057737) NS mask to use 0
    (00.057776) Collecting 51/56 (flags 3)
    (00.057795) No memfd.img image
    (00.057797)  `- ... done
    (00.057799) Collecting 40/54 (flags 2)
    (00.057852) Collected [usr/bin/dash] ID 0x1
    (00.057856) Collected [usr/lib/aarch64-linux-gnu/libc.so.6] ID 0x2
    (00.057858) Collected [usr/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1] ID 0x3
    (00.057860) Collected [dev/null] ID 0x4
    (00.057862) Collected [test.log] ID 0x5
    (00.057864) Collected [test.sh] ID 0x6
    (00.057865) Collected [.] ID 0x7
    (00.057867) Collected [usr/bin/sleep] ID 0x8
    (00.057871)  `- ... done
    (00.057872) Collecting 46/68 (flags 0)
    (00.057876) No remap-fpath.img image
    (00.057878)  `- ... done
    (00.057890) No apparmor.img image
    (00.057898) No cgroup.img image
    (00.057920) Running pre-restore scripts
    (00.057996) No pidns-1.img image
    (00.058057) Forking task with 708 pid (flags 0x0)
    (00.058060) Creating process using clone3()
    (00.058371) PID: real 708 virt 708
    (00.058721)    708: timens: monotonic -16 77702201
    (00.058733)    708: timens: boottime -16 77690492
    (00.058784)    708: cg: Cgroups 1 inherited from parent
    (00.058788)    708: Calling restore_sid() for init
    (00.058790)    708: Restoring 708 to 708 sid
    (00.058852)    708: Collecting 44/37 (flags 2)
    (00.058858)    708: No tty-info.img image
    (00.058860)    708:  `- ... done
    (00.058861)    708: Collecting 45/51 (flags 0)
    (00.058864)    708: No tty-data.img image
    (00.058868)    708:  `- ... done
    (00.058870)    708: Restoring namespaces 708 flags 0x0
    (00.058873)    708: Preparing info about shared resources
    (00.058919)    708: Collecting 48/38 (flags 0)
    (00.058935)    708: No filelocks.img image
    (00.058937)    708:  `- ... done
    (00.058938)    708: Collecting 42/27 (flags 0)
    (00.058946)    708: No pipes-data.img image
    (00.058952)    708:  `- ... done
    (00.058953)    708: Collecting 43/27 (flags 0)
    (00.058957)    708: No fifo-data.img image
    (00.058958)    708:  `- ... done
    (00.058960)    708: Collecting 41/69 (flags 0)
    (00.058968)    708: No sk-queues.img image
    (00.058970)    708:  `- ... done
    (00.059009)    708: Found 17 VMAs in image
    (00.059012)    708: vma 0xaaaae53b0000 0xaaaae53cc000
    (00.059014)    708: vma 0xaaaae53db000 0xaaaae53dd000
    (00.059015)    708: vma 0xaaaae53dd000 0xaaaae53de000
    (00.059017)    708: vma 0xaaaae53de000 0xaaaae53e0000
    (00.059030)    708: vma 0xaaab026ed000 0xaaab0270e000
    (00.059031)    708: vma 0xffff957b0000 0xffff95939000
    (00.059033)    708: vma 0xffff95939000 0xffff95948000
    (00.059034)    708: vma 0xffff95948000 0xffff9594c000
    (00.059035)    708: vma 0xffff9594c000 0xffff9594e000
    (00.059037)    708: vma 0xffff9594e000 0xffff9595a000
    (00.059038)    708: vma 0xffff95969000 0xffff95994000
    (00.059040)    708: vma 0xffff9599e000 0xffff959a0000
    (00.059041)    708: vma 0xffff959a0000 0xffff959a2000
    (00.059042)    708: vma 0xffff959a2000 0xffff959a3000
    (00.059044)    708: vma 0xffff959a3000 0xffff959a5000
    (00.059045)    708: vma 0xffff959a5000 0xffff959a7000
    (00.059046)    708: vma 0xffffeaa4a000 0xffffeaa6b000
    (00.059061)    708: Collect fdinfo pid=708 fd=0 id=0x4
    (00.059064)    708: Collect fdinfo pid=708 fd=1 id=0x5
    (00.059066)    708: Collect fdinfo pid=708 fd=2 id=0x5
    (00.059067)    708: Collect fdinfo pid=708 fd=10 id=0x6
    (00.059120)    708: Found 16 VMAs in image
    (00.059122)    708: vma 0xaaaad9430000 0xaaaad9435000
    (00.059124)    708: vma 0xaaaad9445000 0xaaaad9446000
    (00.059125)    708: vma 0xaaaad9446000 0xaaaad9447000
    (00.059127)    708: vma 0xaaaae033c000 0xaaaae035d000
    (00.059128)    708: vma 0xffffa2c60000 0xffffa2de9000
    (00.059129)    708: vma 0xffffa2de9000 0xffffa2df8000
    (00.059131)    708: vma 0xffffa2df8000 0xffffa2dfc000
    (00.059132)    708: vma 0xffffa2dfc000 0xffffa2dfe000
    (00.059134)    708: vma 0xffffa2dfe000 0xffffa2e0a000
    (00.059135)    708: vma 0xffffa2e0e000 0xffffa2e39000
    (00.059136)    708: vma 0xffffa2e43000 0xffffa2e45000
    (00.059138)    708: vma 0xffffa2e45000 0xffffa2e47000
    (00.059139)    708: vma 0xffffa2e47000 0xffffa2e48000
    (00.059140)    708: vma 0xffffa2e48000 0xffffa2e4a000
    (00.059142)    708: vma 0xffffa2e4a000 0xffffa2e4c000
    (00.059143)    708: vma 0xffffe0ca6000 0xffffe0cc7000
    (00.059161)    708: Collect fdinfo pid=801 fd=0 id=0x4
    (00.059164)    708: Collect fdinfo pid=801 fd=1 id=0x5
    (00.059166)    708: Collect fdinfo pid=801 fd=2 id=0x5
    (00.059362)    708: skqueue: Preparing SCMs
    (00.059365)    708: unix: ghost: Resolving addresses
    (00.059367)    708: File descs:
    (00.059368)    708:  `- type 1 ID 0x1
    (00.059369)    708:  `- type 1 ID 0x2
    (00.059371)    708:  `- type 1 ID 0x3
    (00.059372)    708:  `- type 1 ID 0x4
    (00.059374)    708:    `- FD 0 pid 708
    (00.059375)    708:    `- FD 0 pid 801
    (00.059377)    708:  `- type 1 ID 0x5
    (00.059378)    708:    `- FD 1 pid 708
    (00.059379)    708:    `- FD 2 pid 708
    (00.059381)    708:    `- FD 1 pid 801
    (00.059382)    708:    `- FD 2 pid 801
    (00.059383)    708:  `- type 1 ID 0x6
    (00.059385)    708:    `- FD 10 pid 708
    (00.059386)    708:  `- type 1 ID 0x7
    (00.059387)    708:  `- type 1 ID 0x8
    (00.059551)    708: No parent images directory provided
    (00.059569)    708: Opened local page read 1 (parent 0)
    (00.059580)    708: Enqueue page-read
    (00.059582)    708: Enqueue page-read
    (00.059584)    708: Enqueue page-read
    (00.059585)    708: Enqueue page-read
    (00.059586)    708: Enqueue page-read
    (00.059588)    708: Enqueue page-read
    (00.059589)    708: Enqueue page-read
    (00.059590)    708: Enqueue page-read
    (00.059592)    708: Enqueue page-read
    (00.059593)    708: Enqueue page-read
    (00.059594)    708: Enqueue page-read
    (00.059596)    708: Enqueue page-read
    (00.059597)    708: Enqueue page-read
    (00.059598)    708: Enqueue page-read
    (00.059601)    708: nr_restored_pages: 25
    (00.059602)    708: nr_shared_pages:   0
    (00.059604)    708: nr_dropped_pages:   0
    (00.059605)    708: nr_lazy:           0
    (00.059613)    708: Shrunk premap area to 0xffff83edf000(0)
    (00.059615)    708: Restore on-core sigactions for 708
    (00.059690)    708: Restoring children in alien sessions:
    (00.059694)    708: Restoring children in our session:
    (00.059767)    708: Forking task with 801 pid (flags 0x0)
    (00.059769)    708: Creating process using clone3()
    (00.060131)    708: PID: real 801 virt 801
    (00.060169)    801: cg: Cgroups 1 inherited from parent
    (00.060208)    708: Restoring 708 to 708 pgid
    (00.060214)    801: No parent images directory provided
    (00.060240)    801: Opened local page read 2 (parent 0)
    (00.060253)    801: Enqueue page-read
    (00.060255)    801: Enqueue page-read
    (00.060256)    801: Enqueue page-read
    (00.060258)    801: Enqueue page-read
    (00.060259)    801: Enqueue page-read
    (00.060261)    801: Enqueue page-read
    (00.060262)    801: Enqueue page-read
    (00.060263)    801: Enqueue page-read
    (00.060265)    801: Enqueue page-read
    (00.060266)    801: Enqueue page-read
    (00.060267)    801: Enqueue page-read
    (00.060269)    801: Enqueue page-read
    (00.060270)    801: Enqueue page-read
    (00.060271)    801: Enqueue page-read
    (00.060275)    801: nr_restored_pages: 23
    (00.060277)    801: nr_shared_pages:   0
    (00.060278)    801: nr_dropped_pages:   0
    (00.060279)    801: nr_lazy:           0
    (00.060284)    801: Shrunk premap area to 0xffff83ef9000(0)
    (00.060285)    801: Restore on-core sigactions for 801
    (00.060313)    801: Restoring children in alien sessions:
    (00.060316)    801: Restoring children in our session:
    (00.060339)    801: Restoring 801 to 708 pgid
    (00.060383)    708: Restoring resources
    (00.060404)    708: Opening fdinfo-s
    (00.060409)    801: Restoring resources
    (00.060415)    708:         Create fd for 0
    (00.060418)    708:         Send fd 0 to /crtools-fd-801
    (00.060423)    801: Opening fdinfo-s
    (00.060425)    801:     Receive fd for 0
    (00.060429)    801:     Receive fd for 1
    (00.060430)    801:     Receive fd for 2
    (00.060455)    801:     Receive fd for 0
    (00.060458)    708: File test.log could only be validated with file size
    (00.060463)    708:         Create fd for 1
    (00.060464)    708:             Going to dup 1 into 2
    (00.060468)    708:         Send fd 1 to /crtools-fd-801
    (00.060469)    801: Further fle=0xffff84c6f858, pid=801
    (00.060475)    801:     Receive fd for 1
    (00.060476)    708:         Send fd 1 to /crtools-fd-801
    (00.060478)    801: Further fle=0xffff84c6f898, pid=801
    (00.060479)    708:     Receive fd for 2
    (00.060480)    801:     Receive fd for 2
    (00.060483)    801: Further fle=0xffff84c6f8d8, pid=801
    (00.060485)    708: File test.sh could only be validated with file size
    (00.060485)    801: Opening 0x00aaaad9430000-0x00aaaad9435000 0000000000000000 (41) vma
    (00.060489)    708:         Create fd for 10
    (00.060492)    708: Opening 0x00aaaae53b0000-0x00aaaae53cc000 0000000000000000 (41) vma
    (00.060521)    708: Opening 0x00aaaae53db000-0x00aaaae53dd000 0x0000000001b000 (41) vma
    (00.060526)    708: Opening 0x00aaaae53dd000-0x00aaaae53de000 0x0000000001d000 (41) vma
    (00.060527)    708: Opening 0x00ffff957b0000-0x00ffff95939000 0000000000000000 (20000041) vma
    (00.060532)    801: Opening 0x00aaaad9445000-0x00aaaad9446000 0x00000000005000 (41) vma
    (00.060536)    801: Opening 0x00aaaad9446000-0x00aaaad9447000 0x00000000006000 (41) vma
    (00.060538)    801: Opening 0x00ffffa2c60000-0x00ffffa2de9000 0000000000000000 (20000041) vma
    (00.060542)    708: Opening 0x00ffff95939000-0x00ffff95948000 0x00000000189000 (41) vma
    (00.060542)    801: Opening 0x00ffffa2de9000-0x00ffffa2df8000 0x00000000189000 (41) vma
    (00.060544)    708: Opening 0x00ffff95948000-0x00ffff9594c000 0x00000000188000 (41) vma
    (00.060545)    801: Opening 0x00ffffa2df8000-0x00ffffa2dfc000 0x00000000188000 (41) vma
    (00.060546)    708: Opening 0x00ffff9594c000-0x00ffff9594e000 0x0000000018c000 (41) vma
    (00.060548)    801: Opening 0x00ffffa2dfc000-0x00ffffa2dfe000 0x0000000018c000 (41) vma
    (00.060549)    708: Opening 0x00ffff95969000-0x00ffff95994000 0000000000000000 (20000041) vma
    (00.060550)    801: Opening 0x00ffffa2e0e000-0x00ffffa2e39000 0000000000000000 (20000041) vma
    (00.060561)    708: Opening 0x00ffff959a3000-0x00ffff959a5000 0x0000000002a000 (41) vma
    (00.060570)    801: Opening 0x00ffffa2e48000-0x00ffffa2e4a000 0x0000000002a000 (41) vma
    (00.060572)    708: Opening 0x00ffff959a5000-0x00ffff959a7000 0x0000000002c000 (41) vma
    (00.060572)    801: Opening 0x00ffffa2e4a000-0x00ffffa2e4c000 0x0000000002c000 (41) vma
    (00.060604)    801: `- render 9 iovs (0xaaaad9430000:4096...)
    (00.060605)    708: `- render 9 iovs (0xaaaae53b0000:4096...)
    (00.060608)    801: Restore via sigreturn
    (00.060610)    708: Restore via sigreturn
    (00.060646)    801: Parsed aaaab2130000-aaaab2280000 vma
    (00.060653)    801: Parsed aaaab228f000-aaaab22ae000 vma
    (00.060655)    801: Parsed aaaab228f000-aaaab22b5000 vma
    (00.060656)    801: Parsed aaaab228f000-aaaab22c5000 vma
    (00.060658)    801: Parsed aaaad725d000-aaaad756d000 vma
    (00.060659)    801: Parsed ffff84120000-ffff84129000 vma
    (00.060661)    801: Parsed ffff84120000-ffff84138000 vma
    (00.060678)    801: Parsed ffff84120000-ffff84139000 vma
    (00.060679)    801: Parsed ffff84120000-ffff8413a000 vma
    (00.060681)    801: Parsed ffff84140000-ffff8414e000 vma
    (00.060682)    801: Parsed ffff84140000-ffff8415d000 vma
    (00.060684)    801: Parsed ffff84140000-ffff8415e000 vma
    (00.060685)    801: Parsed ffff84140000-ffff8415f000 vma
    (00.060687)    801: Parsed ffff84160000-ffff8416d000 vma
    (00.060688)    801: Parsed ffff84160000-ffff8417c000 vma
    (00.060690)    801: Parsed ffff84160000-ffff8417d000 vma
    (00.060691)    801: Parsed ffff84160000-ffff8417e000 vma
    (00.060693)    801: Parsed ffff84160000-ffff84180000 vma
    (00.060694)    801: Parsed ffff84190000-ffff841bd000 vma
    (00.060696)    801: Parsed ffff84190000-ffff841cc000 vma
    (00.060697)    801: Parsed ffff84190000-ffff841cf000 vma
    (00.060699)    801: Parsed ffff84190000-ffff841d0000 vma
    (00.060702)    801: Parsed ffff841e0000-ffff841e4000 vma
    (00.060703)    801: Parsed ffff841e0000-ffff841f4000 vma
    (00.060705)    801: Parsed ffff841e0000-ffff841f5000 vma
    (00.060706)    801: Parsed ffff841e0000-ffff841f6000 vma
    (00.060708)    801: Parsed ffff84200000-ffff84275000 vma
    (00.060709)    801: Parsed ffff84200000-ffff84285000 vma
    (00.060711)    801: Parsed ffff84200000-ffff84286000 vma
    (00.060712)    801: Parsed ffff84200000-ffff84287000 vma
    (00.060714)    801: Parsed ffff84290000-ffff842d4000 vma
    (00.060715)    801: Parsed ffff84290000-ffff842e4000 vma
    (00.060718)    801: Parsed ffff84290000-ffff842e5000 vma
    (00.060719)    801: Parsed ffff84290000-ffff842e6000 vma
    (00.060723)    801: Parsed ffff842f0000-ffff8432f000 vma
    (00.060724)    801: Parsed ffff842f0000-ffff8433e000 vma
    (00.060737)    801: Parsed ffff842f0000-ffff84340000 vma
    (00.060739)    801: Parsed ffff842f0000-ffff84341000 vma
    (00.060741)    801: Parsed ffff84350000-ffff84363000 vma
    (00.060742)    801: Parsed ffff84350000-ffff84373000 vma
    (00.060743)    801: Parsed ffff84350000-ffff84374000 vma
    (00.060745)    801: Parsed ffff84350000-ffff84375000 vma
    (00.060746)    801: Parsed ffff84380000-ffff8451d000 vma
    (00.060748)    801: Parsed ffff84380000-ffff8452d000 vma
    (00.060749)    801: Parsed ffff84380000-ffff84531000 vma
    (00.060751)    801: Parsed ffff84380000-ffff84532000 vma
    (00.060752)    801: Parsed ffff84540000-ffff8455d000 vma
    (00.060754)    801: Parsed ffff84540000-ffff8456c000 vma
    (00.060755)    801: Parsed ffff84540000-ffff8456d000 vma
    (00.060757)    801: Parsed ffff84540000-ffff8456e000 vma
    (00.060758)    801: Parsed ffff84570000-ffff84697000 vma
    (00.060760)    801: Parsed ffff84570000-ffff846a6000 vma
    (00.060761)    801: Parsed ffff84570000-ffff846b0000 vma
    (00.060763)    801: Parsed ffff84570000-ffff846ba000 vma
    (00.060764)    801: Parsed ffff846c0000-ffff846ca000 vma
    (00.060766)    801: Parsed ffff846c0000-ffff846d9000 vma
    (00.060767)    801: Parsed ffff846c0000-ffff846da000 vma
    (00.060769)    801: Parsed ffff846c0000-ffff846db000 vma
    (00.060770)    801: Parsed ffff846e0000-ffff84869000 vma
    (00.060772)    801: Parsed ffff846e0000-ffff84878000 vma
    (00.060773)    801: Parsed ffff846e0000-ffff8487c000 vma
    (00.060775)    801: Parsed ffff846e0000-ffff8487e000 vma
    (00.060776)    801: Parsed ffff846e0000-ffff8488a000 vma
    (00.060778)    801: Parsed ffff84890000-ffff848a9000 vma
    (00.060779)    801: Parsed ffff84890000-ffff848b8000 vma
    (00.060781)    801: Parsed ffff84890000-ffff848b9000 vma
    (00.060782)    801: Parsed ffff84890000-ffff848ba000 vma
    (00.060783)    801: Parsed ffff84890000-ffff848bc000 vma
    (00.060785)    801: Parsed ffff848c0000-ffff848e0000 vma
    (00.060786)    801: Parsed ffff848c0000-ffff848ef000 vma
    (00.060788)    801: Parsed ffff848c0000-ffff848f1000 vma
    (00.060789)    801: Parsed ffff848c0000-ffff848f2000 vma
    (00.060808)    801: Parsed ffff848f7000-ffff84900000 vma
    (00.060813)    801: Parsed ffff848f7000-ffff84908000 vma
    (00.060814)    801: Parsed ffff848f7000-ffff84917000 vma
    (00.060816)    801: Parsed ffff848f7000-ffff84918000 vma
    (00.060817)    801: Parsed ffff848f7000-ffff84919000 vma
    (00.060819)    801: Parsed ffff84920000-ffff849da000 vma
    (00.060821)    801: Parsed ffff84920000-ffff849e9000 vma
    (00.060822)    801: Parsed ffff84920000-ffff849fa000 vma
    (00.060824)    801: Parsed ffff84920000-ffff849fc000 vma
    (00.060832)    801: Parsed ffff84920000-ffff849fd000 vma
    (00.060834)    801: Parsed ffff849fe000-ffff84a00000 vma
    (00.060835)    801: Parsed ffff849fe000-ffff84bde000 vma
    (00.060837)    801: Parsed ffff849fe000-ffff84bed000 vma
    (00.060838)    801: Parsed ffff849fe000-ffff84bfc000 vma
    (00.060840)    801: Parsed ffff849fe000-ffff84bfe000 vma
    (00.060841)    801: Parsed ffff849fe000-ffff84c10000 vma
    (00.060843)    801: Parsed ffff849fe000-ffff84c22000 vma
    (00.060844)    801: Parsed ffff849fe000-ffff84c32000 vma
    (00.060846)    801: Parsed ffff849fe000-ffff84c33000 vma
    (00.060847)    801: Parsed ffff849fe000-ffff84c34000 vma
    (00.060849)    801: Parsed ffff849fe000-ffff84c35000 vma
    (00.060850)    801: Parsed ffff84c36000-ffff84c37000 vma
    (00.060852)    801: Parsed ffff84c36000-ffff84c39000 vma
    (00.060853)    801: Parsed ffff84c36000-ffff84c3c000 vma
    (00.060854)    801: Parsed ffff84c36000-ffff84c67000 vma
    (00.060856)    801: Parsed ffff84c36000-ffff84c6f000 vma
    (00.060857)    801: Parsed ffff84c36000-ffff84c71000 vma
    (00.060862)    801: Parsed ffff84c36000-ffff84c73000 vma
    (00.060863)    801: Parsed ffff84c36000-ffff84c75000 vma
    (00.060865)    801: Parsed ffff84c36000-ffff84c76000 vma
    (00.060867)    801: Parsed ffff84c36000-ffff84c78000 vma
    (00.060868)    801: Parsed ffff84c36000-ffff84c7a000 vma
    (00.060870)    801: Parsed ffffd2f04000-ffffd2f25000 vma
    (00.060875)    801: 1 threads require 96K of memory
    (00.060877)    801: Found bootstrap VMA hint at: 0x10000 (needs ~108K)
    (00.060945)    801:     call mremap(0xffff849fe000, 8192, 8192, MAYMOVE | FIXED, 0x24000)
    (00.060953)    801:     call mremap(0xffff84c37000, 8192, 8192, MAYMOVE | FIXED, 0x26000)
    (00.060961)    801: Thread    0 stack  0x19080 rt_sigframe  0x21080
    (00.060977)    801: Going to chroot into /proc/self/fd/9
    (00.060981)    801: Restoring umask to 22
    (00.060995)    801: task_args: 0x23000
    task_args->pid: 801
    task_args->nr_threads: 1
    task_args->clone_restore_fn: 0x118a4
    task_args->thread_args: 0x23500
    (00.061008) pie: 801: Switched to the restorer 801
    (00.061011) pie: 801: vdso: Remap rt-vdso 0xffff84c75000 -> 0x2a000
    (00.061018) pie: 801: vdso: Remap rt-vvar 0xffff84c73000 -> 0x28000
    (00.061023) pie: 801: vdso: Using gettimeofday() on vdso at 0x2a558
    (00.061217) pie: 801: vdso: Using gettimeofday() on vdso at 0x2a558
    (00.061238) pie: 801:   mmap(0xaaaad9430000 -> 0xaaaad9435000, 0x7 0x12 3)
    (00.061243) pie: 801:   mmap(0xaaaad9445000 -> 0xaaaad9446000, 0x3 0x12 3)
    (00.061246) pie: 801:   mmap(0xaaaad9446000 -> 0xaaaad9447000, 0x3 0x12 3)
    (00.061316)    708: Error (criu/cr-restore.c:1480): 801 killed by signal 11: Segmentation fault
    (00.061353) Error (criu/cr-restore.c:2447): Restoring FAILED.
    (00.061591) Error (criu/cr-restore.c:1480): 708 killed by signal 9: Killed

Eventually, I would like to do docker checkpoint so I've tried the steps from inside the ubuntu container here after I've installed criu https://docs.docker.com/engine/reference/commandline/checkpoint/

  1. docker run --security-opt=seccomp:unconfined --name cr -d busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
  2. docker checkpoint create cr checkpoint1 but I got Error response from daemon: Cannot checkpoint container cr: runc did not terminate successfully: exit status 1: CRIU version check failed: exec: "criu": executable file not found in $PATH path= /var/run/desktop-containerd/daemon/io.containerd.runtime.v2.task/moby/c42152766e1b23cb28b6899de0eb074633158dc3368b6f1cccb5054edaaec3e5/criu-dump.log: unknown

so not sure, is it to do with the docker container or the fact I am running from macOS? Is there any official example how to run criu from a macOs through a docker container? None of the examples I followed actually work..

adrianreber commented 11 months ago

I don't really understand your setup. But CRIU is Linux only and unfortunately Ubuntu ships a broken version of CRIU. That will always fail.

Not sure about your docker problems. Sounds like CRIU is simply not installed.

tzvetkovg commented 11 months ago

is there any linux docker container with criu example that runs fine in macOS?

adrianreber commented 11 months ago

is there any linux docker container with criu example that runs fine in macOS?

I don't know. Never used macOS. But if you are looking for a Linux distribution with a working version of CRIU. Anything but Ubuntu.

znley commented 11 months ago

MacOS is not Linux, It seems that your run a ubuntu:22.04 container on macos. Maybe your need a real linux kernel.

github-actions[bot] commented 10 months ago

A friendly reminder that this issue had no activity for 30 days.

adrianreber commented 9 months ago

@tzvetkovg any news from your side? Can this be closed?

github-actions[bot] commented 8 months ago

A friendly reminder that this issue had no activity for 30 days.