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

net/http/pprof: consistently failing with unexpected signal during runtime execution on plan9-amd64-0intro #60254

Closed
bcmills opened this issue May 17, 2023 · 2 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented May 17, 2023

#!watchflakes
post <- goos == "plan9" && goarch == "amd64" && pkg == "net/http/pprof" && `unexpected signal during runtime execution`

https://build.golang.org/log/2e297537e3f24155c6ecb5139c2bcc1417279ce4:

fatal error: unexpected signal during runtime execution
[signal sys: trap: code=0x0 addr=0x0 pc=0x257227]

runtime stack:
runtime.throw({0x537f29?, 0x45b7b028?})
	/tmp/workdir-gnot/go/src/runtime/panic.go:1077 +0x65 fp=0x7fffffffe968 sp=0x7fffffffe938 pc=0x236e45
runtime.sigpanic()
	/tmp/workdir-gnot/go/src/runtime/os_plan9.go:75 +0x48c fp=0x7fffffffe9e8 sp=0x7fffffffe968 pc=0x232fcc
runtime.fpTracebackPCs(...)
	/tmp/workdir-gnot/go/src/runtime/trace.go:954
runtime.traceStackID(0x4b99f63c9f6?, {0x45b7b018, 0x7fffffffea78?, 0x80}, 0x2000120?)
	/tmp/workdir-gnot/go/src/runtime/trace.go:928 +0x207 fp=0x7fffffffea30 sp=0x7fffffffe9e8 pc=0x257227
runtime.traceEventLocked(0x9000?, 0x10?, 0x48006d00?, 0x4803d1d0, 0x4, 0x0, 0x1, {0x7fffffffeb80, 0x1, 0x1})
	/tmp/workdir-gnot/go/src/runtime/trace.go:771 +0x292 fp=0x7fffffffeaa8 sp=0x7fffffffea30 pc=0x256972
runtime.traceEvent(0x1d?, 0x1, {0x7fffffffeb80, 0x1, 0x1})
	/tmp/workdir-gnot/go/src/runtime/trace.go:703 +0xa9 fp=0x7fffffffeb10 sp=0x7fffffffeaa8 pc=0x256669
runtime.traceGomaxprocs(...)
	/tmp/workdir-gnot/go/src/runtime/trace.go:1426
runtime.procresize(0x1)
	/tmp/workdir-gnot/go/src/runtime/proc.go:5013 +0x70 fp=0x7fffffffebd0 sp=0x7fffffffeb10 pc=0x242e70
runtime.startTheWorldWithSema(0x0)
	/tmp/workdir-gnot/go/src/runtime/proc.go:1351 +0x7d fp=0x7fffffffec38 sp=0x7fffffffebd0 pc=0x23bc5d
runtime.startTheWorld.func1()
	/tmp/workdir-gnot/go/src/runtime/proc.go:1187 +0x15 fp=0x7fffffffec50 sp=0x7fffffffec38 pc=0x25f9b5
runtime.systemstack()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:509 +0x4d fp=0x7fffffffec60 sp=0x7fffffffec50 pc=0x26506d

goroutine 18 [running]:
runtime.systemstack_switch()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:474 +0x8 fp=0x48236c58 sp=0x48236c48 pc=0x265008
runtime.startTheWorld()
	/tmp/workdir-gnot/go/src/runtime/proc.go:1187 +0x25 fp=0x48236c88 sp=0x48236c58 pc=0x23b725
runtime.startTheWorldGC()
	/tmp/workdir-gnot/go/src/runtime/proc.go:1220 +0x13 fp=0x48236cb0 sp=0x48236c88 pc=0x23b873
runtime.StartTrace()
	/tmp/workdir-gnot/go/src/runtime/trace.go:336 +0x2f6 fp=0x48236d38 sp=0x48236cb0 pc=0x255756
runtime/trace.Start({0x45d969d8?, 0x48029580})
	/tmp/workdir-gnot/go/src/runtime/trace/trace.go:125 +0xa8 fp=0x48236d90 sp=0x48236d38 pc=0x2c7a68
net/http/pprof.Trace({0x5af9a0, 0x48029580}, 0x480306f0?)
	/tmp/workdir-gnot/go/src/net/http/pprof/pprof.go:170 +0x29d fp=0x48236e28 sp=0x48236d90 pc=0x49c4fd
net/http/pprof.TestHandlers.func1(0x480e3520)
	/tmp/workdir-gnot/go/src/net/http/pprof/pprof_test.go:60 +0x118 fp=0x48236f70 sp=0x48236e28 pc=0x49eef8
testing.tRunner(0x480e3520, 0x48022d90)
	/tmp/workdir-gnot/go/src/testing/testing.go:1595 +0x139 fp=0x48236fc0 sp=0x48236f70 pc=0x2d48d9
testing.(*T).Run.func1()
	/tmp/workdir-gnot/go/src/testing/testing.go:1648 +0x25 fp=0x48236fe0 sp=0x48236fc0 pc=0x2d5905
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x48236fe8 sp=0x48236fe0 pc=0x266e81
created by testing.(*T).Run in goroutine 9
	/tmp/workdir-gnot/go/src/testing/testing.go:1648 +0x3bd

goroutine 1 [chan receive]:
runtime.gopark(0x480b99e0?, 0x20cbea?, 0x80?, 0xa1?, 0x18?)
	/tmp/workdir-gnot/go/src/runtime/proc.go:387 +0xce fp=0x4823d978 sp=0x4823d958 pc=0x2396ee
runtime.chanrecv(0x48062380, 0x480b9a5f, 0x1)
	/tmp/workdir-gnot/go/src/runtime/chan.go:583 +0x3cd fp=0x4823d9f0 sp=0x4823d978 pc=0x20536d
runtime.chanrecv1(0x83dcc0?, 0x4c1880?)
	/tmp/workdir-gnot/go/src/runtime/chan.go:442 +0x12 fp=0x4823da18 sp=0x4823d9f0 pc=0x204f92
testing.(*T).Run(0x48007860, {0x52af8b?, 0x175f5203c198a962?}, 0x55b3d8)
	/tmp/workdir-gnot/go/src/testing/testing.go:1649 +0x3d8 fp=0x4823dad8 sp=0x4823da18 pc=0x2d5798
testing.runTests.func1(0x83eb40?)
	/tmp/workdir-gnot/go/src/testing/testing.go:2054 +0x3e fp=0x4823db28 sp=0x4823dad8 pc=0x2d7a5e
testing.tRunner(0x48007860, 0x480b9c40)
	/tmp/workdir-gnot/go/src/testing/testing.go:1595 +0x139 fp=0x4823db78 sp=0x4823db28 pc=0x2d48d9
testing.runTests(0x4807db80?, {0x837740, 0x3, 0x3}, {0x21303f?, 0x480b9d00?, 0x83e3a0?})
	/tmp/workdir-gnot/go/src/testing/testing.go:2052 +0x465 fp=0x4823dc70 sp=0x4823db78 pc=0x2d7945
testing.(*M).Run(0x4807db80)
	/tmp/workdir-gnot/go/src/testing/testing.go:1925 +0x6d3 fp=0x4823deb8 sp=0x4823dc70 pc=0x2d6233
main.main()
	_testmain.go:51 +0x19c fp=0x4823df38 sp=0x4823deb8 pc=0x4a117c
runtime.main()
	/tmp/workdir-gnot/go/src/runtime/proc.go:256 +0x2dd fp=0x4823dfe0 sp=0x4823df38 pc=0x23929d
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x4823dfe8 sp=0x4823dfe0 pc=0x266e81

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/tmp/workdir-gnot/go/src/runtime/proc.go:387 +0xce fp=0x4804ffa0 sp=0x4804ff80 pc=0x2396ee
runtime.goparkunlock(...)
	/tmp/workdir-gnot/go/src/runtime/proc.go:393
runtime.forcegchelper()
	/tmp/workdir-gnot/go/src/runtime/proc.go:311 +0xa7 fp=0x4804ffe0 sp=0x4804ffa0 pc=0x239527
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x4804ffe8 sp=0x4804ffe0 pc=0x266e81
created by runtime.init.6 in goroutine 1
	/tmp/workdir-gnot/go/src/runtime/proc.go:299 +0x1a

goroutine 3 [runnable]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/tmp/workdir-gnot/go/src/runtime/proc.go:387 +0xce fp=0x48050f78 sp=0x48050f58 pc=0x2396ee
runtime.goparkunlock(...)
	/tmp/workdir-gnot/go/src/runtime/proc.go:393
runtime.bgsweep(0x0?)
	/tmp/workdir-gnot/go/src/runtime/mgcsweep.go:280 +0x94 fp=0x48050fc8 sp=0x48050f78 pc=0x224754
