node icon indicating copy to clipboard operation
node copied to clipboard

deploy tool panics

Open hydrogen18 opened this issue 4 years ago • 0 comments

The deploy tool has some bad logic around indexing somewhere, I got this panic

I[2021-02-15|16:48:01.903] tx sent successfully                         hash=9A1BA1176967535CE141DAAAE66EE67D52691E963CDE894CD0A3FE6930DECC48 code=0 codespace= action=create-deployment dseq=4414
I[2021-02-15|16:48:05.349] deployment created                           addr=akash19dnhammcj3vf9dzgmtgg7pc8ujecn5azlzcu09 dseq=4414
I[2021-02-15|16:48:05.349] order for deployment created                 addr=akash19dnhammcj3vf9dzgmtgg7pc8ujecn5azlzcu09 dseq=4414 oseq=1
I[2021-02-15|16:48:05.349] order for deployment created                 addr=akash19dnhammcj3vf9dzgmtgg7pc8ujecn5azlzcu09 dseq=4414 oseq=1
I[2021-02-15|16:48:10.615] bid for order created                        addr=akash19dnhammcj3vf9dzgmtgg7pc8ujecn5azlzcu09 dseq=4414 oseq=1 price=1788uakt
D[2021-02-15|16:48:10.615] Processing bid                               
>>>> BID <<<<
I[2021-02-15|16:48:10.680] bid for order created                        addr=akash19dnhammcj3vf9dzgmtgg7pc8ujecn5azlzcu09 dseq=4414 oseq=1 price=447uakt
D[2021-02-15|16:48:10.680] Processing bid                               
>>>> BID <<<<
D[2021-02-15|16:48:10.680] All groups have at least one bid             
I[2021-02-15|16:48:25.680] Done waiting on bids                         qty=2
panic: runtime error: index out of range [1] with length 1

goroutine 37 [running]:
github.com/ovrclk/akash/deploy/cmd.(*waitForBids).run(0xc000c18520, 0x2ecf1c0, 0xc0010cbce0, 0xc00111d050, 0xc0011a3f80, 0x14, 0x20, 0x2f0a740, 0xc0011186c0, 0x7ffe472ce327, ...)
	github.com/ovrclk/akash/deploy/cmd/create.go:272 +0x126f
github.com/ovrclk/akash/deploy/cmd.createCmd.func1.3(0x0, 0x0)
	github.com/ovrclk/akash/deploy/cmd/create.go:113 +0x125
golang.org/x/sync/errgroup.(*Group).Go.func1(0xc000c204b0, 0xc000c280a0)
	golang.org/x/[email protected]/errgroup/errgroup.go:57 +0x59
created by golang.org/x/sync/errgroup.(*Group).Go
	golang.org/x/[email protected]/errgroup/errgroup.go:54 +0x66

This should be easy to cover with unit tests to reproduce & solve the problem.

hydrogen18 avatar Feb 17 '21 19:02 hydrogen18