[CRIU] problem restoring TUN

Andrei Vagin avagin at gmail.com
Mon Oct 7 20:08:03 MSK 2019


On Wed, Sep 25, 2019 at 09:32:51PM +0000, Chenji, Harshavardhan wrote:
> 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

criu was trying to dump a tun file descriptor, but failed to find its
tun device. Could you attach a whole dump.log and output for "ip a" from
the container?

> 
> 
> 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) ----------------------------------------
> 
> 
> 
> 
> 
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list