Skip to content
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

x/tools/refactor/importgraph: TestBuild failures (nil frame pointer in os.OpenFile) #73128

Closed
gopherbot opened this issue Apr 1, 2025 · 6 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@gopherbot
Copy link
Contributor

#!watchflakes
default <- pkg == "golang.org/x/tools/refactor/importgraph" && test == "TestBuild"

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestBuild
    graph_test.go:67: GOPACKAGESDRIVER=off
    graph_test.go:67: GO111MODULE=off
    graph_test.go:67: GOPATH=C:\Users\swarming\.swarming\w\ir\x\t\TestBuild2259589524\importgraph
Exception 0xc0000005 0x8 0x203a59fad8 0x203a59fad8
PC=0x203a59fad8

runtime: g 582 gp=0x4000195340: unknown pc 0x203a59fad8
stack: frame={sp:0x4000a33490, fp:0x0} stack=[0x4000a30000,0x4000a34000)
0x0000004000a33390:  0x0000000000000000  0x0000000000000000 
...
fatal error: unexpected signal during runtime execution
[signal 0xc0000005 code=0x0 addr=0xe0 pc=0x7ff63a550694]

runtime stack:
runtime.throw({0x7ff63a7177b2?, 0x0?})
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1089 +0x34 fp=0x1143bff230 sp=0x1143bff200 pc=0x7ff63a560284
runtime.sigpanic()
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/signal_windows.go:387 +0x234 fp=0x1143bff280 sp=0x1143bff230 pc=0x7ff63a544584
runtime.(*unwinder).next(0x1143bff688)
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/traceback.go:458 +0x174 fp=0x1143bff320 sp=0x1143bff290 pc=0x7ff63a550694
...
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:283 +0x388 fp=0x400021dcf0 sp=0x400021dc70 pc=0x7ff63a4fb3d8
runtime.chansend1(0x40000b4300?, 0x4000090eb8?)
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:161 +0x18 fp=0x400021dd20 sp=0x400021dcf0 pc=0x7ff63a4fb038
golang.org/x/tools/refactor/importgraph.Build.func1.1.1()
	C:/Users/swarming/.swarming/w/ir/x/w/targetrepo2238098368/refactor/importgraph/graph.go:86 +0x74 fp=0x400021dfd0 sp=0x400021dd20 pc=0x7ff63a6632c4
runtime.goexit({})
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_arm64.s:1266 +0x4 fp=0x400021dfd0 sp=0x400021dfd0 pc=0x7ff63a5679f4
created by golang.org/x/tools/refactor/importgraph.Build.func1.1 in goroutine 19
	C:/Users/swarming/.swarming/w/ir/x/w/targetrepo2238098368/refactor/importgraph/graph.go:83 +0xc8
*** Test killed: ran too long (22m0s).

watchflakes

@gopherbot gopherbot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 1, 2025
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/refactor/importgraph" && test == "TestBuild"
2025-03-31 21:52 x_tools-gotip-windows-arm64 tools@f3a6b96d go@7177f240 x/tools/refactor/importgraph.TestBuild [ABORT] (log)
=== RUN   TestBuild
    graph_test.go:67: GOPACKAGESDRIVER=off
    graph_test.go:67: GO111MODULE=off
    graph_test.go:67: GOPATH=C:\Users\swarming\.swarming\w\ir\x\t\TestBuild2259589524\importgraph
Exception 0xc0000005 0x8 0x203a59fad8 0x203a59fad8
PC=0x203a59fad8

runtime: g 582 gp=0x4000195340: unknown pc 0x203a59fad8
stack: frame={sp:0x4000a33490, fp:0x0} stack=[0x4000a30000,0x4000a34000)
0x0000004000a33390:  0x0000000000000000  0x0000000000000000 
...
fatal error: unexpected signal during runtime execution
[signal 0xc0000005 code=0x0 addr=0xe0 pc=0x7ff63a550694]

runtime stack:
runtime.throw({0x7ff63a7177b2?, 0x0?})
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1089 +0x34 fp=0x1143bff230 sp=0x1143bff200 pc=0x7ff63a560284
runtime.sigpanic()
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/signal_windows.go:387 +0x234 fp=0x1143bff280 sp=0x1143bff230 pc=0x7ff63a544584
runtime.(*unwinder).next(0x1143bff688)
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/traceback.go:458 +0x174 fp=0x1143bff320 sp=0x1143bff290 pc=0x7ff63a550694
...
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:283 +0x388 fp=0x400021dcf0 sp=0x400021dc70 pc=0x7ff63a4fb3d8
runtime.chansend1(0x40000b4300?, 0x4000090eb8?)
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:161 +0x18 fp=0x400021dd20 sp=0x400021dcf0 pc=0x7ff63a4fb038
golang.org/x/tools/refactor/importgraph.Build.func1.1.1()
	C:/Users/swarming/.swarming/w/ir/x/w/targetrepo2238098368/refactor/importgraph/graph.go:86 +0x74 fp=0x400021dfd0 sp=0x400021dd20 pc=0x7ff63a6632c4
