IBM-Cloud / ibm-cloud-cli-release

Apache License 2.0
155 stars 76 forks source link

panic: runtime error: slice bounds out of range [60:56] #212

Closed kaovilai closed 1 week ago

kaovilai commented 2 months ago
❯ ibmcloud is public-gateways 
Listing public gateways in all resource groups and region us-south under account MigrationEngineering as user tkaovila@redhat.com...
panic: runtime error: slice bounds out of range [60:56]

goroutine 907 [running]:
internal/poll.(*FD).Write(0x14000966200, {0x14000b84242, 0x38, 0x200})
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/internal/poll/fd_unix.go:383 +0x388
net.(*netFD).Write(0x14000966200, {0x14000b84242?, 0x1056c0690?, 0x0?})
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/fd_posix.go:96 +0x28
net.(*conn).Write(0x14000195160, {0x14000b84242?, 0x12fa8cbcb?, 0x0?})
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/net.go:195 +0x34
net.dnsPacketRoundTrip({_, _}, _, {{{0x75, 0x73, 0x2d, 0x73, 0x6f, 0x75, 0x74, ...}, ...}, ...}, ...)
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:102 +0x6c
net.(*Resolver).exchange(_, {_, _}, {_, _}, {{{0x75, 0x73, 0x2d, 0x73, 0x6f, ...}, ...}, ...}, ...)
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:187 +0x3ac
net.(*Resolver).tryOneName(_, {_, _}, _, {_, _}, _)
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:277 +0x364
net.(*Resolver).goLookupIPCNAMEOrder.func3.1(0x1c?)
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:638 +0x64
created by net.(*Resolver).goLookupIPCNAMEOrder.func3
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:637 +0x180

~
❯ ibmcloud is subnets
Listing subnets in all resource groups and region us-south under account MigrationEngineering as user tkaovila@redhat.com...
panic: runtime error: slice bounds out of range [60:56]

goroutine 880 [running]:
internal/poll.(*FD).Write(0x14000d02080, {0x14000b90242, 0x38, 0x200})
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/internal/poll/fd_unix.go:383 +0x388
net.(*netFD).Write(0x14000d02080, {0x14000b90242?, 0x101978690?, 0x0?})
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/fd_posix.go:96 +0x28
net.(*conn).Write(0x1400000f070, {0x14000b90242?, 0x12fbd1458?, 0x0?})
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/net.go:195 +0x34
net.dnsPacketRoundTrip({_, _}, _, {{{0x75, 0x73, 0x2d, 0x73, 0x6f, 0x75, 0x74, ...}, ...}, ...}, ...)
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:102 +0x6c
net.(*Resolver).exchange(_, {_, _}, {_, _}, {{{0x75, 0x73, 0x2d, 0x73, 0x6f, ...}, ...}, ...}, ...)
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:187 +0x3ac
net.(*Resolver).tryOneName(_, {_, _}, _, {_, _}, _)
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:277 +0x364
net.(*Resolver).goLookupIPCNAMEOrder.func3.1(0x1c?)
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:638 +0x64
created by net.(*Resolver).goLookupIPCNAMEOrder.func3
    /home/travis/.gimme/versions/go1.19.5.linux.amd64/src/net/dnsclient_unix.go:637 +0x180
❯ ibmcloud oc clusters
panic: runtime error: slice bounds out of range [60:42]

goroutine 82 [running]:
internal/poll.(*FD).Write(0x14000442c00, {0x1400074a002, 0x2a, 0x200})
    /home/travis/.gimme/versions/go1.18.9.linux.amd64/src/internal/poll/fd_unix.go:383 +0x388
net.(*netFD).Write(0x14000442c00, {0x1400074a002?, 0x1400037fed8?, 0x1027df6e4?})
    /home/travis/.gimme/versions/go1.18.9.linux.amd64/src/net/fd_posix.go:96 +0x2c
net.(*conn).Write(0x140001a61f8, {0x1400074a002?, 0x0?, 0xffffffffffffffff?})
    /home/travis/.gimme/versions/go1.18.9.linux.amd64/src/net/net.go:195 +0x38
github.com/johnstarich/go/dns/staggercast.(*Conn).Write.func1({0x10b1a07e8?, 0x140001a61f8?})
    /home/travis/gopath/pkg/mod/github.com/johnstarich/go/dns@v0.2.2/staggercast/conn.go:247 +0x50
github.com/johnstarich/go/dns/staggercast.(*Conn).iter.func1(0x0, {0x10b1a07e8, 0x140001a61f8})
    /home/travis/gopath/pkg/mod/github.com/johnstarich/go/dns@v0.2.2/staggercast/conn.go:183 +0xe8
created by github.com/johnstarich/go/dns/staggercast.(*Conn).iter
    /home/travis/gopath/pkg/mod/github.com/johnstarich/go/dns@v0.2.2/staggercast/conn.go:176 +0x3f8
❯ ibmcloud version 
ibmcloud 2.27.0+d5addb5-2024-07-05T19:22:17+00:00 Copyright IBM Corp. 2014, 2024

while troubleshooting. https://cloud.ibm.com/docs/openshift?topic=openshift-ts-ingress-erriodeg#ts-ingress-erriodeg-ccs-false

steveclay commented 2 months ago

It looks as though you are hitting the Golang problem discussed in this issue https://github.com/golang/go/issues/61060 . Unfortunately Golang's only solution so far is to try to improve the error message it seems. The problem seems related to the networking on your system. So from the issue, altering how you are connecting might solve this (VPN or no VPN, for example).

You can also try using an older CLI and see if there is a difference. These can be found here: https://github.com/IBM-Cloud/ibm-cloud-cli-release/releases . It is always best to run on the latest version as it has removed the latest vulnerabilities , etc. but you might experiment with this to see if it alleviates the problem. Version 2.25.1 is the last version before the current upgrade of Golang for the CLI.