genuinetools/img

"img unpack" hangs if -o is used with relative path

jdwx opened this issue · 1 comments

jdwx commented

This was (probably) mentioned in issue #201 but seems like a separate issue.

These commands work:

$ cd /tmp; img unpack image:tag
$ img unpack -o /tmp/rootfs image:tag

The commands hang indefinitely:

$ cd /tmp; img unpack -o rootfs image:tag
$ cd /tmp; img unpack -o ./rootfs image:tag

Example output from debug:

$ ~/img unpack -d -o rootfs jdwx/alpine
DEBU[0000] checking runc                                 disableEmbeddedRunc=false state=/home/jdwx/.local/share/img
DEBU[0000] runc found                                    commit=56aca5aa50d07548d5db8fd33e9dc562f70f3208 spec=1.0.2 version=1.0.0-rc10+dev
DEBU[0000] checking runc                                 disableEmbeddedRunc=false state=/home/jdwx/.local/share/img
DEBU[0000] runc found                                    commit=56aca5aa50d07548d5db8fd33e9dc562f70f3208 spec=1.0.2 version=1.0.0-rc10+dev
DEBU[0000] using backend: overlayfs
WARN[0000] using host network as the default
DEBU[0000] Unpacking layer sha256:596ba82af5aaa3e2fd9d6f955b8b94f0744a2b60710e3c243ba3e4a467f051d1

Running "top" shows both img and runc spinning with 100% CPU usage.

The existing tests appear only to cover absolute paths because that's what ioutil.TempDir() returns.

I can verify this on latest Debian 10 (AMD64).