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
cmd/compile: go cross build random fail #53924
Comments
What does "with gin default repo +gorm test" mean? cc @golang/compiler |
May be not related to gorm or any other package?
is is just randomly fail with no same panic error location. And sometines, go build works well, output the right binary. |
As one sample gin repo could randoms cause random build error:package main
import (
"log"
"net/http"
"os"
"os/signal"
"syscall"
"github.com/gin-contrib/gzip"
"github.com/gin-contrib/pprof"
"github.com/gin-gonic/gin"
)
func main() {
r := gin.New()
r.Use(gin.Recovery())
r.Use(gin.Logger())
r.SetTrustedProxies([]string{"0.0.0.0/0"})
r.Use(gzip.Gzip(gzip.DefaultCompression))
pprof.Register(r, "/spd")
r.HEAD("/ping", func(c *gin.Context) {
c.JSON(200, gin.H{
"message": "pong",
})
})
srv := &http.Server{
Handler: r,
Addr: ":8080",
}
go func() {
if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
log.Fatalf("listen: %s\n", err)
}
}()
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
<-quit
log.Println("Shutdown Server ...")
} run build command
after some build commands run, error happened(about 2 fails/5 build commands). Output:
|
What version of macOS are you using? |
|
See #53800. Closing as a dup. Thanks, |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
with gin default repo +gorm test
What did you expect to see?
corss build linux package as usual.
What did you see instead?
random error output:
go build
OutputOR
go build
OutputThe text was updated successfully, but these errors were encountered: