-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Failed to write to log, invalid argument #233
Comments
I think this is a PATH problem within the container. There is a good chance you would not see this on the new release, v0.9.0 (mind reporting back if the latest release works for you)? |
I just tested the latest release, but it fails. There is an additional error message: # docker run --rm -v //var/run/docker.sock://var/run/docker.sock wagoodman/dive ghdl/run:buster-gcc
Image Source: docker://ghdl/run:buster-gcc
Fetching image... (this can take a while for large images)
Analyzing image...
Building cache...
Failed to write to log, invalid argument
open /dev/tty: no such device or address |
Upon further testing, On MSYS2, using # docker run --rm -tv //var/run/docker.sock://var/run/docker.sock wagoodman/dive ghdl/run:buster-gcc
Image Source: docker://ghdl/run:buster-gcc
Fetching image... (this can take a while for large images)
Analyzing image...
Building cache...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x13036b2]
goroutine 28 [running]:
github.com/jroimartin/gocui.(*View).Clear(...)
/home/wagoodman/go/pkg/mod/github.com/jroimartin/[email protected]/view.go:392
github.com/wagoodman/dive/runtime/ui/view.(*FileTree).Render.func1(0xc0000dd170, 0xc000241ac8, 0x2)
/home/wagoodman/github/dive/runtime/ui/view/filetree.go:373 +0x42
github.com/jroimartin/gocui.(*Gui).MainLoop(0xc0000dd170, 0xc0003ddc70, 0xc000adfc20)
/home/wagoodman/go/pkg/mod/github.com/jroimartin/[email protected]/gui.go:377 +0x2d9
github.com/wagoodman/dive/runtime/ui.Run(0xc0003ddc70, 0xc000adfc20, 0x4, 0x4, 0xc000355c20, 0x0, 0x0)
/home/wagoodman/github/dive/runtime/ui/app.go:135 +0x10f
github.com/wagoodman/dive/runtime.run(0x23be501, 0x0, 0x7ffe4acb6f62, 0x13, 0x1, 0x0, 0x0, 0xc000108f00, 0x0, 0x0, ...)
/home/wagoodman/github/dive/runtime/run.go:105 +0x8e4
created by github.com/wagoodman/dive/runtime.Run
/home/wagoodman/github/dive/runtime/run.go:127 +0x118
# winpty docker run --rm -tv //var/run/docker.sock://var/run/docker.sock wagoodman/dive ghdl/run:buster-gcc
Image Source: docker://ghdl/run:buster-gcc
Fetching image... (this can take a while for large images)
... |
FTR, when used in CI mode, # docker run --rm -e CI=true -v //var/run/docker.sock://var/run/docker.sock wagoodman/dive ghdl/run:buster-gcc
Using default CI config
Image Source: docker://ghdl/run:buster-gcc
Fetching image... (this can take a while for large images)
Analyzing image...
efficiency: 99.6966 %
wastedBytes: 903570 bytes (904 kB)
userWastedPercent: 0.5500 %
Inefficient Files:
Count Wasted Space File Path
4 374 kB /var/lib/dpkg/status-old
4 374 kB /var/lib/dpkg/status
3 41 kB /var/log/dpkg.log
3 27 kB /etc/ld.so.cache
4 25 kB /var/log/apt/eipp.log.xz
4 24 kB /var/lib/apt/extended_states
3 22 kB /var/log/apt/term.log
2 12 kB /var/cache/ldconfig/aux-cache
3 4.2 kB /var/log/apt/history.log
4 0 B /var/lib/dpkg/triggers/Lock
4 0 B /var/lib/dpkg/lock
Results:
PASS: highestUserWastedPercent
SKIP: highestWastedBytes: rule disabled
PASS: lowestEfficiency
Result:PASS [Total:3] [Passed:2] [Failed:0] [Warn:0] [Skipped:1] |
Executing dive 0.9.0 on Windows 10 in CMD:
Same in cygwin:
Using 0.8.1 is working in the CMD. But in cygwin I just get:
|
+1, facing the same problem on MacOS installed via Homebrew:
But it works fine with |
It seems that there are two problems here:
Both fixes will make it into the next release. |
Thanks @wagoodman! I posted two different variants of the first error:
The first one is because there is no tty and dive does require it (unless in CI mode). Hence, I would suggest to add a message/note when this error is handled and dive is being executed inside a container. I believe I have some golang function to detect this latter condition, but I don't know where is the error reported in the codebase. The message would suggest users to use The second type of error might be trickier. Of course, dive should not crash, but exit gracefully. Apart from that, I don't think that any specific message can be shown. Requiring |
On Win10, when using
full
, the docker cli is found and the target image is succesfully pulled. However, dive fails because of some issue with the log:This is the same if I try to use dive with any image which is available locally already.
The text was updated successfully, but these errors were encountered: