second-state / runw

18 stars 3 forks source link

runw run repeat failed #19

Open yang1992 opened 3 years ago

yang1992 commented 3 years ago

hello dir only contains running wasm: wasi_example_main.wasm (provided by runw project wiki) operate step: 1 ./runw --systemd-cgroup create --bundle=hello --pid-file=pid.txt test first result is running successfully, print necessary messages like this: image

2 ./runw delete test && rm pid.txt 3 repeat execute cmd as step 1: ./runw --systemd-cgroup create --bundle=hello --pid-file=pid.txt test second result is running failed

but when I change test -> test1 and pid.txt -> pid1.txt, it can work sucessfully, such as: ./runw --systemd-cgroup create --bundle=hello --pid-file=pid1.txt test1

when run repeated, I wonder if any resources can not be free my test env is in docker container, restart container, then it can first run sucessfully

hydai commented 3 years ago

Seems like some resources can not be free. We will figure out what’s wrong in this situation. Could you provide the bundle/config.json so I can have exactly the same environment to reproduce this error and trace?

yang1992 commented 3 years ago

Seems like some resources can not be free. We will figure out what’s wrong in this situation. Could you provide the bundle/config.json so I can have exactly the same environment to reproduce this error and trace? { "ociVersion":"1.0.2-dev", "process":{ "user":{ "uid":0, "gid":0, "additionalGids":[ 1, 2, 3, 4, 6, 10, 11, 20, 26, 27 ] }, "args":[ "target/wasm32-wasi/debug/hello.wasm" ], "capabilities":{ "bounding":[ "CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_DAC_READ_SEARCH", "CAP_FOWNER", "CAP_FSETID", "CAP_KILL", "CAP_SETGID", "CAP_SETUID", "CAP_SETPCAP", "CAP_LINUX_IMMUTABLE", "CAP_NET_BIND_SERVICE", "CAP_NET_BROADCAST", "CAP_NET_ADMIN", "CAP_NET_RAW", "CAP_IPC_LOCK", "CAP_IPC_OWNER", "CAP_SYS_MODULE", "CAP_SYS_RAWIO", "CAP_SYS_CHROOT", "CAP_SYS_PTRACE", "CAP_SYS_PACCT", "CAP_SYS_ADMIN", "CAP_SYS_BOOT", "CAP_SYS_NICE", "CAP_SYS_RESOURCE", "CAP_SYS_TIME", "CAP_SYS_TTY_CONFIG", "CAP_MKNOD", "CAP_LEASE", "CAP_AUDIT_WRITE", "CAP_AUDIT_CONTROL", "CAP_SETFCAP", "CAP_MAC_OVERRIDE", "CAP_MAC_ADMIN", "CAP_SYSLOG", "CAP_WAKE_ALARM", "CAP_BLOCK_SUSPEND", "CAP_AUDIT_READ" ], "effective":[ "CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_DAC_READ_SEARCH", "CAP_FOWNER", "CAP_FSETID", "CAP_KILL", "CAP_SETGID", "CAP_SETUID", "CAP_SETPCAP", "CAP_LINUX_IMMUTABLE", "CAP_NET_BIND_SERVICE", "CAP_NET_BROADCAST", "CAP_NET_ADMIN", "CAP_NET_RAW", "CAP_IPC_LOCK", "CAP_IPC_OWNER", "CAP_SYS_MODULE", "CAP_SYS_RAWIO", "CAP_SYS_CHROOT", "CAP_SYS_PTRACE", "CAP_SYS_PACCT", "CAP_SYS_ADMIN", "CAP_SYS_BOOT", "CAP_SYS_NICE", "CAP_SYS_RESOURCE", "CAP_SYS_TIME", "CAP_SYS_TTY_CONFIG", "CAP_MKNOD", "CAP_LEASE", "CAP_AUDIT_WRITE", "CAP_AUDIT_CONTROL", "CAP_SETFCAP", "CAP_MAC_OVERRIDE", "CAP_MAC_ADMIN", "CAP_SYSLOG", "CAP_WAKE_ALARM", "CAP_BLOCK_SUSPEND", "CAP_AUDIT_READ" ], "inheritable":[ "CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_DAC_READ_SEARCH", "CAP_FOWNER", "CAP_FSETID", "CAP_KILL", "CAP_SETGID", "CAP_SETUID", "CAP_SETPCAP", "CAP_LINUX_IMMUTABLE", "CAP_NET_BIND_SERVICE", "CAP_NET_BROADCAST", "CAP_NET_ADMIN", "CAP_NET_RAW", "CAP_IPC_LOCK", "CAP_IPC_OWNER", "CAP_SYS_MODULE", "CAP_SYS_RAWIO", "CAP_SYS_CHROOT", "CAP_SYS_PTRACE", "CAP_SYS_PACCT", "CAP_SYS_ADMIN", "CAP_SYS_BOOT", "CAP_SYS_NICE", "CAP_SYS_RESOURCE", "CAP_SYS_TIME", "CAP_SYS_TTY_CONFIG", "CAP_MKNOD", "CAP_LEASE", "CAP_AUDIT_WRITE", "CAP_AUDIT_CONTROL", "CAP_SETFCAP", "CAP_MAC_OVERRIDE", "CAP_MAC_ADMIN", "CAP_SYSLOG", "CAP_WAKE_ALARM", "CAP_BLOCK_SUSPEND", "CAP_AUDIT_READ" ], "permitted":[ "CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_DAC_READ_SEARCH", "CAP_FOWNER", "CAP_FSETID", "CAP_KILL", "CAP_SETGID", "CAP_SETUID", "CAP_SETPCAP", "CAP_LINUX_IMMUTABLE", "CAP_NET_BIND_SERVICE", "CAP_NET_BROADCAST", "CAP_NET_ADMIN", "CAP_NET_RAW", "CAP_IPC_LOCK", "CAP_IPC_OWNER", "CAP_SYS_MODULE", "CAP_SYS_RAWIO", "CAP_SYS_CHROOT", "CAP_SYS_PTRACE", "CAP_SYS_PACCT", "CAP_SYS_ADMIN", "CAP_SYS_BOOT", "CAP_SYS_NICE", "CAP_SYS_RESOURCE", "CAP_SYS_TIME", "CAP_SYS_TTY_CONFIG", "CAP_MKNOD", "CAP_LEASE", "CAP_AUDIT_WRITE", "CAP_AUDIT_CONTROL", "CAP_SETFCAP", "CAP_MAC_OVERRIDE", "CAP_MAC_ADMIN", "CAP_SYSLOG", "CAP_WAKE_ALARM", "CAP_BLOCK_SUSPEND", "CAP_AUDIT_READ" ] }, "rlimits":[ { "type":"RLIMIT_NOFILE", "hard":1024, "soft":1024 } ], "noNewPrivileges":true }, "root":{ "path":"hello" }, "mounts":[ { "destination":"/proc", "type":"proc", "source":"proc", "options":[ "nosuid", "noexec", "nodev" ] }, { "destination":"/dev", "type":"tmpfs", "source":"tmpfs", "options":[ "nosuid", "strictatime", "mode=755", "size=65536k" ] }, { "destination":"/dev/pts", "type":"devpts", "source":"devpts", "options":[ "nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620", "gid=5" ] }, { "destination":"/dev/shm", "type":"tmpfs", "source":"shm", "options":[ "nosuid", "noexec", "nodev", "mode=1777", "size=65536k" ] }, { "destination":"/dev/mqueue", "type":"mqueue", "source":"mqueue", "options":[ "nosuid", "noexec", "nodev" ] }, { "destination":"/sys", "type":"sysfs", "source":"sysfs", "options":[ "nosuid", "noexec", "nodev", "ro" ] }, { "destination":"/run", "type":"tmpfs", "source":"tmpfs", "options":[ "nosuid", "strictatime", "mode=755", "size=65536k" ] }, { "destination":"/etc/hosts", "type":"bind", "source":"/etc/hosts", "options":[ "rbind", "ro" ] }, { "destination": "/etc/localtime", "type": "bind", "source": "/etc/localtime", "options": [ "rbind", "ro" ] } ], "linux":{ "resources":{ "devices":[ { "allow":false, "access":"rwm" } ] }, "namespaces":[ { "type":"pid" }, { "type":"ipc" }, { "type":"uts" }, { "type":"mount" }, { "type":"network" } ], "maskedPaths":[ "/proc/acpi", "/proc/asound", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/sys/firmware", "/proc/scsi" ], "readonlyPaths":[ "/proc/fs", "/proc/irq", "/proc/sysrq-trigger" ] }, "annotations": { "org.wasmedge.exec.allow_commands": ["http_proxy"] } }