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/cmd/deadcode: impossible SIGSEGV in darwin-amd64-race test #72777

Open
gopherbot opened this issue Mar 10, 2025 · 2 comments
Open

x/tools/cmd/deadcode: impossible SIGSEGV in darwin-amd64-race test #72777

gopherbot opened this issue Mar 10, 2025 · 2 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. 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/cmd/deadcode" && test == "Test/testdata/basic.txtar/L3"

Issue created automatically to collect these failures.

Example (log):

=== RUN   Test/testdata/basic.txtar/L3
    deadcode_test.go:115: deadcode failed: exit status 2 (stderr=unexpected fault address 0xb01dfacedebac1e
        fatal error: fault
        [signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x467613a]
        
        goroutine 506 gp=0xc000edb880 m=3 mp=0xc000080008 [running]:
        runtime.throw({0x46da455?, 0x20?})
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1073 +0x48 fp=0xc0027d5bd0 sp=0xc0027d5ba0 pc=0x429b4c8
        runtime.sigpanic()
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/signal_unix.go:931 +0x26a fp=0xc0027d5c30 sp=0xc0027d5bd0 pc=0x429d42a
...
        golang.org/x/tools/go/ssa.(*Program).Build.func1(0xc0010b6f98?)
        	/Users/swarming/.swarming/w/ir/x/w/targetrepo3138335219/go/ssa/builder.go:3142 +0x45 fp=0xc004365fc8 sp=0xc004365f90 pc=0x4679405
        golang.org/x/tools/go/ssa.(*Program).Build.gowrap1()
        	/Users/swarming/.swarming/w/ir/x/w/targetrepo3138335219/go/ssa/builder.go:3145 +0x24 fp=0xc004365fe0 sp=0xc004365fc8 pc=0x4679384
        runtime.goexit({})
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc004365fe8 sp=0xc004365fe0 pc=0x42a3d01
        created by golang.org/x/tools/go/ssa.(*Program).Build in goroutine 1
        	/Users/swarming/.swarming/w/ir/x/w/targetrepo3138335219/go/ssa/builder.go:3141 +0x195
        )
--- FAIL: Test/testdata/basic.txtar/L3 (2.93s)

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

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/cmd/deadcode" && test == "Test/testdata/basic.txtar/L3"
2025-03-10 16:39 x_tools-go1.23-darwin-amd64-race tools@03f197e9 release-branch.go1.23@45aade7f x/tools/cmd/deadcode.Test/testdata/basic.txtar/L3 (log)
=== RUN   Test/testdata/basic.txtar/L3
    deadcode_test.go:115: deadcode failed: exit status 2 (stderr=unexpected fault address 0xb01dfacedebac1e
        fatal error: fault
        [signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x467613a]
        
        goroutine 506 gp=0xc000edb880 m=3 mp=0xc000080008 [running]:
        runtime.throw({0x46da455?, 0x20?})
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1073 +0x48 fp=0xc0027d5bd0 sp=0xc0027d5ba0 pc=0x429b4c8
        runtime.sigpanic()
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/signal_unix.go:931 +0x26a fp=0xc0027d5c30 sp=0xc0027d5bd0 pc=0x429d42a
...
        golang.org/x/tools/go/ssa.(*Program).Build.func1(0xc0010b6f98?)
        	/Users/swarming/.swarming/w/ir/x/w/targetrepo3138335219/go/ssa/builder.go:3142 +0x45 fp=0xc004365fc8 sp=0xc004365f90 pc=0x4679405
        golang.org/x/tools/go/ssa.(*Program).Build.gowrap1()
        	/Users/swarming/.swarming/w/ir/x/w/targetrepo3138335219/go/ssa/builder.go:3145 +0x24 fp=0xc004365fe0 sp=0xc004365fc8 pc=0x4679384
        runtime.goexit({})
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc004365fe8 sp=0xc004365fe0 pc=0x42a3d01
        created by golang.org/x/tools/go/ssa.(*Program).Build in goroutine 1
        	/Users/swarming/.swarming/w/ir/x/w/targetrepo3138335219/go/ssa/builder.go:3141 +0x195
        )
--- FAIL: Test/testdata/basic.txtar/L3 (2.93s)

watchflakes

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

adonovan commented Mar 10, 2025

Unexpected SIGSEGV in code that "can't fail". Suspicious fault address 0xb01dfacedebac1e (indicating that the actual address was not a valid amd64 address with the top 16 bits all zeros or ones). This is either bad hardware or a compiler/runtime bug.

func (b *builder) stmtList(fn *Function, list []ast.Stmt) {
	for _, s := range list { <--------- panic
		b.stmt(fn, s)
	}
}
    deadcode_test.go:115: deadcode failed: exit status 2 (stderr=unexpected fault address 0xb01dfacedebac1e
        fatal error: fault
        [signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x467613a]
        
        goroutine 506 gp=0xc000edb880 m=3 mp=0xc000080008 [running]:
        runtime.throw({0x46da455?, 0x20?})
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/panic.go:1073 +0x48 fp=0xc0027d5bd0 sp=0xc0027d5ba0 pc=0x429b4c8
        runtime.sigpanic()
        	/Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/signal_unix.go:931 +0x26a fp=0xc0027d5c30 sp=0xc0027d5bd0 pc=0x429d42a
        golang.org/x/tools/go/ssa.(*builder).stmtList(...)
        	/Users/swarming/.swarming/w/ir/x/w/targetrepo3138335219/go/ssa/builder.go:965
        golang.org/x/tools/go/ssa.(*builder).stmt(0xc00857e360, 0xc0083da000, {0x48a1468?, 0xc004d350b1?})
        	/Users/swarming/.swarming/w/ir/x/w/targetrepo3138335219/go/ssa/builder.go:2747 +0x103a fp=0xc0027d5d60 sp=0xc0027d5c30 pc=0x467613a
...

@adonovan adonovan added the compiler/runtime Issues related to the Go compiler and/or runtime. label Mar 10, 2025
@adonovan adonovan changed the title x/tools/cmd/deadcode: Test/testdata/basic.txtar/L3 failures x/tools/cmd/deadcode: impossible SIGSEGV in darwin-amd64-race test Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Status: No status
Development

No branches or pull requests

2 participants