runtime.gcenable.func1()
	/tmp/workdir-gnot/go/src/runtime/mgc.go:178 +0x25 fp=0x48050fe0 sp=0x48050fc8 pc=0x219545
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x48050fe8 sp=0x48050fe0 pc=0x266e81
created by runtime.gcenable in goroutine 1
	/tmp/workdir-gnot/go/src/runtime/mgc.go:178 +0x66

goroutine 4 [GC scavenge wait]:
runtime.gopark(0x48062000?, 0x5aa268?, 0x0?, 0x0?, 0x0?)
	/tmp/workdir-gnot/go/src/runtime/proc.go:387 +0xce fp=0x48051f70 sp=0x48051f50 pc=0x2396ee
runtime.goparkunlock(...)
	/tmp/workdir-gnot/go/src/runtime/proc.go:393
runtime.(*scavengerState).park(0x83e4a0)
	/tmp/workdir-gnot/go/src/runtime/mgcscavenge.go:425 +0x49 fp=0x48051fa0 sp=0x48051f70 pc=0x221f89
runtime.bgscavenge(0x0?)
	/tmp/workdir-gnot/go/src/runtime/mgcscavenge.go:658 +0x59 fp=0x48051fc8 sp=0x48051fa0 pc=0x222599
runtime.gcenable.func2()
	/tmp/workdir-gnot/go/src/runtime/mgc.go:179 +0x25 fp=0x48051fe0 sp=0x48051fc8 pc=0x2194e5
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x48051fe8 sp=0x48051fe0 pc=0x266e81
created by runtime.gcenable in goroutine 1
	/tmp/workdir-gnot/go/src/runtime/mgc.go:179 +0xa5

