docker / buildx

Docker CLI plugin for extended build capabilities with BuildKit
Apache License 2.0
3.57k stars 482 forks source link

Did resizing the terminal window break the build? #1399

Open janwijbrand opened 2 years ago

janwijbrand commented 2 years ago

I ran into this failure when running a build, a while after having resized my terminal window (iTerm on MacOS):

panic: runtime error: index out of range [102] with length 94
goroutine 27 [running]:                                                                                 github.com/tonistiigi/vt100.(*VT100).put(0x14000743701?, 0x38b5eac?)
        /src/vendor/github.com/tonistiigi/vt100/vt100.go:312 +0x170                                     github.com/tonistiigi/vt100.runeCommand.display(...)
    /src/vendor/github.com/tonistiigi/vt100/command.go:44
github.com/tonistiigi/vt100.(*VT100).Process(...)
    /src/vendor/github.com/tonistiigi/vt100/vt100.go:252
github.com/tonistiigi/vt100.(*VT100).Write(0x14000598a50, {0x14001088ec0?, 0x36, 0x47?})
    /src/vendor/github.com/tonistiigi/vt100/vt100.go:239 +0x148
github.com/moby/buildkit/util/progress/progressui.(*trace).update(0x14000743ec8, 0x140004c2540, 0x68)
    /src/vendor/github.com/moby/buildkit/util/progress/progressui/display.go:541 +0xfec
github.com/moby/buildkit/util/progress/progressui.DisplaySolveStatus({0x104b92338, 0x140000ca940}, {0x0?, 0x0?}, {0x104b9ad08, 0x140006b1a58}, {0x104b796c8, 0x14000124010}, 0x140000ee780)
    /src/vendor/github.com/moby/buildkit/util/progress/progressui/display.go:64 +0x2cc
github.com/docker/buildx/util/progress.NewPrinter.func1()
    /src/util/progress/printer.go:98 +0x16c
created by github.com/docker/buildx/util/progress.NewPrinter
    /src/util/progress/printer.go:86 +0x27c
make: *** [create-image-clean-cache] Error 2

Since I'm not too experienced with this stack, please let me know if I need to produce more details and how. I hope this issue is useful.

frelon commented 1 year ago

FYI I also encountered this error and put up a PR in https://github.com/tonistiigi/vt100/pull/1