[CRIU] problem restoring TUN

Chenji, Harshavardhan chenji at ohio.edu
Thu Sep 26 00:32:51 MSK 2019


Hi all,

Using criu 3.13 via docker 19.03 and containerd/runc. When I try to 
restore a container with a TUN interface (created within the container, 
not passed via docker's --device), I get an error. How should I debug 
this? Any help is greatly appreciated.

In restore.log:

(00.313337)     19: Error (criu/tun.c:391): tun: No tun device for file 
pgwtun
(00.313347)     19: Error (criu/files.c:1196): Unable to open fd=16 id=0x51
(00.313653)      1: Error (criu/cr-restore.c:1454): 19 exited, status=1


Using crit x (0x51 is 81 in dec):

        {
             "type": "REG",
             "id": 81,
             "reg": {
                 "id": 81,
                 "flags": "O_RDWR | O_LARGEFILE | 0x800",
                 "pos": 48,
                 "fown": {
                     "uid": 0,
                     "euid": 0,
                     "signum": 0,
                     "pid_type": 0,
                     "pid": 0
                 },
                 "name": "/dev/net/tun",
                 "mnt_id": 416,
                 "mode": 8630
             }
         },
         {
             "type": "TUNF",
             "id": 81,
             "tunf": {
                 "id": 81,
                 "netdev": "pgwtun",
                 "ns_id": 9
             }
         }

The corresponding log during the dumping process:

(06.802221) inet: Dumping inet socket at 15
(06.802222) inet:       Dumping: ino   0x4740 family AF_INET    type 
SOCK_DGRAM     port     2152 state TCP_CLOSE        src_addr 172.22.11.5
(06.802225) inet:       Dumped: family AF_INET    type SOCK_DGRAM 
proto IPPROTO_UDP      port 2152 state 0                src_addr 172.22.11.5
(06.802236) 1610 fdinfo 16: pos:             0x30 flags:           104002/0
(06.802249) Dumping path for 16 fd via self 30 [/dev/net/tun]
(06.802254) tun: Dumping tun-file 30 with id 0x51
(06.802257) tun: `- attached to device pgwtun (flags 1801)
(06.802267) ----------------------------------------








More information about the CRIU mailing list