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

runtime: SIGSEGV in allocNeedsZero on darwin #58715

Closed
bcmills opened this issue Feb 24, 2023 · 14 comments
Closed

runtime: SIGSEGV in allocNeedsZero on darwin #58715

bcmills opened this issue Feb 24, 2023 · 14 comments
Assignees
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. OS-Darwin
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Feb 24, 2023

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`

(Pulled out from #55167 (comment).)

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Feb 24, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`
2023-01-17 01:51 darwin-amd64-11_0 tools@8e949673 go@145dd384 TestGoplsSourceDoesNotCallTokenFileMethods (log)
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x10263f1]

runtime stack:
runtime.throw({0x12a17c8?, 0x2031?})
	/tmp/buildlet/go/src/runtime/panic.go:1047 +0x5d fp=0x7000077b5598 sp=0x7000077b5568 pc=0x1034f1d
runtime.sigpanic()
	/tmp/buildlet/go/src/runtime/signal_unix.go:821 +0x3e9 fp=0x7000077b55f8 sp=0x7000077b5598 pc=0x104bb49
runtime.(*mheap).allocNeedsZero(0xc004000000?, 0x7000077b5640?, 0x102b539?)
	/tmp/buildlet/go/src/runtime/mheap.go:1021 +0x71 fp=0x7000077b5618 sp=0x7000077b55f8 pc=0x10263f1
...
	/tmp/buildlet/go/src/runtime/sema.go:62 +0x27 fp=0xc0000d7878 sp=0xc0000d7840 pc=0x10655a7
sync.(*WaitGroup).Wait(0xc000107a58?)
	/tmp/buildlet/go/src/sync/waitgroup.go:116 +0x4b fp=0xc0000d78a0 sp=0xc0000d7878 pc=0x107152b
golang.org/x/tools/go/packages.(*loader).refine(0xc0001b4000, 0xc0001ba050)
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages.go:778 +0xdd7 fp=0xc0000d7b98 sp=0xc0000d78a0 pc=0x1229d77
golang.org/x/tools/go/packages.Load(0x12ef1e8?, {0xc000198080, 0x2, 0x2})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages.go:266 +0x9c fp=0xc0000d7bd0 sp=0xc0000d7b98 pc=0x12280bc
golang.org/x/tools/gopls/internal/lsp/safetoken_test.TestGoplsSourceDoesNotCallTokenFileMethods(0xc000082ea0)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/safetoken/safetoken_test.go:76 +0xc8 fp=0xc0000d7f70 sp=0xc0000d7bd0 pc=0x1230088
testing.tRunner(0xc000082ea0, 0x12a7a98)
2023-02-16 18:10 darwin-amd64-12_0 tools@ad4fc28a go@518889b3 x/tools/gopls/internal/regtest/diagnostics.TestIssue37978 (log)
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x100027f51]

runtime stack:
runtime.throw({0x100b341e9?, 0x1001155bd?})
	/tmp/buildlet/go/src/runtime/panic.go:1075 +0x5c fp=0x70000a7f5d98 sp=0x70000a7f5d68 pc=0x100036b5c
runtime.sigpanic()
	/tmp/buildlet/go/src/runtime/signal_unix.go:821 +0x3e9 fp=0x70000a7f5df8 sp=0x70000a7f5d98 pc=0x10004d3a9
runtime.(*mheap).allocNeedsZero(0xf7?, 0x10115de88?, 0xc002000000?)
	/tmp/buildlet/go/src/runtime/mheap.go:1021 +0x71 fp=0x70000a7f5e18 sp=0x70000a7f5df8 pc=0x100027f51
...
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc0033a5d68 sp=0xc0033a5d40 pc=0x100006c92
testing.(*T).Run(0xc00349cd00, {0x100ae9102?, 0x27?}, 0xc002588690)
	/tmp/buildlet/go/src/testing/testing.go:1630 +0x405 fp=0xc0033a5e28 sp=0xc0033a5d68 pc=0x100127425
