Open eliasnaur opened 6 years ago
Interestingly, this looks like something that @aclements was just talking about: stack growth in the signal handler. I think the traceback is failing to correctly trace past the sigpanic
call inserted by the signal handler.
If I'm right, this is not a regression, and it's hard to fix, so although I just set the milestone to 1.10 I'm going to redirect to 1.11.
Thanks. If you're right, the issue title is misleading. Feel free to update it to whatever makes more sense.
I agree with Ian that the trace past sigpanic
is clearly wrong. The argument to exitsyscall
is never 0x3b, and if it had panicked at the claimed line, throwsplit would have been set and newstack
would have aborted much earlier, so even the saved LR traceback got from the sigpanic
frame is wrong.
Given that the traceback print is failing, it's no surprise that stack growth is panicking. This is eerily similar to #21431, which is almost certainly also involves traceback failing around a sigpanic, this time on mipsle. Maybe we're just setting up our injected sigpanic calls slightly wrong on LR machines? I thought surely we'd have a test for this, but I can't actually find one.
Change https://golang.org/cl/89016 mentions this issue: runtime: print hexdump on traceback failure
I'm not sure this is the same issue, but here's another with hexdump included:
https://build.golang.org/log/cdc05ec757bc1a3625a1ae212dd827691c26a3be
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1005773a4]
goroutine 39 [running]:
sync.(*WaitGroup).state(...)
/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/sync/waitgroup.go:33
sync.(*WaitGroup).Add(0x0, 0x1)
/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/sync/waitgroup.go:54 +0x18
log/syslog.runStreamSyslog(0x0, 0x0, 0x10046fd9c, 0x0)
/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/log/syslog/syslog_test.go:73 +0x34
runtime: unexpected return pc for log/syslog.startServer.func2 called from 0xd
stack: frame={sp:0x1300d8780, fp:0x1300d87b0} stack=[0x1300d8000,0x1300d8800)
00000001300d8680: 00000001004a1874 <runtime.sigpanic+308> 000000010059e4e0
00000001300d8690: 000000010069f170 00000001300f4b00
00000001300d86a0: 00000001004bd8b8 <sync.(*WaitGroup).Add+24> 0000000130070a80
00000001300d86b0: 0000000000000001 000000013000e0a0
00000001300d86c0: 0000000100569b64 <net.(*TCPListener).Accept+52> 00000001300f4b00
00000001300d86d0: 000000013000e0a0 0000000130070a80
00000001300d86e0: 0000000000000000 00000001005773a4 <log/syslog.runStreamSyslog+52>
00000001300d86f0: 00000001005773a4 <log/syslog.runStreamSyslog+52> 0000000130092050
00000001300d8700: 00000001005773a4 <log/syslog.runStreamSyslog+52> 0000000000000000
00000001300d8710: 0000000000000000 0000000000000020
00000001300d8720: 0000000130070a80 00000001005773dc <log/syslog.runStreamSyslog+108>
00000001300d8730: 0000000100579b38 <log/syslog.startServer.func2+104> 0000000000000000
00000001300d8740: 0000000000000001 000000013000e0a0
00000001300d8750: 0000000000000000 0000000000000000
00000001300d8760: 00000001004a0c20 <runtime.sighandler+0> 0000000100658218
00000001300d8770: 00000001005e7640 000000013000e0a0
00000001300d8780: <000000000000000d 0000000000000000
00000001300d8790: 0000000000000000 000000010046fd9c <runtime.mallocgc+1100>
00000001300d87a0: 0000000000000000 0000000000000000
00000001300d87b0: >0000000000000000 0000000000000000
00000001300d87c0: 0000000000000000 0000000000000000
00000001300d87d0: 0000000000000000 0000000000000000
00000001300d87e0: 0000000000000000 0000000000000000
00000001300d87f0: 00000001300d8780 0000000000000000
log/syslog.startServer.func2(0x0, 0x0, 0x0, 0x0)
/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/log/syslog/syslog_test.go:130 +0x68
created by log/syslog.startServer
/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/log/syslog/syslog_test.go:128 +0x370
Process 489 exited with status = 2 (0x00000002)
go_darwin_arm_exec: test timeout (test completion)
And another:
https://build.golang.org/log/6063e6e67248b01c9eb0100afc611ac23e203797
2018/04/14 12:57:43 http: WriteHeader called with X-Content-Type-Options:nosniff but no Content-Type
2018/04/14 12:57:43 http: TLS handshake error from 127.0.0.1:52401: remote error: tls: bad certificate
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x10118fd78]
goroutine 3694 [running]:
net/http.(*Server).getDoneChan(0x56000080, 0x0)
/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/net/http/server.go:2495 +0x1c
net/http.(*Server).Serve(0x56000080, 0xfffffffffed741b4, 0xd4251a, 0xf7269f6f7e7f9, 0xffee5113709a7598)
/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/net/http/server.go:2777 +0x270
runtime: unexpected return pc for runtime.sighandler called from 0x10153f614
stack: frame={sp:0x130489fa0, fp:0x130489fa0} stack=[0x130489000,0x13048a000)
0000000130489ea0: 000000010118fd78 <net/http.(*Server).Serve+624> 00000001013187a0
0000000130489eb0: 000000010118fd78 <net/http.(*Server).Serve+624> 00000001013f03a0
0000000130489ec0: 000000013002c120 0000000130489ef8
0000000130489ed0: 00000001013f03a0 000000013002c120
0000000130489ee0: 0000000100f7bce8 <runtime.sighandler+0> 0000000056000080
0000000130489ef0: 0000000000000000 0000000000000000
0000000130489f00: 00000001013f0560 000000013039b1d0
0000000130489f10: 0000000000000000 00000001010f8a00 <vendor/golang_org/x/crypto/curve25519.feMul+360>
0000000130489f20: 0000000000000000 0000000000000000
0000000130489f30: 0000000000000000 0000000000000000
0000000130489f40: 00000001013f0560 0000000000000000
0000000130489f50: 0000000000000000 0000000000000000
0000000130489f60: 000000013039b1d0 0000000000000000
0000000130489f70: 0000000130489f00 0000000000000000
0000000130489f80: 0000000000000000 0000000000000000
0000000130489f90: 0000000000000330 0000000130489fa0
0000000130489fa0: >000000010153f614 0000000056000080
0000000130489fb0: fffffffffed741b4 0000000000d4251a
0000000130489fc0: 000f7269f6f7e7f9 ffee5113709a7598
0000000130489fd0: ffd8b76fa340bae4 000000000002bd35
0000000130489fe0: 00008d3520d782dc 00000000022e67ab
0000000130489ff0: ffffffffff624c7f 000000000030eef2
created by net/http/httptest.(*Server).goServe
/private/var/folders/f6/d2bhfqss2716nxm8gkv1fmb80000gn/T/workdir-host-darwin-amd64-eliasnaur-ios/go/src/net/http/httptest/server.go:278 +0x50
Process 514 exited with status = 2 (0x00000002)
Bumping to 1.13, as it made its way from 1.10 already.
@ianlancetaylor @aclements If you think this should be a release-blocker for 1.12, please let us know.
I ran greplogs -dashboard -E "unexpected return pc" -E "sigpanic" -l
and poked at the builds to see if this was still relevant.
It's been months since we've seen anything like this on the bots, except for two very recent failures which look similar but could be unrelated to whatever happened last year.
2019-05-08T17:03:20-7f5434c/darwin-arm64-corellium
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x0]
goroutine 326 [running]:
runtime: unexpected return pc for runtime.sigpanic called from 0x0
stack: frame={sp:0x1302bd050, fp:0x1302bd080} stack=[0x1302bc000,0x1302be000)
00000001302bcf50: 00000001302bcf68 00000001302bcf90
00000001302bcf60: 0000000100b65e38 <runtime.fatalpanic+80> 00000001304e6900
00000001302bcf70: 0000000100b65908 <runtime.gopanic+704> 00000001302bcf88
00000001302bcf80: 00000001011b7500 0000000100b8bd18 <runtime.fatalpanic.func1+0>
00000001302bcf90: 00000001302bd020 000000013020db00
00000001302bcfa0: 0000000100b65908 <runtime.gopanic+704> 00000001302bcfc0
00000001302bcfb0: 00000001302bcf80 0000000000000000
00000001302bcfc0: 0000000100b79ff0 <runtime.sigpanic+920> 00000001302bd020
00000001302bcfd0: 000000010110a520 00000001300ccb30
00000001302bcfe0: 0000000800000008 0000000100ee828c <cmd/go/internal/work.(*Builder).Do.func2+52>
00000001302bcff0: 0000000000000000 00000001302bdf10
00000001302bd000: 000000013020db00 0000000000000000
00000001302bd010: 00000001300ccb00 000000013020db28
00000001302bd020: 0000000000000000 0000000100fc57e0
00000001302bd030: 0000000130268980 0000000000000000
00000001302bd040: 0000000000000000 0000000000000000
00000001302bd050: <0000000000000000 0000000100ff17a0
00000001302bd060: 0000000101521400 0000000000000000
00000001302bd070: 0000000000000ac0 0000000000000000
00000001302bd080: >0000000000000000 0000000000000101
00000001302bd090: 0000000100eb8f50 <cmd/go/internal/work.(*Builder).fileHash+40> 00000001303b4780
00000001302bd0a0: 000000013044d000 0000000000000000
00000001302bd0b0: 0000000000000020 000000013044d000
00000001302bd0c0: 0000000000000020 0000000000000020
00000001302bd0d0: 0000000000000a91 0000000000000000
00000001302bd0e0: 0000000000000000 000000013033bf05
00000001302bd0f0: 000000013025c525 000000000000000d
00000001302bd100: 0000000000000000 87b195255ba121e0
00000001302bd110: 0000000100b9d473 <sync.(*Pool).Put+59> 000000000000002f
00000001302bd120: 0000000000000051 0000000000000000
00000001302bd130: 0000000000000000 0000000000000000
00000001302bd140: 0000000000000000 0000000130019600
00000001302bd150: 0000000000000052 0000000000000052
00000001302bd160: 00000001303b4780 0000000000000000
00000001302bd170: 000000013044d000 0000000000000052
panic(0x100ff17a0, 0x101521400)
/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/panic.go:662 +0x2c0
runtime: unexpected return pc for runtime.sigpanic called from 0x0
stack: frame={sp:0x1302bd050, fp:0x1302bd080} stack=[0x1302bc000,0x1302be000)
00000001302bcf50: 00000001302bcf68 00000001302bcf90
00000001302bcf60: 0000000100b65e38 <runtime.fatalpanic+80> 00000001304e6900
00000001302bcf70: 0000000100b65908 <runtime.gopanic+704> 00000001302bcf88
00000001302bcf80: 00000001011b7500 0000000100b8bd18 <runtime.fatalpanic.func1+0>
00000001302bcf90: 00000001302bd020 000000013020db00
00000001302bcfa0: 0000000100b65908 <runtime.gopanic+704> 00000001302bcfc0
00000001302bcfb0: 00000001302bcf80 0000000000000000
00000001302bcfc0: 0000000100b79ff0 <runtime.sigpanic+920> 00000001302bd020
00000001302bcfd0: 000000010110a520 00000001300ccb30
00000001302bcfe0: 0000000800000008 0000000100ee828c <cmd/go/internal/work.(*Builder).Do.func2+52>
00000001302bcff0: 0000000000000000 00000001302bdf10
00000001302bd000: 000000013020db00 0000000000000000
00000001302bd010: 00000001300ccb00 000000013020db28
00000001302bd020: 0000000000000000 0000000100fc57e0
00000001302bd030: 0000000130268980 0000000000000000
00000001302bd040: 0000000000000000 0000000000000000
00000001302bd050: <0000000000000000 0000000100ff17a0
00000001302bd060: 0000000101521400 0000000000000000
00000001302bd070: 0000000000000ac0 0000000000000000
00000001302bd080: >0000000000000000 0000000000000101
00000001302bd090: 0000000100eb8f50 <cmd/go/internal/work.(*Builder).fileHash+40> 00000001303b4780
00000001302bd0a0: 000000013044d000 0000000000000000
00000001302bd0b0: 0000000000000020 000000013044d000
00000001302bd0c0: 0000000000000020 0000000000000020
00000001302bd0d0: 0000000000000a91 0000000000000000
00000001302bd0e0: 0000000000000000 000000013033bf05
00000001302bd0f0: 000000013025c525 000000000000000d
00000001302bd100: 0000000000000000 87b195255ba121e0
00000001302bd110: 0000000100b9d473 <sync.(*Pool).Put+59> 000000000000002f
00000001302bd120: 0000000000000051 0000000000000000
00000001302bd130: 0000000000000000 0000000000000000
00000001302bd140: 0000000000000000 0000000130019600
00000001302bd150: 0000000000000052 0000000000000052
00000001302bd160: 00000001303b4780 0000000000000000
00000001302bd170: 000000013044d000 0000000000000052
runtime.panicmem(...)
/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/panic.go:183
runtime.sigpanic()
/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/runtime/signal_unix.go:391 +0x398
created by cmd/go/internal/work.(*Builder).Do
/private/var/tmp/workdir-host-darwin-arm64-corellium-ios/go/src/cmd/go/internal/work/exec.go:150 +0x328
2019/05/08 17:36:18 Failed: exit status 2
2019-05-02T23:12:11-16bf0d5/plan9-arm
panic: runtime error: invalid memory address or nil pointer dereference
[signal sys: trap: fault read code=0x0 addr=0x0 pc=0x0]
goroutine 1321 [running]:
runtime: unexpected return pc for runtime.sigpanic called from 0x0
stack: frame={sp:0x111875e4, fp:0x11187618} stack=[0x11168000,0x11188000)
11187564: 11187574 00000000 00000000 0002d554 <runtime.fatalpanic+80>
11187574: 0002d010 <runtime.gopanic+704> 11187584 11050078 005a3200
11187584: 0005181c <runtime.fatalpanic.func1+0> 111875d0 10df36c0 0002d010 <runtime.gopanic+704>
11187594: 1118759c 11187580 00029f40 <runtime.sigpanic+688> 111875d0
111875a4: 0050f5a0 10d9567c 00000004 00000004
111875b4: 0038ea40 <cmd/go/internal/work.(*Builder).Do.func2+44> 004ca05c 11187f84 10df36c0
111875c4: 00000000 10d95660 10df36d4 00000000
111875d4: 00465b90 11050078 00000000 00000000
111875e4: <00000000 0047a6a8 0085e388 00000000
111875f4: 00000000 00000016 10df36c0 00000023
11187604: 10c12300 10df36c0 10c12300 10c12300
11187614: 00000023 >00000000 00000000 00000000
11187624: 00000000 00000000 00000000 00000000
11187634: 00000000 00000000 00000000 00000000
11187644: 00000000 00000000 00000000 00000000
11187654: 00000000 00000000 00000000 00000000
11187664: 00000000 00000000 00000000 00000000
11187674: 00000000 00000000 00000000 00000000
11187684: 00000000 00000000 00000000 00000000
11187694: 00000000
panic(0x47a6a8, 0x85e388)
/tmp/workdir-rpi32/go/src/runtime/panic.go:662 +0x2c0
runtime: unexpected return pc for runtime.sigpanic called from 0x0
stack: frame={sp:0x111875e4, fp:0x11187618} stack=[0x11168000,0x11188000)
11187564: 11187574 00000000 00000000 0002d554 <runtime.fatalpanic+80>
11187574: 0002d010 <runtime.gopanic+704> 11187584 11050078 005a3200
11187584: 0005181c <runtime.fatalpanic.func1+0> 111875d0 10df36c0 0002d010 <runtime.gopanic+704>
11187594: 1118759c 11187580 00029f40 <runtime.sigpanic+688> 111875d0
111875a4: 0050f5a0 10d9567c 00000004 00000004
111875b4: 0038ea40 <cmd/go/internal/work.(*Builder).Do.func2+44> 004ca05c 11187f84 10df36c0
111875c4: 00000000 10d95660 10df36d4 00000000
111875d4: 00465b90 11050078 00000000 00000000
111875e4: <00000000 0047a6a8 0085e388 00000000
111875f4: 00000000 00000016 10df36c0 00000023
11187604: 10c12300 10df36c0 10c12300 10c12300
11187614: 00000023 >00000000 00000000 00000000
11187624: 00000000 00000000 00000000 00000000
11187634: 00000000 00000000 00000000 00000000
11187644: 00000000 00000000 00000000 00000000
11187654: 00000000 00000000 00000000 00000000
11187664: 00000000 00000000 00000000 00000000
11187674: 00000000 00000000 00000000 00000000
11187684: 00000000 00000000 00000000 00000000
11187694: 00000000
runtime.panicmem(...)
/tmp/workdir-rpi32/go/src/runtime/panic.go:183
runtime.sigpanic()
/tmp/workdir-rpi32/go/src/runtime/os_plan9.go:96 +0x2b0
created by cmd/go/internal/work.(*Builder).Do
/tmp/workdir-rpi32/go/src/cmd/go/internal/work/exec.go:150 +0x308
2019/05/03 10:11:59 Failed: exit status: 'go 101647: 2'
The next builds that match are from November and are mainly from windows-arm and windows-amd64-race. They don't really seem relevant. Those are the only failures until back to September.
@aclements @mknyszek is still a blocker for 1.13?
There haven't been any other crashes outside of plan9
since May 8th, using the same greplogs
command as before.
The darwin-arm64-correllium
builder has also been failing for other reasons (#32324, #32026), so that failure on May 8th could instead be related to that. I don't have any reason to believe these recent failures are the same as when this issue was originally filed >1 year ago, though.
Maybe we should just retire this issue and file a new one for the May 8th failure (and maybe for the plan9 failures?)? The builders which were originally failing here no longer exist (darwin-arm64-a1549ios
) and I suspect the other iOS builders have taken their place.
From https://build.golang.org/log/6864350004c318139a5516a5b65d5099a88a0272:
The stack looks interesting to me. @aclements ?