runtime.goexit({})
	C:/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_arm64.s:1266 +0x4 fp=0x400021dfd0 sp=0x400021dfd0 pc=0x7ff63a5679f4
created by golang.org/x/tools/refactor/importgraph.Build.func1.1 in goroutine 19
	C:/Users/swarming/.swarming/w/ir/x/w/targetrepo2238098368/refactor/importgraph/graph.go:83 +0xc8
*** Test killed: ran too long (22m0s).

watchflakes

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Apr 1, 2025
@gopherbot gopherbot added this to the Unreleased milestone Apr 1, 2025
@adonovan
Copy link
Member

adonovan commented Apr 2, 2025

Another bad fp(?) crash (see also #73112), this time somewhere within os.OpenFile.

cc: @golang/windows @golang/runtime

Exception 0xc0000005 0x8 0x203a59fad8 0x203a59fad8
PC=0x203a59fad8

runtime: g 582 gp=0x4000195340: unknown pc 0x203a59fad8
stack: frame={sp:0x4000a33490, fp:0x0} stack=[0x4000a30000,0x4000a34000)
0x0000004000a33390:  0x0000000000000000  0x0000000000000000 
0x0000004000a333a0:  0x0000000000000000  0x0000000000000000 
0x0000004000a333b0:  0x0000000000000000  0x0000000000000000 
0x0000004000a333c0:  0x0000000000000000  0x0000000000000000 
0x0000004000a333d0:  0x00000008c0000005  0x0000000000000000 
0x0000004000a333e0:  0x000000203a59fad8  0x0000000000000002 
0x0000004000a333f0:  0x0000000000000008  0x000000203a59fad8 
0x0000004000a33400:  0x0000000000000000  0x0000000000000000 
0x0000004000a33410:  0x0000000000000000  0x0000000000000000 
0x0000004000a33420:  0x0000000000000000  0x0000000000000000 
0x0000004000a33430:  0x0000000000000000  0x0000000000000000 
0x0000004000a33440:  0x0000000000000000  0x0000000000000000 
0x0000004000a33450:  0x0000000000000000  0x0000000000000000 
0x0000004000a33460:  0x0000000000000000  0x0000004000a334a8 
0x0000004000a33470:  0x0000004000a33490  0x000000203a59fad8 
0x0000004000a33480:  0x00007ff63a709bab  0x0000004000a334d8 
0x0000004000a33490: <0x00007ff63a59eea0 <os.OpenFile+0x0000000000000040>  0x000000400004d880 
0x0000004000a334a0:  0x0000000000000009  0x0000000000080000 
0x0000004000a334b0:  0x00007ff600000000  0x000001d948160108 
0x0000004000a334c0:  0x000000400004d880  0x0000004000080008 
0x0000004000a334d0:  0x00000040005e7050  0x0000004000a33508 
0x0000004000a334e0:  0x00007ff63a65371c <go/build.(*Context).openFile+0x000000000000003c>  0x000000400004d880 
0x0000004000a334f0:  0x0000000000000048  0x0000004000653f50 
0x0000004000a33500:  0x0000004000a00af0  0x0000004000a33538 
0x0000004000a33510:  0x00007ff63a65b0d8 <go/build.(*Context).matchFile+0x0000000000000498>  0x000000400004d880 
0x0000004000a33520:  0x0000000000000048  0x0000000000000000 
0x0000004000a33530:  0x00007ff600000000  0x0000004000a335e8 
0x0000004000a33540:  0x00007ff63a655748 <go/build.(*Context).Import+0x0000000000001358>  0x00000040000b4300 
0x0000004000a33550:  0x000000400004d880  0x00007ff63a75a304 
0x0000004000a33560:  0x000000400089a150  0x000001d948160108 
0x0000004000a33570:  0x0000000000000040  0x0000000000000003 
0x0000004000a33580:  0x00000040003060c0  0x0000000000000048 

@adonovan adonovan changed the title x/tools/refactor/importgraph: TestBuild failures x/tools/refactor/importgraph: TestBuild failures (nil frame pointer in os.OpenFile) Apr 2, 2025
@qmuntal
Copy link
Member

qmuntal commented Apr 2, 2025

These crashes are weird. Don't know why we don't get a normal crash stack trace, but the underlying issue could be related to a panic (not properly handled) caused by my multiple runtime/poll CLs that landed this last days. I'm particularly looking at https://go-review.googlesource.com/c/go/+/661795. Will try to reproduce.

@qmuntal
Copy link
Member

qmuntal commented Apr 2, 2025

@adonovan
Copy link
Member

adonovan commented Apr 2, 2025

Don't know why we don't get a normal crash stack trace

I'm sure it's because the frame pointer is nil, so the unwinder has nothing to go on. I don't know why fp is nil though.

@gopherbot
Copy link
Contributor Author

Change https://go.dev/cl/662575 mentions this issue: internal/syscall/windows: define NtQueryInformationFile buffer as unsafe.Pointer

@dmitshur dmitshur added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: Done
Development

No branches or pull requests

4 participants