golang.org/x/tools/gopls/internal/lsp/regtest.(*Runner).Run(0xc000336d20, 0xc00349cd00, {0x100b4efc9, 0x7c}, 0x100c60f48, {0x0, 0x0, 0x10008dcaf?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/runner.go:171 +0x3f0 fp=0xc0033a5f20 sp=0xc0033a5e28 pc=0x1008f5d30
golang.org/x/tools/gopls/internal/lsp/regtest.Run(...)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/regtest.go:55
golang.org/x/tools/gopls/internal/regtest/diagnostics.TestIssue37978(0xc0016dca80?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/regtest/diagnostics/diagnostics_test.go:163 +0x3d fp=0xc0033a5f70 sp=0xc0033a5f20 pc=0x1008fe0dd
testing.tRunner(0xc00349cd00, 0x100c60f50)
2023-02-16 19:20 darwin-amd64-nocgo tools@e5b99481 go@031401a7 TestLSP (log)
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1026e71]

runtime stack:
runtime.throw({0x198e00d?, 0xc000054638?})
	/tmp/buildlet/go/src/runtime/panic.go:1075 +0x5c fp=0x700008bf0db8 sp=0x700008bf0d88 pc=0x1035a7c
runtime.sigpanic()
	/tmp/buildlet/go/src/runtime/signal_unix.go:821 +0x3e9 fp=0x700008bf0e18 sp=0x700008bf0db8 pc=0x104c2c9
runtime.(*mheap).allocNeedsZero(0x1f?, 0x1ff?, 0xc008002000?)
	/tmp/buildlet/go/src/runtime/mheap.go:1021 +0x71 fp=0x700008bf0e38 sp=0x700008bf0e18 pc=0x1026e71
...
	/tmp/buildlet/go/src/runtime/chan.go:583 +0x44e fp=0xc000080db8 sp=0xc000080d28 pc=0x10060ae
runtime.chanrecv1(0x208d1e0?, 0x181e1e0?)
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc000080de0 sp=0xc000080db8 pc=0x1005c32
testing.(*T).Run(0xc000288340, {0x194b50d?, 0x599?}, 0xc00028c090)
	/tmp/buildlet/go/src/testing/testing.go:1630 +0x405 fp=0xc000080ea0 sp=0xc000080de0 pc=0x11253e5
golang.org/x/tools/gopls/internal/lsp/tests.RunTests(0xc000288340, {0x194f0ce, 0x8}, 0x1, 0x1a9d040)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/tests/tests.go:297 +0x12a fp=0xc000080f38 sp=0xc000080ea0 pc=0x17530aa
golang.org/x/tools/gopls/internal/lsp.TestLSP(0xc000288000?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/lsp_test.go:51 +0x2b fp=0xc000080f70 sp=0xc000080f38 pc=0x179b5cb
testing.tRunner(0xc000288340, 0x1a9d020)

watchflakes

@bcmills bcmills added OS-Darwin NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Feb 25, 2023
@mknyszek
Copy link
Contributor

mknyszek commented Mar 1, 2023

The stack trace implies loading a nil heapArena struct. I'm not sure how this could happen (for instance due to a race). I'll look into it.

@mknyszek mknyszek self-assigned this Mar 1, 2023
@mknyszek mknyszek added this to the Backlog milestone Mar 1, 2023
@mknyszek
Copy link
Contributor

mknyszek commented Mar 1, 2023

I want to look into whether this is actually only happening on Darwin.

@prattmic
Copy link
Member

prattmic commented Mar 1, 2023

I see it once on freebsd in 2021:

2021-10-13T18:15:48-40f82f8/freebsd-386-12_2

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`
2023-04-04 14:19 darwin-amd64-nocgo text@48e4a4a9 go@42f558bd x/text/message/pipeline.TestFullCycle (log)
SIGSEGV: segmentation violation
PC=0x1026f91 m=5 sigcode=1

rax    0x1925d60
rbx    0xc004100000
rcx    0x4
rdx    0x0
rdi    0x800000000000
rsi    0x0
rbp    0x7000057f6c00
...
	/tmp/buildlet/go/src/runtime/proc.go:398 +0xce fp=0xc000094c48 sp=0xc000094c28 pc=0x1038c2e
runtime.chanrecv(0xc00021e000, 0xc000094d2f, 0x1)
	/tmp/buildlet/go/src/runtime/chan.go:583 +0x3cd fp=0xc000094cc0 sp=0xc000094c48 pc=0x1005e2d
runtime.chanrecv1(0x190c680?, 0x13f8380?)
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc000094ce8 sp=0xc000094cc0 pc=0x1005a32
testing.(*T).Run(0xc0000836c0, {0xc000208026?, 0x35?}, 0xc000202060)
	/tmp/buildlet/go/src/testing/testing.go:1649 +0x3c8 fp=0xc000094da8 sp=0xc000094ce8 pc=0x11171e8
golang.org/x/text/message/pipeline.TestFullCycle(0xc0000836c0)
	/tmp/buildlet/gopath/src/golang.org/x/text/message/pipeline/pipeline_test.go:76 +0x718 fp=0xc000094f70 sp=0xc000094da8 pc=0x13cac58
testing.tRunner(0xc0000836c0, 0x14c1910)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`
2023-05-25 16:41 darwin-amd64-11_0 tools@ed90c6d2 go@789701e9 x/tools/gopls/internal/regtest/diagnostics.TestIssue37978 (log)
SIGSEGV: segmentation violation
PC=0x10002d111 m=13 sigcode=1

rax    0x101457440
rbx    0xc00c100000
rcx    0x4
rdx    0x0
rdi    0x800000000000
rsi    0x0
rbp    0x70000d451be0
...
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc00006fd58 sp=0xc00006fd30 pc=0x10000b4d2
testing.(*T).Run(0xc0012311e0, {0x100b7333d?, 0x100b8fe94?}, 0xc000412910)
	/tmp/buildlet/go/src/testing/testing.go:1649 +0x3c8 fp=0xc00006fe18 sp=0xc00006fd58 pc=0x100131208
golang.org/x/tools/gopls/internal/lsp/regtest.(*Runner).Run(0xc000534640, 0xc0012311e0, {0x100bde6dc, 0x7c}, 0x100cf4608, {0x0, 0x0, 0x10009528f?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/runner.go:169 +0x491 fp=0xc00006ff20 sp=0xc00006fe18 pc=0x10096df11
golang.org/x/tools/gopls/internal/lsp/regtest.Run(...)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/regtest.go:54
golang.org/x/tools/gopls/internal/regtest/diagnostics.TestIssue37978(0x100e25c30?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/regtest/diagnostics/diagnostics_test.go:163 +0x3d fp=0xc00006ff70 sp=0xc00006ff20 pc=0x1009768bd
testing.tRunner(0xc0012311e0, 0x100cf4298)
2023-06-22 21:46 darwin-amd64-12_0 tools@c8278fe9 go@6dce882b x/tools/go/packages.TestAll (log)
SIGSEGV: segmentation violation
PC=0x10275f1 m=6 sigcode=1

rax    0x14ecde0
rbx    0xc040038000
rcx    0x3e
rdx    0x0
rdi    0x800000000000
rsi    0x0
rbp    0x700003522e20
...
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc000064d50 sp=0xc000064d28 pc=0x1005f32
testing.(*T).Run(0xc006eb9d40, {0xc000ba7440?, 0x1?}, 0xc02487b020)
	/tmp/buildlet/go/src/testing/testing.go:1649 +0x3c8 fp=0xc000064e10 sp=0xc000064d50 pc=0x10ebb08
golang.org/x/tools/go/packages_test.testCgoNoSyntax(0xc006eb9d40?, {0x134a850, 0x1503860})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages_test.go:1929 +0x228 fp=0xc000064ed8 sp=0xc000064e10 pc=0x12639e8
golang.org/x/tools/go/packages_test.testAllOrModulesParallel.func1(0xc006eb9d40, {0x134a850, 0x1503860})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages_test.go:81 +0x138 fp=0xc000064f30 sp=0xc000064ed8 pc=0x1253db8
golang.org/x/tools/go/packages/packagestest.TestAll.func1(0xc006eb9d40)
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packagestest/export.go:162 +0x51 fp=0xc000064f70 sp=0xc000064f30 pc=0x1242ad1
testing.tRunner(0xc006eb9d40, 0xc00bbe14e0)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`
2023-07-06 20:34 darwin-amd64-12_0 tools@124ebfa4 go@312920c0 x/tools/go/analysis/passes/composite.Test (log)
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1026791]

runtime stack:
runtime.throw({0x1318172?, 0x0?})
	/tmp/buildlet/go/src/runtime/panic.go:1047 +0x5d fp=0x700001ea5b98 sp=0x700001ea5b68 pc=0x10352bd
runtime.sigpanic()
	/tmp/buildlet/go/src/runtime/signal_unix.go:825 +0x3e9 fp=0x700001ea5bf8 sp=0x700001ea5b98 pc=0x104c369
runtime.(*mheap).allocNeedsZero(0xc0040ca000?, 0x4?, 0x102b8b9?)
	/tmp/buildlet/go/src/runtime/mheap.go:1021 +0x71 fp=0x700001ea5c18 sp=0x700001ea5bf8 pc=0x1026791
...
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages.go:266 +0x9c fp=0xc0001094e8 sp=0xc0001094b0 pc=0x127ac5c
golang.org/x/tools/go/analysis/analysistest.loadPackages(0x14fc4c0, {0xc00008c2a0, 0x51}, {0xc0000d4b00, 0x2, 0x2})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:332 +0x225 fp=0xc000109630 sp=0xc0001094e8 pc=0x12912e5
golang.org/x/tools/go/analysis/analysistest.Run({0x136fc20, 0xc000083040}, {0xc00008c2a0, 0x51}, 0x14fc4c0, {0xc0000d4b00, 0x2, 0x2})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:286 +0xbf fp=0xc0001096f8 sp=0xc000109630 pc=0x1290cff
golang.org/x/tools/go/analysis/analysistest.RunWithSuggestedFixes({0x136fc20, 0xc000083040}, {0xc00008c2a0?, 0x51?}, 0x14fc4c0?, {0xc0000d4b00?, 0x2?, 0x2?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:102 +0x4e fp=0xc000109f08 sp=0xc0001096f8 pc=0x128efee
golang.org/x/tools/go/analysis/passes/composite_test.Test(0x0?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/analysis/passes/composite/composite_test.go:21 +0xc6 fp=0xc000109f70 sp=0xc000109f08 pc=0x12943a6
testing.tRunner(0xc000083040, 0x131fa40)

watchflakes

@gopherbot gopherbot modified the milestones: Go1.21, Go1.22 Aug 8, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`
2023-10-10 15:06 darwin-amd64-12_0 tools@8954aa7a go@aa8e4c5e x/tools/gopls/internal/regtest/diagnostics.TestIssue37978 (log)
SIGSEGV: segmentation violation
PC=0x10e80e071 m=16 sigcode=1 addr=0x0

rax    0x10fdbbe60
rbx    0xc00c1a8000
rcx    0xf7
rdx    0x0
rdi    0x800000000000
rsi    0x0
rbp    0x70000b84fe08
...
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc00006fd50 sp=0xc00006fd28 pc=0x10e7ebaf2
testing.(*T).Run(0xc001ba21a0, {0x10f227c69?, 0x10f24519e?}, 0xc004965db0)
	/tmp/buildlet/go/src/testing/testing.go:1647 +0x3ab fp=0xc00006fe10 sp=0xc00006fd50 pc=0x10e9176ab
golang.org/x/tools/gopls/internal/lsp/regtest.(*Runner).Run(0xc0004fabe0, 0xc001ba21a0, {0x10f298a05, 0x7c}, 0x10f707b88, {0x0?, 0x0, 0x10e87664f?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/runner.go:168 +0x485 fp=0xc00006ff20 sp=0xc00006fe10 pc=0x10f208585
golang.org/x/tools/gopls/internal/lsp/regtest.Run(...)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/regtest.go:53
golang.org/x/tools/gopls/internal/regtest/diagnostics.TestIssue37978(0xc00073e748?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/regtest/diagnostics/diagnostics_test.go:163 +0x3d fp=0xc00006ff70 sp=0xc00006ff20 pc=0x10f2109fd
testing.tRunner(0xc001ba21a0, 0x10f707830)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`
2023-11-07 21:16 darwin-amd64-12_0 tools@51df92b2 go@9e90a15b x/tools/gopls/internal/regtest/diagnostics.TestIssue37978 (log)
SIGSEGV: segmentation violation
PC=0x8b198c5 m=12 sigcode=1 addr=0x0

rax    0xa0d4020
rbx    0xc00c002000
rcx    0x55
rdx    0x0
rdi    0x0
rsi    0x800000000000
rbp    0x700010a0ee08
...
	/tmp/buildlet/go/src/runtime/chan.go:442 +0x12 fp=0xc000074d50 sp=0xc000074d28 pc=0x8af7372
testing.(*T).Run(0xc00252b040, {0x953a161?, 0x9557799?}, 0xc00250aa00)
	/tmp/buildlet/go/src/testing/testing.go:1736 +0x3ab fp=0xc000074e10 sp=0xc000074d50 pc=0x8c2382b
golang.org/x/tools/gopls/internal/lsp/regtest.(*Runner).Run(0xc0001268c0, 0xc00252b040, {0x95ab907, 0x7c}, 0x9a1d618, {0x0?, 0x0, 0x8b81fcf?})
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/runner.go:168 +0x485 fp=0xc000074f20 sp=0xc000074e10 pc=0x951b105
golang.org/x/tools/gopls/internal/lsp/regtest.Run(...)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/lsp/regtest/regtest.go:53
golang.org/x/tools/gopls/internal/regtest/diagnostics.TestIssue37978(0xc00252b040?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/gopls/internal/regtest/diagnostics/diagnostics_test.go:163 +0x3d fp=0xc000074f70 sp=0xc000074f20 pc=0x952361d
testing.tRunner(0xc00252b040, 0x9a1d2b8)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`
2023-12-11 23:10 darwin-amd64-nocgo tools@f40889dc go@f4ff0e25 x/tools/go/analysis/passes/deepequalerrors (log)
SIGSEGV: segmentation violation
PC=0xe7c69a5 m=7 sigcode=1 addr=0x0

goroutine 0 gp=0xc0002081c0 m=7 mp=0xc000204008 [idle]:
runtime.(*mheap).allocNeedsZero(0xe7a96f6?, 0x800?, 0xc004000000?)
	/tmp/buildlet/go/src/runtime/mheap.go:1024 +0x65 fp=0x70000176ee38 sp=0x70000176ee18 pc=0xe7c69a5
runtime.(*mheap).initSpan(0xeca5740, 0x1586cdc8, 0x0, 0xc, 0xc004010000, 0x1)
	/tmp/buildlet/go/src/runtime/mheap.go:1381 +0x51 fp=0x70000176ee70 sp=0x70000176ee38 pc=0xe7c71b1
runtime.(*mheap).allocSpan(0xeca5740, 0x1, 0x0, 0xc)
	/tmp/buildlet/go/src/runtime/mheap.go:1340 +0x43d fp=0x70000176ef10 sp=0x70000176ee70 pc=0xe7c6fbd
...
r11    0x0
r12    0x80c00407ffff
r13    0xec7bbe0
r14    0xc0002081c0
r15    0x3
rip    0xe7c69a5
rflags 0x10246
cs     0x2b
fs     0x0
gs     0x0

watchflakes

@bcmills
Copy link
Contributor Author

bcmills commented Jan 11, 2024

@golang/runtime, is this another symptom of #60449 or do we think it has a separate root cause?

@mknyszek
Copy link
Contributor

I believe it's another symptom. I recall investigating this and concluding that it's memory corruption. I double-checked just now and yeah, the failing line doesn't really make sense (that index is write-once, but if it was just allocated and the wrong index was being set up, then we'd be seeing these crashes in a lot more places).

@mknyszek
Copy link
Contributor

I added this as a condition to #60449, closing now as a duplicate.

@mknyszek mknyszek closed this as not planned Won't fix, can't repro, duplicate, stale Jan 11, 2024
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "darwin" && log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` && log ~ `SIGSEGV`
2024-01-22 20:52 darwin-amd64-11_0 tools@e2ca5942 go@a95136a8 x/tools/go/analysis/passes/stdmethods.TestAnalyzeEncodingXML (log)
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1026791]

runtime stack:
runtime.throw({0x12e4d8e?, 0x14b5700?})
	/tmp/buildlet/go/src/runtime/panic.go:1047 +0x5d fp=0x7ffeefbff6c8 sp=0x7ffeefbff698 pc=0x103535d
runtime.sigpanic()
	/tmp/buildlet/go/src/runtime/signal_unix.go:825 +0x3e9 fp=0x7ffeefbff728 sp=0x7ffeefbff6c8 pc=0x104c409
runtime.(*mheap).allocNeedsZero(0xc00c100000?, 0x7c?, 0x180?)
	/tmp/buildlet/go/src/runtime/mheap.go:1021 +0x71 fp=0x7ffeefbff748 sp=0x7ffeefbff728 pc=0x1026791
...
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages.go:758 +0xd77 fp=0xc00650dc48 sp=0xc00650d9d8 pc=0x1258317
golang.org/x/tools/go/packages.Load(0xc0003c12c0?, {0xc007dd4a70, 0x1, 0x1})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/packages/packages.go:249 +0x2c7 fp=0xc00650dcc0 sp=0xc00650dc48 pc=0x12566e7
golang.org/x/tools/go/analysis/analysistest.loadPackages(0x14b03e0, {0x0, 0x0}, {0xc007dd4a70, 0x1, 0x1})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:375 +0x29a fp=0xc00650de50 sp=0xc00650dcc0 pc=0x126361a
golang.org/x/tools/go/analysis/analysistest.Run({0x13375a0, 0xc007abb860}, {0x0, 0x0}, 0x14b03e0, {0xc007dd4a70, 0x1, 0x1})
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/analysis/analysistest/analysistest.go:322 +0xbf fp=0xc00650df18 sp=0xc00650de50 pc=0x1262fbf
golang.org/x/tools/go/analysis/passes/stdmethods_test.TestAnalyzeEncodingXML(0x100523d?)
	/tmp/buildlet/gopath/src/golang.org/x/tools/go/analysis/passes/stdmethods/stdmethods_test.go:20 +0x5f fp=0xc00650df70 sp=0xc00650df18 pc=0x126673f
testing.tRunner(0xc007abb860, 0x12ec930)

watchflakes

@gopherbot gopherbot reopened this Jan 24, 2024
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. OS-Darwin
Projects
None yet
Development

No branches or pull requests

5 participants