goroutine 5 [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/tmp/workdir-gnot/go/src/runtime/proc.go:387 +0xce fp=0x4804ae28 sp=0x4804ae08 pc=0x2396ee
runtime.runfinq()
	/tmp/workdir-gnot/go/src/runtime/mfinal.go:193 +0x107 fp=0x4804afe0 sp=0x4804ae28 pc=0x2185a7
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x4804afe8 sp=0x4804afe0 pc=0x266e81
created by runtime.createfing in goroutine 1
	/tmp/workdir-gnot/go/src/runtime/mfinal.go:163 +0x3d

goroutine 7 [syscall]:
syscall.Syscall(0xe, 0x4802a3c0, 0x0, 0x0)
	/tmp/workdir-gnot/go/src/syscall/asm_plan9_amd64.s:21 +0x10 fp=0x4804eae8 sp=0x4804ea30 pc=0x271090
syscall.open({0x4802a3a8?, 0x0?}, 0x4804eb98?)
	/tmp/workdir-gnot/go/src/syscall/zsyscall_plan9_amd64.go:61 +0x85 fp=0x4804eb60 sp=0x4804eae8 pc=0x270705
syscall.Open({0x4802a3a8, 0x11}, 0x7?)
	/tmp/workdir-gnot/go/src/syscall/syscall_plan9.go:396 +0xa9 fp=0x4804ebc8 sp=0x4804eb60 pc=0x2700c9
os.openFileNolog({0x4802a3a8, 0x11}, 0x0, 0x0)
	/tmp/workdir-gnot/go/src/os/file_plan9.go:119 +0xc8 fp=0x4804ec30 sp=0x4804ebc8 pc=0x28b768
os.OpenFile({0x4802a3a8, 0x11}, 0x0, 0x5298ed?)
	/tmp/workdir-gnot/go/src/os/file.go:334 +0x3e fp=0x4804ec68 sp=0x4804ec30 pc=0x28abfe
os.Open(...)
	/tmp/workdir-gnot/go/src/os/file.go:314
net.(*netFD).acceptPlan9(0x480000c0)
	/tmp/workdir-gnot/go/src/net/ipsock_plan9.go:262 +0x185 fp=0x4804edf8 sp=0x4804ec68 pc=0x3b2ea5
net.(*TCPListener).accept(0x48024460)
	/tmp/workdir-gnot/go/src/net/tcpsock_plan9.go:51 +0x1e fp=0x4804ee20 sp=0x4804edf8 pc=0x3bb47e
net.(*TCPListener).Accept(0x48024460)
	/tmp/workdir-gnot/go/src/net/tcpsock.go:315 +0x45 fp=0x4804ee50 sp=0x4804ee20 pc=0x3bad65
net/http.(*onceCloseListener).Accept(0x5affe8?)
	<autogenerated>:1 +0x24 fp=0x4804ee68 sp=0x4804ee50 pc=0x496c24
net/http.(*Server).Serve(0x480dc000, {0x5afcd0, 0x48024460})
	/tmp/workdir-gnot/go/src/net/http/server.go:3054 +0x3c8 fp=0x4804ef98 sp=0x4804ee68 pc=0x478048
net/http/httptest.(*Server).goServe.func1()
	/tmp/workdir-gnot/go/src/net/http/httptest/server.go:310 +0x70 fp=0x4804efe0 sp=0x4804ef98 pc=0x49b630
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x4804efe8 sp=0x4804efe0 pc=0x266e81
created by net/http/httptest.(*Server).goServe in goroutine 1
	/tmp/workdir-gnot/go/src/net/http/httptest/server.go:308 +0x65

goroutine 9 [chan receive]:
runtime.gopark(0x4804ba58?, 0x20cc18?, 0x30?, 0xa3?, 0x18?)
	/tmp/workdir-gnot/go/src/runtime/proc.go:387 +0xce fp=0x4804b9f0 sp=0x4804b9d0 pc=0x2396ee
runtime.chanrecv(0x48062770, 0x4804bad7, 0x1)
	/tmp/workdir-gnot/go/src/runtime/chan.go:583 +0x3cd fp=0x4804ba68 sp=0x4804b9f0 pc=0x20536d
runtime.chanrecv1(0x83dcc0?, 0x4c1880?)
	/tmp/workdir-gnot/go/src/runtime/chan.go:442 +0x12 fp=0x4804ba90 sp=0x4804ba68 pc=0x204f92
testing.(*T).Run(0x48007d40, {0x52d208?, 0x0?}, 0x48022d90)
	/tmp/workdir-gnot/go/src/testing/testing.go:1649 +0x3d8 fp=0x4804bb50 sp=0x4804ba90 pc=0x2d5798
net/http/pprof.TestHandlers(0x48007a00?)
	/tmp/workdir-gnot/go/src/net/http/pprof/pprof_test.go:57 +0x2e5 fp=0x4804bf70 sp=0x4804bb50 pc=0x49ed05
testing.tRunner(0x48007d40, 0x55b3d8)
	/tmp/workdir-gnot/go/src/testing/testing.go:1595 +0x139 fp=0x4804bfc0 sp=0x4804bf70 pc=0x2d48d9
testing.(*T).Run.func1()
	/tmp/workdir-gnot/go/src/testing/testing.go:1648 +0x25 fp=0x4804bfe0 sp=0x4804bfc0 pc=0x2d5905
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x4804bfe8 sp=0x4804bfe0 pc=0x266e81
created by testing.(*T).Run in goroutine 1
	/tmp/workdir-gnot/go/src/testing/testing.go:1648 +0x3bd

goroutine 16 [GC worker (idle)]:
runtime.gopark(0x4804cf80?, 0x175f5203fe2c476c?, 0x60?, 0xcf?, 0x27bd6f?)
	/tmp/workdir-gnot/go/src/runtime/proc.go:387 +0xce fp=0x4804cf40 sp=0x4804cf20 pc=0x2396ee
runtime.gcBgMarkWorker()
	/tmp/workdir-gnot/go/src/runtime/mgc.go:1297 +0xe5 fp=0x4804cfe0 sp=0x4804cf40 pc=0x21b305
runtime.goexit()
	/tmp/workdir-gnot/go/src/runtime/asm_amd64.s:1622 +0x1 fp=0x4804cfe8 sp=0x4804cfe0 pc=0x266e81
created by runtime.gcBgMarkStartWorkers in goroutine 15
	/tmp/workdir-gnot/go/src/runtime/mgc.go:1221 +0x1c
FAIL	net/http/pprof	1.143s

(attn @golang/plan9 @0intro)

@heschi heschi added the NeedsFix The path to resolution is known, but the work has not been done. label May 17, 2023
@heschi heschi added this to the Backlog milestone May 17, 2023
@gopherbot
Copy link

Change https://go.dev/cl/499036 mentions this issue: cmd/trace: disable frame pointer unwinding on plan9

@psilva261
Copy link
Member

Above is a CL which deactivates FP unwinding on Plan 9. Actually on plan9/arm64 the tests would pass. Maybe it is because BP is used for the syscall numbers in sys_plan9_amd64.s. I would have to look into this more closely. One option might be to save the registers before each syscall and restore them afterwards

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. OS-Plan9
Projects
Status: Done
Development

No branches or pull requests

4 participants