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

temporary directory littering #2351

Open
benibela opened this issue Feb 15, 2024 · 6 comments
Open

temporary directory littering #2351

benibela opened this issue Feb 15, 2024 · 6 comments

Comments

@benibela
Copy link

Description

Steps to reproduce the issue:
When many duḿps failed in #2348, it created a bunch of empty directories

Describe the results you received:

drwx------ 2 root   root   4096 Feb 12 23:48 .criu.temp-aa-policy.8uhTbO
drwx------ 2 root   root   4096 Feb 12 23:51 .criu.temp-aa-policy.90Vqt9
drwx------ 2 root   root   4096 Feb 12 23:29 .criu.temp-aa-policy.9an3IS
drwx------ 2 root   root   4096 Feb 12 23:51 .criu.temp-aa-policy.CBz1ud
drwx------ 2 root   root   4096 Feb 12 23:39 .criu.temp-aa-policy.eA0Kj6
drwx------ 2 root   root   4096 Feb 12 23:34 .criu.temp-aa-policy.GD04gM
drwx------ 2 root   root   4096 Feb 12 23:38 .criu.temp-aa-policy.ItnOKf
drwx------ 2 root   root   4096 Feb 12 23:57 .criu.temp-aa-policy.NuRSjL
drwx------ 2 root   root   4096 Feb 12 23:57 .criu.temp-aa-policy.nUX8Kq
drwx------ 2 root   root   4096 Feb 12 23:36 .criu.temp-aa-policy.PGi24L
drwx------ 2 root   root   4096 Feb 12 23:35 .criu.temp-aa-policy.QNuwGp
drwx------ 2 root   root   4096 Feb 12 23:28 .criu.temp-aa-policy.RyvBPt
drwx------ 2 root   root   4096 Feb 12 23:41 .criu.temp-aa-policy.TXQpQv
drwx------ 2 root   root   4096 Feb 12 23:41 .criu.temp-aa-policy.URYvi0
drwx------ 2 root   root   4096 Feb 12 23:34 .criu.temp-aa-policy.VJixh8
drwx------ 2 root   root   4096 Feb 12 23:48 .criu.temp-aa-policy.whT8gi

Describe the results you expected:

delete the directories after aborting

@AbhinavMir
Copy link

I tried to reproduce this on Damn Small Linux (with qemu-system-x86_64 -drive file=dsl-2024.alpha.iso,index=0,media=cdrom -drive file=fake_external_hdd.qcow2,index=1,media=disk -m 2048 -boot d) and then when I had some local problems, I tried to do this on an alpine linux, but ended up having trouble when building from source while running make.

In function '__conv_val',
    inlined from 'std_strtoul' at compel/plugins/std/string.c:212:7:
compel/plugins/std/string.c:164:24: error: array subscript 97 is above array bounds of 'const char[37]' [-Werror=array-bounds=]
  164 |                 return &conv_tab[__tolower(c)] - conv_tab;
      |                        ^~~~~~~~~~~~~~~~~~~~~~~
compel/plugins/std/string.c: In function 'std_strtoul':
compel/plugins/std/string.c:10:19: note: while referencing 'conv_tab'
   10 | static const char conv_tab[] = "0123456789abcdefghijklmnopqrstuvwxyz";
      |                   ^~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [/var/tmp/criu/scripts/nmk/scripts/build.mk:209: compel/plugins/std/string.o] Error 1
make: *** [Makefile.compel:51: compel/plugins/std.lib.a] Error 2

Thought I'd bring this up. Not sure if this deserves an issue.

@Snorch
Copy link
Member

Snorch commented Feb 26, 2024

@AbhinavMir #1725 (comment) you should build from latest criu-dev branch to fix this.

@YarBor
Copy link

YarBor commented Feb 26, 2024

From the description in issue #2348, I don't know how to reproduce the issue, but I have some ideas to deal with this behavior, let me try it out.
By the way, how can I reproduce this problem (please give me some hints) to verify my idea?

YarBor pushed a commit to YarBor/criu that referenced this issue Feb 26, 2024
When many duḿps failed in checkpoint-restore#2348, it created a bunch of empty directories

```txt
drwx------ 2 root   root   4096 Feb 12 23:48 .criu.temp-aa-policy.8uhTbO
drwx------ 2 root   root   4096 Feb 12 23:51 .criu.temp-aa-policy.90Vqt9
drwx------ 2 root   root   4096 Feb 12 23:29 .criu.temp-aa-policy.9an3IS
drwx------ 2 root   root   4096 Feb 12 23:51 .criu.temp-aa-policy.CBz1ud
drwx------ 2 root   root   4096 Feb 12 23:39 .criu.temp-aa-policy.eA0Kj6
drwx------ 2 root   root   4096 Feb 12 23:34 .criu.temp-aa-policy.GD04gM
drwx------ 2 root   root   4096 Feb 12 23:38 .criu.temp-aa-policy.ItnOKf
drwx------ 2 root   root   4096 Feb 12 23:57 .criu.temp-aa-policy.NuRSjL
drwx------ 2 root   root   4096 Feb 12 23:57 .criu.temp-aa-policy.nUX8Kq
drwx------ 2 root   root   4096 Feb 12 23:36 .criu.temp-aa-policy.PGi24L
drwx------ 2 root   root   4096 Feb 12 23:35 .criu.temp-aa-policy.QNuwGp
drwx------ 2 root   root   4096 Feb 12 23:28 .criu.temp-aa-policy.RyvBPt
drwx------ 2 root   root   4096 Feb 12 23:41 .criu.temp-aa-policy.TXQpQv
drwx------ 2 root   root   4096 Feb 12 23:41 .criu.temp-aa-policy.URYvi0
drwx------ 2 root   root   4096 Feb 12 23:34 .criu.temp-aa-policy.VJixh8
drwx------ 2 root   root   4096 Feb 12 23:48 .criu.temp-aa-policy.whT8gi
```
delete the directories after aborting

Signed-off-by: YarBor <yarbor.ww@gmail.com>
@YarBor
Copy link

YarBor commented Feb 26, 2024

maybe i get it

@AbhinavMir
Copy link

Hi @YarBor - I was working on this issue and don't think two people need to work on this. However, if you have a solution ready, please let me know. Thanks!

@Snorch @benibela When dumping a simple while loop from Python on my external disk, I get the following:

.                            inventory.img
..                           mm-52517.img
core-52517.img               pagemap-52517.img
.criu.temp-aa-policy.cxQVTS  pages-1.img
.criu.temp-aa-policy.y3NFp7  pstree.img
fdinfo-2.img                 seccomp.img
files.img                    stats-dump
fs-52517.img                 timens-0.img
ids-52517.img                tty-info.img

Out of this, two files are temporary. When looking through the logs (-v4) I couldn't find the generation log, or deletion log (via rmrf). Just trying to figure out if I'm doing this right. Thank you for your time!

Copy link

A friendly reminder that this issue had no activity for 30 days.

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

Successfully merging a pull request may close this issue.

4 participants