golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.96k stars 17.66k forks source link

import/path: issue title #70256

Open karalabe opened 2 hours ago

karalabe commented 2 hours ago

Go version

go1.23-alpine

Output of go env in your module/workspace:

-

What did you do?

I've tried to cross build our project to riscv64, via docker alpine:latest.

What did you see happen?

Build failed with a compiler bug (IMO):

------                                                                                                                                                                                                      
 > [builder 7/7] RUN cd /go-ethereum && go run build/ci.go install -static ./cmd/geth:                                                                                                                      
21.80 # vendor/golang.org/x/crypto/internal/poly1305                                                                                                                                                        
21.80 fatal error: all goroutines are asleep - deadlock!                                                                                                                                                    
21.80                                                                                                                                                                                                       
21.80 goroutine 1 [semacquire]:                                                                                                                                                                             
21.80 sync.runtime_Semacquire(0xc0008a0740?)
21.80   runtime/sema.go:71 +0x38
21.80 sync.(*WaitGroup).Wait(0xc0008a0740)
21.80   sync/waitgroup.go:118 +0x64
21.80 cmd/compile/internal/gc.compileFunctions(0x0)
21.80   cmd/compile/internal/gc/compile.go:200 +0x258
21.80 cmd/compile/internal/gc.Main(0x9ce378)
21.80   cmd/compile/internal/gc/main.go:306 +0x10fc
21.80 main.main()
21.80   cmd/compile/main.go:57 +0x118
21.80 
21.80 goroutine 7 [select]:
21.80 cmd/compile/internal/gc.compileFunctions.func3()
21.80   cmd/compile/internal/gc/compile.go:158 +0xf8
21.80 created by cmd/compile/internal/gc.compileFunctions in goroutine 1
21.80   cmd/compile/internal/gc/compile.go:151 +0x104
21.80 
21.80 goroutine 51 [sync.Mutex.Lock]:
21.80 sync.runtime_SemacquireMutex(0x1e6200?, 0x7c?, 0xc0000af050?)
21.80   runtime/sema.go:95 +0x44
21.80 sync.(*Mutex).lockSlow(0xc0004a4078)
21.80   sync/mutex.go:173 +0x180
21.80 sync.(*Mutex).Lock(...)
21.80   sync/mutex.go:92
21.80 cmd/internal/obj.(*Link).LookupInit(0xc0004a4008, {0xc000b0a450, 0x12}, 0x0)
21.80   cmd/internal/obj/sym.go:127 +0x8c
21.80 cmd/internal/obj.(*Link).Lookup(...)
21.80   cmd/internal/obj/sym.go:120
21.80 cmd/compile/internal/dwarfgen.createComplexVar(0xc000865b80, 0xc000b72390?, 0x6c1340?, 0x0)
21.80   cmd/compile/internal/dwarfgen/dwarf.go:528 +0x324
21.80 cmd/compile/internal/dwarfgen.createComplexVars(...)
21.80   cmd/compile/internal/dwarfgen/dwarf.go:485
21.80 cmd/compile/internal/dwarfgen.createDwarfVars(0xc000865b80, 0x60?, 0xc00067f540, {0xc0000a2ba0, 0x3, 0x4}, 0x0)
21.80   cmd/compile/internal/dwarfgen/dwarf.go:167 +0xe1c
21.80 cmd/compile/internal/dwarfgen.Info(0xc000865b80, 0xc0008bc100, {0xb07738?, 0xc00067f540})
21.80   cmd/compile/internal/dwarfgen/dwarf.go:123 +0x238
21.80 cmd/internal/obj.(*Link).populateDWARF(...)
21.80   cmd/internal/obj/dwarf.go:346
21.80 cmd/internal/obj.Flushplist(0xc0004a4008, 0xc000b6ff38, 0xc0000c52e0)
21.80   cmd/internal/obj/plist.go:173 +0xf24
21.80 cmd/compile/internal/objw.(*Progs).Flush(...)
21.80   cmd/compile/internal/objw/prog.go:112
21.80 cmd/compile/internal/ssagen.Compile(0xc00067f540, 0x1, 0x0?)
21.80   cmd/compile/internal/ssagen/pgen.go:327 +0x6c0
21.80 cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
21.80   cmd/compile/internal/gc/compile.go:188 +0x4c
21.80 cmd/compile/internal/gc.compileFunctions.func3.1()
21.80   cmd/compile/internal/gc/compile.go:170 +0x40
21.80 created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 7
21.80   cmd/compile/internal/gc/compile.go:169 +0x208

What did you expect to see?

Restarting the build finished without issues.

gabyhelp commented 2 hours ago

Related Issues

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

mvdan commented 2 hours ago

Did you mean to add an issue title?

seankhliao commented 2 hours ago

what's the actual go command that fails? also please complete the issue template