Planetscale CLI hangs entire system on login (M1 Mac) #181
-
I was trying to set up the Planetscale CLI on my MacBook Air via Homebrew, which seems like it should work in theory as the release is compiled for arm64. I installed it via Homebrew and got to the stage of confirming the authorization code on the website, however after that step it runs into a network error and almost right away the whole network stack (and eventually the entire system) becomes unresponsive:
I tried Has anyone encountered this on an M1 machine? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 12 replies
-
🤔 We haven't heard any similar reports yet, and a lot of us at PlanetScale use m1 macs. Oddly enough I did have a similar OSX crash recently on Is this reproducible for you? Which version of OSX are you using? |
Beta Was this translation helpful? Give feedback.
-
Yes this happens every single time I run I am running the latest macOS 12.3.1. |
Beta Was this translation helpful? Give feedback.
-
Can confirm the same problem, but it's not isolated to 12.3.1 with M1 Pro. |
Beta Was this translation helpful? Give feedback.
-
Hey Folks, I really appreciate the reports of this - we've been very confused for quite some time, many of us at PlanetScale use the Until.. today! Someone was able to continuously run into this problem - down to requiring a hard restart - and we dug in to debug. Where we are right now is that we think this is a combination of IPv6 and Go's DNS resolution code with CGO disabled. We have a scoped down reproduction case that appears to create the same effect that we experienced with the In short, when our test laptop is:
Everything locks up. The test program we've been using to reproduce this is as simple as: package main
import (
"context"
"fmt"
"net"
"os"
"time"
)
func main() {
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
ips, err := net.DefaultResolver.LookupIP(ctx, "ip", "google.com")
if err != nil {
fmt.Fprintf(os.Stderr, "Could not get IPs: %v\n", err)
os.Exit(1)
}
for _, ip := range ips {
fmt.Printf("google.com. IN A %s\n", ip.String())
}
} It appears on both ARM and amd64, but only when connected to an IPv6 network. For me, that's meant when I'm tethered to my phone (as most mobile networks in 🇺🇸 are v6-native), but I'm sure it happens on normal home ISPs as well around the world. We think our next steps are:
Apologies for how long this has taken, I wish we could have found it sooner! |
Beta Was this translation helpful? Give feedback.
-
Alright, with https://github.com/planetscale/cli/releases/tag/v0.105.0 we should build the |
Beta Was this translation helpful? Give feedback.
Alright, with https://github.com/planetscale/cli/releases/tag/v0.105.0 we should build the
pscale
CLI on MacOS withCGO
(and thus the system resolver) enabled which should work around this issue.