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

"Can't dump file 12 of that type" upon dumping a simple test.sh #1112

Closed
Hi-Angel opened this issue Jun 21, 2020 · 9 comments
Closed

"Can't dump file 12 of that type" upon dumping a simple test.sh #1112

Hi-Angel opened this issue Jun 21, 2020 · 9 comments

Comments

@Hi-Angel
Copy link

I'm following this tutorial, and the dumping step fails for me. Error in description is the first one I see.

Steps to reproduce

$ cat test.sh
#!/bin/sh
while :; do
    sleep 1
    date
done
$ setsid ./test.sh < /dev/null &> test.log &
$ ls
dump.log  fdinfo-2.img  files.img  ids-425213.img  seccomp.img  test.log  test.sh
$ sudo criu dump -t $(pgrep test.sh) -v4 -o dump.log && echo OK

Expected

A print "OK"

Actual

Nothing printed

Additional information

  • Crio version is 3.14
  • log is attached: dump.log
@adrianreber
Copy link
Member

Can you try on a non-btrfs based system: https://criu.org/Filesystems_pecularities

@Hi-Angel
Copy link
Author

Can you try on a non-btrfs based system: https://criu.org/Filesystems_pecularities

Hmm… Okay, though I'm unsure on one detail. I reproduce it in /tmp/foo dir, and per this output:

$ mount | grep /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)

I do it on tmpfs, not on btrfs. Do I need to completely exclude btrfs from mount points? If so, that would be problematic as both computers I have have use it as their root filesystem.

@rppt
Copy link
Member

rppt commented Jun 21, 2020

The log says that criu had troubles with a chardev:

(00.005326) Error (criu/files-ext.c:95): Can't dump file 12 of that type [20660] (chr 226:0)

Can you check what is this device?

@Hi-Angel
Copy link
Author

The log says that criu had troubles with a chardev:

(00.005326) Error (criu/files-ext.c:95): Can't dump file 12 of that type [20660] (chr 226:0)

Can you check what is this device?

It is drm.

$ grep 226 /proc/devices                                                                                           
226 drm

If that matters, I have two GPUs, Intel and AMD.

@rppt
Copy link
Member

rppt commented Jun 21, 2020

criu cannot handle open /dev/drm.
I don't know why bash has it open though...

@Hi-Angel
Copy link
Author

criu cannot handle open /dev/drm.

Oh, this is sad. I was mainly interested in criu to save state of a wine game. Oh, well…

I don't know why bash has it open though...

@rppt
Copy link
Member

rppt commented Jun 21, 2020

criu cannot handle open /dev/drm.

Oh, this is sad. I was mainly interested in criu to save state of a wine game. Oh, well…

Yeah, it is. This topic returns from time to time (eg #384, #436), but there is no solution for checkpointing the state of a GPU device.

@Hi-Angel
Copy link
Author

I don't know why bash has it open though...

Btw, I confirm that running the test.sh and looking through file descriptors there's /dev/dri/card0 for some reason is opened:

$ ll /proc/$(pgrep test.sh)/fd         
total 0
lrwx------ 1 constantine constantine 64 июн 21 12:39 0 -> /dev/pts/4
lrwx------ 1 constantine constantine 64 июн 21 12:39 1 -> /dev/pts/4
lrwx------ 1 constantine constantine 64 июн 21 12:39 12 -> /dev/dri/card0
lrwx------ 1 constantine constantine 64 июн 21 12:39 2 -> /dev/pts/4
lr-x------ 1 constantine constantine 64 июн 21 12:39 255 -> /tmp/test.sh

Indeed this is odd.

criu cannot handle open /dev/drm.

Oh, this is sad. I was mainly interested in criu to save state of a wine game. Oh, well…

Yeah, it is. This topic returns from time to time (eg #384, #436), but there is no solution for checkpointing the state of a GPU device.

Thanks!

@Hi-Angel
Copy link
Author

Okay, so I figured the /dev/dri/card0 being opened is inherited from Konsole application. If I look through /proc/self/fd in gnome-terminal, I do not see this device opened.

Okay, so, since it all comes down to a DRM device being opened, and there already are issues for this, current one would be a duplicate, so I'm closing it

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

3 participants