Skip to content

vm/{adb,isolated}: fail to clean up temp files #2831

Open
@dvyukov

Description

@dvyukov

vm/adb does "rm -Rf /data/syzkaller*" between reboots:

if _, err := inst.adb("shell", "rm -Rf /data/syzkaller*"); err != nil {

because devices are not re-imaged between crashes (removing files at least frees up some space).

rm can't remove everything and it started failing recently after cgroup changes:

2021/10/18 12:20:27 failed to create instance: failed to run ["adb" "-s" "localhost:34369" 
rm: /data/syzkaller-testdir107020063/syzkaller.kw5FVG/233/cgroup: No such file or directory
rm: 233: Directory not empty

#2827 fixes this by unlinking symlinks.
But we need to do this for other VM impls (not really specific to adb) and use the more comprehensive executor remove_dir logic:

static void remove_dir(const char* dir)

I think we need remove these dirs as part of executor "setup" invocation (it runs exactly once after boot). We probably need a separate setup verb ("purge") because some tools (syz-execprog?) may not need this on every invocation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions