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/internal/imports: TestIgnoreDocumentationPackage/GOPATH crash (ACCESS_VIOLATION due to nil fp in gopark) #73112

Closed
gopherbot opened this issue Mar 31, 2025 · 3 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/internal/imports" && test == "TestIgnoreDocumentationPackage/GOPATH"

Issue created automatically to collect these failures.

Example (log):

=== RUN   TestIgnoreDocumentationPackage/GOPATH
Exception 0xc0000005 0x8 0x100000020 0x100000020
PC=0x100000020

runtime: g 18245 gp=0xc0005ace00: unknown pc 0x100000020
stack: frame={sp:0xc000229a38, fp:0x0} stack=[0xc000226000,0xc00022a000)
0x000000c000229938:  0x000000c0001ff008  0x000000c000229960 
0x000000c000229948:  0x000000014007d44e <runtime.gopark+0x00000000000000ce>  0x000000c000580068 
0x000000c000229958:  0x000000c0003263f0  0x000000c000229998 
0x000000c000229968:  0x0000000140028007 <runtime.gcParkAssist+0x00000000000000e7>  0x000000c00020cb68 
...
r11     0x246
r12     0xc000049908
r13     0x0
r14     0xc0005ace00
r15     0xb
rip     0x100000020
rflags  0x10207
cs      0x33
fs      0x53
gs      0x2b

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 Mar 31, 2025
@gopherbot
Copy link
Contributor Author

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/internal/imports" && test == "TestIgnoreDocumentationPackage/GOPATH"
2025-03-31 18:54 x_tools-gotip-windows-amd64-race tools@5c9a69f9 go@b9cbb653 x/tools/internal/imports.TestIgnoreDocumentationPackage/GOPATH [ABORT] (log)
=== RUN   TestIgnoreDocumentationPackage/GOPATH
Exception 0xc0000005 0x8 0x100000020 0x100000020
PC=0x100000020

runtime: g 18245 gp=0xc0005ace00: unknown pc 0x100000020
stack: frame={sp:0xc000229a38, fp:0x0} stack=[0xc000226000,0xc00022a000)
0x000000c000229938:  0x000000c0001ff008  0x000000c000229960 
0x000000c000229948:  0x000000014007d44e <runtime.gopark+0x00000000000000ce>  0x000000c000580068 
0x000000c000229958:  0x000000c0003263f0  0x000000c000229998 
0x000000c000229968:  0x0000000140028007 <runtime.gcParkAssist+0x00000000000000e7>  0x000000c00020cb68 
...
r11     0x246
r12     0xc000049908
r13     0x0
r14     0xc0005ace00
r15     0xb
rip     0x100000020
rflags  0x10207
cs      0x33
fs      0x53
gs      0x2b

watchflakes

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Mar 31, 2025
@gopherbot gopherbot added this to the Unreleased milestone Mar 31, 2025
@gopherbot gopherbot added the Documentation Issues describing a change to documentation. label Mar 31, 2025
@adonovan
Copy link
Member

adonovan commented Apr 2, 2025

Looks like an ACCESS_VIOLATION (5) on Windows caused by a nil frame pointer in gopark. There seems to be plenty of stack space. (First time I've seen this particular form of stack dump. Is this a Windows thing?) Unfortunately I can't build the executable because -race requires a C toolchain, which means I can't cross-compile it from this mac.

Can any windows expert (@qmuntal?) or @golang/runtime person comment?

Exception 0xc0000005 0x8 0x100000020 0x100000020
PC=0x100000020

runtime: g 18245 gp=0xc0005ace00: unknown pc 0x100000020
stack: frame={sp:0xc000229a38, fp:0x0} stack=[0xc000226000,0xc00022a000)
0x000000c000229938:  0x000000c0001ff008  0x000000c000229960 
0x000000c000229948:  0x000000014007d44e <runtime.gopark+0x00000000000000ce>  0x000000c000580068 
0x000000c000229958:  0x000000c0003263f0  0x000000c000229998 
0x000000c000229968:  0x0000000140028007 <runtime.gcParkAssist+0x00000000000000e7>  0x000000c00020cb68 
0x000000c000229978:  0x000000c000f5e080  0x000000014000e725 <internal/stringslite.IndexByte+0x0000000000000025> 
0x000000c000229988:  0x000000c000229a28  0x000000c0005ace00 
0x000000c000229998:  0x000000c000229a28  0x000000014002780a <runtime.gcAssistAlloc+0x000000000000034a> 
0x000000c0002299a8:  0x000000c000229a00  0x00000001400f2879 <internal/filepathlite.replaceStringByte+0x0000000000000079> 
0x000000c0002299b8:  0x000000c0001da182  0x00000000000296c9 
0x000000c0002299c8:  0x000000c0002299f0  0x0000000140086d8c <sync/atomic.LoadInt64+0x000000000000000c> 
0x000000c0002299d8:  0x000000014008af11 <sync/atomic.LoadPointer+0x0000000000000011>  0x000000c000382e20 
0x000000c0002299e8:  0x000000c000229a48  0x000000014001b073 <runtime.mallocgcSmallScanNoHeader+0x0000000000000253> 
0x000000c0002299f8:  0x000000014009c725 <sync/atomic.(*Pointer[go.shape.struct { sync.poolDequeue; sync.next sync/atomic.Pointer[sync.poolChainElt]; sync.prev sync/atomic.Pointer[sync.poolChainElt] }]).Load+0x0000000000000045>  0x0000000140027aa0 <runtime.gcAssistAlloc.func2+0x0000000000000000> 
0x000000c000229a08:  0x000000c0005ace00  0x00000000000296c9 
0x000000c000229a18:  0x000003004008aca9  0x0000000000000000 
0x000000c000229a28:  0x000000c000229a48  0x0000000100000020 
0x000000c000229a38: <0x000000c0005ace00  0x000000c000008090 
0x000000c000229a48:  0x000000c000229a98  0x000000014007acc7 <runtime.mallocgc+0x0000000000000067> 
0x000000c000229a58:  0x0000000140643260  0x0000000000000000 
0x000000c000229a68:  0x0000000000000000  0x000000c000008090 
0x000000c000229a78:  0x0000000000000018  0x0000000000000018 
0x000000c000229a88:  0x000000c000008090  0x000000c000008090 
0x000000c000229a98:  0x000000c000229ac0  0x000000014007efa9 <runtime.makeslice+0x0000000000000049> 
0x000000c000229aa8:  0x0000000000010000  0x00000001406ca360 
0x000000c000229ab8:  0x0000000140096d01 <sync.(*Pool).Get+0x0000000000000081>  0x000000c000229af8 
0x000000c000229ac8:  0x0000000140108685 <os.init.func1+0x0000000000000045>  0x0000000000000000 
0x000000c000229ad8:  0x0000000000000000  0x0000000000000000 
0x000000c000229ae8:  0x000000c000229af8  0x000000c000008090 
0x000000c000229af8:  0x000000c000229b30  0x0000000140096d71 <sync.(*Pool).Get+0x00000000000000f1> 
0x000000c000229b08:  0x0000000140b76600  0x000000000000000a 
0x000000c000229b18:  0x0000000000000000  0x000000000000000a 
0x000000c000229b28:  0x0000000000000000  0x000000c000229d08 
runtime: g 18245 gp=0xc0005ace00: unknown pc 0x100000020

@adonovan adonovan changed the title x/tools/internal/imports: TestIgnoreDocumentationPackage/GOPATH failures x/tools/internal/imports: TestIgnoreDocumentationPackage/GOPATH crash (ACCESS_VIOLATION due to nil fp in gopark) Apr 2, 2025
@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 Documentation Issues describing a change to documentation. 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

3 participants