[CRIU] crtools - TCP dumping within a network namespace

Dilip Daya dilip.daya at hp.com
Wed Apr 24 10:43:38 EDT 2013


Hi criu-developers:

I followed instructions from:
- http://criu.org/Simple_TCP_pair

If tcp-howto client is within a network namespace the crtools dump errors with
"Illegal instruction". Details below:


kernel: v3.9.0-rc8-next-20130424                             kernel v3.9.0-rc8
system #1
[netns0]<--------------------------------------------------->[system #2]
Within a network namespace

# ./tcp-howto 10.27.82.60 2345				# ./tcp-howto 2345
Connecting to 10.27.82.60:2345				Binding to port 2345
PP 1 -> 1						Waiting for connections
PP 2 -> 2						New connection
...
...
PP 31 -> 31
PP 32 -> 32
PP 33 -> 33
Illegal instruction  <<<----+
                            |
In another terminal within network namespace: netns0:
# crtools-src/crtools-HEAD-042313/crtools dump --link-remap --tree 3232 \
  --images-dir img-dir/ -v 4 -o dump.log --shell-job --tcp-established


=> Excerpt from img-dir/dump.log
...
(00.001994) Dumping opened files (pid: 3232)
(00.001996) ----------------------------------------
pie: Parasite cmd 12/0xc process
(00.002049) 3232 fdinfo 0: pos: 0xffffffffffffffff flags:           100002/0
(00.002056) tty: Dumping tty 49 with id 0x1
pie: Parasite cmd 14/0xe process
(00.002115) fdinfo: type: 0x b flags: 0100002/0 pos: 0xffffffffffffffff fd: 0
(00.002124) 3232 fdinfo 1: pos: 0xffffffffffffffff flags:           100002/0
(00.002127) fdinfo: type: 0x b flags: 0100002/0 pos: 0xffffffffffffffff fd: 1
(00.002133) 3232 fdinfo 2: pos: 0xffffffffffffffff flags:           100002/0
(00.002136) fdinfo: type: 0x b flags: 0100002/0 pos: 0xffffffffffffffff fd: 2
(00.002142) 3232 fdinfo 3: pos: 0xffffffffffffffff flags:                2/0
(00.002148)     Searching for socket 197c (family 16)
(00.002156) No filter for socket
(00.002167) fdinfo: type: 0x d flags: 02/0 pos: 0xffffffffffffffff fd: 3
(00.002174) 3232 fdinfo 4: pos: 0xffffffffffffffff flags:           100000/0
(00.002190) Dumping path for 4 fd via self 53 [net:[4026532312]]
(00.002196) Error (files-reg.c:345): BUG at files-reg.c:345

---

If non-network namespace environment this works:

# ./tcp-howto 10.27.82.60 2345
Connecting to 10.27.82.60:2345
PP 1 -> 1
PP 2 -> 2
...
...
PP 38 -> 38
PP 39 -> 39
Killed        <<<-------+
                        |
In another terminal:    |
# crtools-src/crtools-HEAD-042313/crtools dump --link-remap --tree 3109 \
  --images-dir img-dir/ -v 4 -o dump.log --shell-job --tcp-established
# crtools-src/crtools-HEAD-042313/crtools restore --link-remap --tree 3109 \
  --images-dir img-dir/ -v 4 -o rst.log --shell-job --tcp-established
PP 40 -> 40
PP 41 -> 41
PP 42 -> 42


---
# cat dump.log 
(00.000060) ========================================
(00.000100) Dumping processes (pid: 3232)
(00.000104) ========================================
(00.000164) Found anon-shmem piggie at 4
(00.000193) Error (kerndat.c:98): Dirty tracking support is OFF
(00.000290) cpu: fpu:1 fxsr:1 xsave:0
(00.000295) Writing image inventory (version 1)
(00.000349) Collected 1.pid namespace
(00.000357) Collected 2.net namespace
(00.000364) Collected 3.ipc namespace
(00.000371) Collected 4.uts namespace
(00.000378) Collected 5.mnt namespace
(00.000402) Collecting tasks starting from 3232
(00.000460) Seized task 3232, state 1
(00.000518) Collected 3232 in 1 state
(00.000571) Will take mnt namespace in the image
(00.000576) Collected 6.mnt namespace
(00.000579) Lock network
(00.000619) Collecting mountinfo
(00.000675) 	type unsupported source /dev/disk/by-uuid/71def8b5-6b25-4f6f-9b9b-26cb95e57e2a 800001 / @ / flags 200000 options errors=remount-ro,barrier=1,data=ordered,
(00.000684) 	type devtmpfs source udev 5 / @ /dev flags 200000 options size=10240k,nr_inodes=126999,mode=755,
(00.000692) 	type devpts source devpts a / @ /dev/pts flags 20000a options gid=5,mode=620,ptmxmode=000,
(00.000698) 	type tmpfs source tmpfs e / @ /run flags 20000a options size=102660k,mode=755,
(00.000703) 	type tmpfs source tmpfs f / @ /run/lock flags 20000e options size=5120k,
(00.000707) 	type tmpfs source tmpfs 10 / @ /run/shm flags 20000e options size=487120k,
(00.000712) 	type proc source proc 3 / @ /run/netns/netns0 flags 20000e options 
(00.000716) 	type proc source proc 3 / @ /proc flags 20000e options 
(00.000723) 	type unsupported source rpc_pipefs 11 / @ /var/lib/nfs/rpc_pipefs flags 200000 options 
(00.000728) 	type sysfs source netns0 12 / @ /sys flags 200000 options 
(00.000844) 	Collected: ino 0x    1400 family    2 type    1 port    45383 state  1 src_addr 10.100.100.166
(00.000912) Collect netlink sock 0x1ed4
(00.000916) Collect netlink sock 0x1edc
(00.000918) Collect netlink sock 0x7e4
(00.000920) Collect netlink sock 0x1ed7
(00.000922) Collect netlink sock 0x1ed5
(00.000923) Collect netlink sock 0x1ed6
(00.000931) Uncollected sockets! Will probably fail later.
(00.001253) ========================================
(00.001255) Dumping task (pid: 3232)
(00.001257) ========================================
(00.001263) Obtaining task stat ... (00.001286) 
(00.001289) Collecting mappings (pid: 3232)
(00.001291) ----------------------------------------
(00.001519) Collected, longest ares 512 bytes
(00.001525) 0x400000-0x402000 (8K) prot 0x5 flags 0x2 off 0 reg fp  shmid: 0
(00.001530) 0x601000-0x602000 (4K) prot 0x3 flags 0x2 off 0x1000 reg fp  shmid: 0
(00.001532) 0x7f3d35ae0000-0x7f3d35c60000 (1536K) prot 0x5 flags 0x2 off 0 reg fp  shmid: 0
(00.001534) 0x7f3d35c60000-0x7f3d35e60000 (2048K) prot 0 flags 0x2 off 0x180000 reg fp  shmid: 0
(00.001537) 0x7f3d35e60000-0x7f3d35e64000 (16K) prot 0x1 flags 0x2 off 0x180000 reg fp  shmid: 0
(00.001539) 0x7f3d35e64000-0x7f3d35e65000 (4K) prot 0x3 flags 0x2 off 0x184000 reg fp  shmid: 0
(00.001541) 0x7f3d35e65000-0x7f3d35e6a000 (20K) prot 0x3 flags 0x22 off 0 reg ap  shmid: 0
(00.001544) 0x7f3d35e6a000-0x7f3d35e8a000 (128K) prot 0x5 flags 0x2 off 0 reg fp  shmid: 0
(00.001546) 0x7f3d3607e000-0x7f3d36081000 (12K) prot 0x3 flags 0x22 off 0 reg ap  shmid: 0
(00.001548) 0x7f3d36086000-0x7f3d36089000 (12K) prot 0x3 flags 0x22 off 0 reg ap  shmid: 0
(00.001550) 0x7f3d36089000-0x7f3d3608a000 (4K) prot 0x1 flags 0x2 off 0x1f000 reg fp  shmid: 0
(00.001552) 0x7f3d3608a000-0x7f3d3608b000 (4K) prot 0x3 flags 0x2 off 0x20000 reg fp  shmid: 0
(00.001554) 0x7f3d3608b000-0x7f3d3608c000 (4K) prot 0x3 flags 0x22 off 0 reg ap  shmid: 0
(00.001556) 0x7fffaacaa000-0x7fffaaccb000 (132K) prot 0x3 flags 0x122 off 0 reg ap  shmid: 0
(00.001559) 0x7fffaad7e000-0x7fffaad7f000 (4K) prot 0x5 flags 0x22 off 0 reg vdso ap  shmid: 0
(00.001561) 0xffffffffff600000-0xffffffffff601000 (4K) prot 0x5 flags 0x22 off 0 vsys ap  shmid: 0
(00.001563) ----------------------------------------
(00.001565) 
(00.001566) Collecting fds (pid: 3232)
(00.001568) ----------------------------------------
(00.001594) Found 6 file descriptors
(00.001598) ----------------------------------------
(00.001676) Putting parasite blob into 0x7f529243a000->0x7f3d36076000
(00.001708) Putting tsock into pid 3232
pie: Parasite cmd 9/0x9 process
(00.001778) sid=3013 pgid=3232 pid=3232
(00.001990) 
(00.001994) Dumping opened files (pid: 3232)
(00.001996) ----------------------------------------
pie: Parasite cmd 12/0xc process
(00.002049) 3232 fdinfo 0: pos: 0xffffffffffffffff flags:           100002/0
(00.002056) tty: Dumping tty 49 with id 0x1
pie: Parasite cmd 14/0xe process
(00.002115) fdinfo: type: 0x b flags: 0100002/0 pos: 0xffffffffffffffff fd: 0
(00.002124) 3232 fdinfo 1: pos: 0xffffffffffffffff flags:           100002/0
(00.002127) fdinfo: type: 0x b flags: 0100002/0 pos: 0xffffffffffffffff fd: 1
(00.002133) 3232 fdinfo 2: pos: 0xffffffffffffffff flags:           100002/0
(00.002136) fdinfo: type: 0x b flags: 0100002/0 pos: 0xffffffffffffffff fd: 2
(00.002142) 3232 fdinfo 3: pos: 0xffffffffffffffff flags:                2/0
(00.002148) 	Searching for socket 197c (family 16)
(00.002156) No filter for socket
(00.002167) fdinfo: type: 0x d flags: 02/0 pos: 0xffffffffffffffff fd: 3
(00.002174) 3232 fdinfo 4: pos: 0xffffffffffffffff flags:           100000/0
(00.002190) Dumping path for 4 fd via self 53 [net:[4026532312]]
(00.002196) Error (files-reg.c:345): BUG at files-reg.c:345
---


Thanks.
-- 
-DilipD.



More information about the CRIU mailing list