Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault when restore #1892

Closed
mrc1119 opened this issue May 17, 2022 · 2 comments
Closed

Segmentation fault when restore #1892

mrc1119 opened this issue May 17, 2022 · 2 comments

Comments

@mrc1119
Copy link

mrc1119 commented May 17, 2022

Description
criu version: 3.15
OS: CentOS Linux release 7.1.1503 (Core)
kernel: Linux 5.12.4-1.el7.elrepo.x86_64 #1 SMP Fri May 14 06:36:46 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce the issue:
1.dump: ./criu dump --ghost-limit=500M -D /export/sine/dumpdata -j -R -t $pid --tcp-close --skip-in-flight --external mnt[/etc/hosts]:hostsmount --external mnt[/etc/hostname]:hostnamemount --external mnt[/etc/resolv.conf]:reslovemount --external mnt[/var/log/mydb]:mydbmount -v4 -o /export/sine/sinedump.log

2.restore: ./criu restore --ghost-limit=500M -D /export/sine/dumpdata -j -d --tcp-close --root /export/Data/docker/vfs/dir/${containerid} --external mnt[hostsmount]:/etc/hosts --external mnt[hostnamemount]:/etc/hostname --external mnt[reslovemount]:/etc/resolv.conf --external mnt[mydbmount]:/var/log/mydb -v4 -o /export/sine/restore.log

3.There is an error
(03.820187) pie: 1: vdso: image [vdso] 0x7ffe5c5e5000-0x7ffe5c5e7000 [vvar] 0xffffffffffffffff-0xffffffffffffffff
(46.650041) Error (criu/cr-restore.c:1567): 547 killed by signal 11: Segmentation fault
(46.650083) Warn (criu/cr-restore.c:2480): Unable to wait 547: No child processes
(46.650302) mnt: Switching to new ns to clean ghosts
(46.650563) Error (criu/cr-restore.c:2494): Restoring FAILED.

Describe the results you expected:
I have been successful in restoring on other kernel versions, such as 3.10 and 4.18.

Output of `criu check --all`:

Error (criu/util.c:631): exited, status=3 Warn (criu/kerndat.c:877): Can't keep kdat cache on non-tempfs Warn (criu/cr-check.c:850): Dirty tracking is OFF. Memory snapshot will not work. Looks good but some kernel features are missing which, depending on your process tree, may cause dump or restore failure.

I hope I can get your help.

@mrc1119
Copy link
Author

mrc1119 commented May 17, 2022

This problem was fixed when I updated to version 3.17

@mrc1119 mrc1119 closed this as completed May 17, 2022
@rafaelgieschke
Copy link

For other people with the same problem (using older CRIU versions): this was caused by "%zu" in

pr_info("[%zu]`%s` offset differs: %lx != %lx (rt)\n", i, sym_name, sym_offset, rt_sym_offset);
and was fixed in c39ed51 and b28eb7b for CRIU >= 3.16. If you want to continue using CRIU 3.15, you can sed -i 's/%zu/%zd/' criu/pie/parasite-vdso.c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants