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: fatal error: invalid runtime symbol table (every time if binary is recompiled and old binary is still serving) #70287

Closed
theo-stv opened this issue Nov 11, 2024 · 10 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.

Comments

@theo-stv
Copy link

Go version

1.23.2

Output of go env in your module/workspace:

PS C:\Users\theo_\Desktop\Smartstream.TV\workspace\etrtbb-dsp\_gobuyer> go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=c:\Users\theo_\Desktop\Smartstream.TV\workspace\etrtbb-dsp\_gobuyer\bin
set GOCACHE=C:\Users\theo_\AppData\Local\go-build
set GOENV=C:\Users\theo_\AppData\Roaming\go\env
set GOEXE=
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=c:\Users\theo_\Desktop\Smartstream.TV\workspace\etrtbb-dsp\_gobuyer\pkg\cache
set GONOPROXY=
set GONOSUMDB=
set GOOS=linux
set GOPATH=""
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=off
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.23.2
set GODEBUG=
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\theo_\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\Users\theo_\Desktop\Smartstream.TV\workspace\etrtbb-dsp\_gobuyer\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\theo_\AppData\Local\Temp\go-build3201909343=/tmp/go-build -gno-record-gcc-switches
PS C:\Users\theo_\Desktop\Smartstream.TV\workspace\etrtbb-dsp\_gobuyer>

What did you do?

if the binary (a server) runs and I recompile it, then the binary crashes if it is receiving new requests. Strange, but I cannot explain.

What did you see happen?

runtime: invalid pc-encoded table f= pc=0x56f67f targetpc=0x980759 tab=[0/0]0x0
	value=2 until pc=0x56f5ee
	value=5 until pc=0x56f5f2
	value=2 until pc=0x56f5f4
	value=-1 until pc=0x56f5f6
	value=1 until pc=0x56f5f8
	value=3 until pc=0x56f5fa
	value=6 until pc=0x56f5fc
	value=9 until pc=0x56f600
	value=6 until pc=0x56f602
	value=3 until pc=0x56f604
	value=5 until pc=0x56f606
	value=7 until pc=0x56f608
	value=10 until pc=0x56f60a
	value=13 until pc=0x56f60e
	value=10 until pc=0x56f610
	value=7 until pc=0x56f612
	value=9 until pc=0x56f614
	value=11 until pc=0x56f616
	value=14 until pc=0x56f618
	value=17 until pc=0x56f61c
	value=19 until pc=0x56f61e
	value=21 until pc=0x56f620
	value=23 until pc=0x56f622
	value=25 until pc=0x56f624
	value=28 until pc=0x56f626
	value=25 until pc=0x56f632
	value=27 until pc=0x56f634
	value=29 until pc=0x56f636
	value=26 until pc=0x56f638
	value=23 until pc=0x56f63a
	value=25 until pc=0x56f63c
	value=27 until pc=0x56f63e
	value=24 until pc=0x56f640
	value=25 until pc=0x56f642
	value=27 until pc=0x56f644
	value=29 until pc=0x56f646
	value=26 until pc=0x56f648
	value=27 until pc=0x56f64c
	value=29 until pc=0x56f64e
	value=31 until pc=0x56f650
	value=33 until pc=0x56f652
	value=35 until pc=0x56f654
	value=36 until pc=0x56f656
	value=37 until pc=0x56f65e
	value=35 until pc=0x56f660
	value=32 until pc=0x56f668
	value=30 until pc=0x56f66a
	value=27 until pc=0x56f672
	value=25 until pc=0x56f674
	value=22 until pc=0x56f674
	value=39 until pc=0x56f677
	value=40 until pc=0x56f67a
	value=41 until pc=0x56f67f
fatal error: invalid runtime symbol table

runtime stack:
.procPin�{0xb9f8000000000046, 0x7900000000c00008})
�md64.s1067 +0x48 fp=0xc00008b9ea sp=0xc00008b9f0 pc=0x46f168
runtime: g 0: unexpected return pc for .procPin called from 0xf168000000c00008
stack: frame={sp:0xc00008b9f0, fp:0xc00008b9ea} stack=[0xc000088000,0xc00008c000)
0x000000c00008b8ea:  0xb960000000000000  0x832e000000c00008 
0x000000c00008b8fa:  0x0184000000000043  0x00000000000000ef 
0x000000c00008b90a:  0x4240000000000000  0x6c4000000000000f 
0x000000c00008b91a:  0xcc27000000c00000  0x03e8000000000043 
0x000000c00008b92a:  0x0004010000000000  0xb960000000000000 
0x000000c00008b93a:  0x80d7000000c00008  0xa8f4000000000043 
0x000000c00008b94a:  0xe670000000000043  0x6c40000000000103 
0x000000c00008b95a:  0xb9a0000000c00000  0x7dcb000000c00008 
0x000000c00008b96a:  0x6c40000000000043  0xf168000000c00000 
0x000000c00008b97a:  0xb9f0000000000046  0xb9f0000000c00008 
0x000000c00008b98a:  0xf168000000c00008  0x6c40000000000046 
0x000000c00008b99a:  0xb9e0000000c00000  0x7d38000000c00008 
0x000000c00008b9aa:  0xb9c0000000000043  0x6c40000000c00008 
0x000000c00008b9ba:  0x7d60000000c00000  0x6c40000000000043 
0x000000c00008b9ca:  0xf168000000c00000  0xb9f0000000000046 
0x000000c00008b9da:  0xba10000000c00008  0xf168000000c00008 
0x000000c00008b9ea: >0xb9f8000000000046  0x7900000000c00008 
0x000000c00008b9fa:  0xd5d1000000000043  0x001c0000000000ef 
0x000000c00008ba0a:  0xbae0000000000000  0x74c9000000c00008 
0x000000c00008ba1a:  0xd5d1000000000045  0x00000000000000ef 
0x000000c00008ba2a:  0x0000000000000000  0x9d7c000000000000 
0x000000c00008ba3a:  0x5a42000000000042  0xba68000000000009 
0x000000c00008ba4a:  0xea01000000c00008  0x0000000000290042 
0x000000c00008ba5a:  0x45b2000000000000  0x0001000000000045 
0x000000c00008ba6a:  0xf67f000000000000  0xf67f000000000056 
0x000000c00008ba7a:  0xb306000000000056  0xb306000000000022 
0x000000c00008ba8a:  0xf67f000000000022  0x0000000000000056 
0x000000c00008ba9a:  0x0000000000000000  0xfa38000000000000 
0x000000c00008baaa:  0x2560000000000155  0x1048000000000163 
0x000000c00008baba:  0xf67f000000000000  0x0000000000000056 
0x000000c00008baca:  0x6bd2000000000000  0x000000000000011f 
0x000000c00008bada:  0xbb48000000000000  0xaf73000000c00008 
0x000000c00008baea:  0x9198000000000045 

goroutine 5 gp=0xc000374540 m=3 mp=0xc00006ee08 [GC worker (active), 1 minutes]:
ime.reflectcall�)
�runtime/memmove_amd64.s479 +0x8 fp=0xc00006a738 sp=0xc00006a728 pc=0x474f68
runtime.gcBgMarkWorker�0xc000038af0)
�C:/Program Files/Go/src/runtime/mgc.go1423 +0x1e7 fp=0xc00006a7c8 sp=0xc00006a738 pc=0x41c587
runtime.gcBgMarkStartWorkers.gowrap1�)
�C:/Program Files/Go/src/runtime/mgc.go1279 +0x25 fp=0xc00006a7e0 sp=0xc00006a7c8 pc=0x41c365
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc00006a7e8 sp=0xc00006a7e0 pc=0x476e01
created by runtime.gcBgMarkStartWorkers in goroutine 1
�C:/Program Files/Go/src/runtime/mgc.go1279 +0x105

goroutine 1 gp=0xc0000061c0 m=nil [chan receive, 10 minutes]:
ime.procUnpin�0x53fca5?, 0xdf3240?, 0x1?, 0x8d?, 0xc0000abed0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc0003a9e40 sp=0xc0003a9e20 pc=0x46f28e
�0xc0001c47e0, 0x0, 0x1)
�C:/Program Files/Go/src/runtime/chan.go639 +0x41c fp=0xc0003a9eb8 sp=0xc0003a9e40 pc=0x409d7c
runtime.selectnbrecv�0xc0001c47e0?, 0xc0000abf20?)
�C:/Program Files/Go/src/runtime/chan.go489 +0x12 fp=0xc0003a9ee0 sp=0xc0003a9eb8 pc=0x409932
main.main�)
�C:/Users/theo_/Desktop/Smartstream.TV/workspace/etrtbb-dsp/_gobuyer/main.go72 +0x92 fp=0xc0003a9f50 sp=0xc0003a9ee0 pc=0xd0d972
runtime.main�)
�C:/Program Files/Go/src/runtime/proc.go272 +0x28b fp=0xc0003a9fe0 sp=0xc0003a9f50 pc=0x43aeeb
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc0003a9fe8 sp=0xc0003a9fe0 pc=0x476e01

goroutine 17 gp=0xc00009c380 m=nil [force gc (idle), 10 minutes]:
ime.procUnpin�0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc0000647a8 sp=0xc000064788 pc=0x46f28e
runtime.goparkunlock�...)
�C:/Program Files/Go/src/runtime/proc.go430
runtime.forcegchelper�)
�C:/Program Files/Go/src/runtime/proc.go337 +0xb3 fp=0xc0000647e0 sp=0xc0000647a8 pc=0x43b233
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc0000647e8 sp=0xc0000647e0 pc=0x476e01
created by runtime.init.7 in goroutine 1
�C:/Program Files/Go/src/runtime/proc.go325 +0x1a

goroutine 18 gp=0xc00009c540 m=nil [GC sweep wait, 1 minutes]:
ime.procUnpin�0x1793801?, 0x0?, 0x0?, 0x0?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc000064f80 sp=0xc000064f60 pc=0x46f28e
runtime.goparkunlock�...)
�C:/Program Files/Go/src/runtime/proc.go430
pt�0xc0000b2000)
�C:/Program Files/Go/src/runtime/mgcsweep.go317 +0xdf fp=0xc000064fc8 sp=0xc000064f80 pc=0x425a7f
runtime.gcenable.gowrap1�)
�C:/Program Files/Go/src/runtime/mgc.go203 +0x25 fp=0xc000064fe0 sp=0xc000064fc8 pc=0x41a165
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc000064fe8 sp=0xc000064fe0 pc=0x476e01
created by runtime.gcenable in goroutine 1
�C:/Program Files/Go/src/runtime/mgc.go203 +0x66

goroutine 19 gp=0xc00009c700 m=nil [GC scavenge wait]:
ime.procUnpin�0x10000?, 0x132e191?, 0x0?, 0x0?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc000065778 sp=0xc000065758 pc=0x46f28e
ep�...)
�C:/Program Files/Go/src/runtime/proc.go430
runtime.(*scavengerState).run�0x1794740)
�C:/Program Files/Go/src/runtime/mgcscavenge.go419 +0x49 fp=0xc0000657a8 sp=0xc000065778 pc=0x423469
eAlloc).scavengeOne�0xc0000b2000)
�C:/Program Files/Go/src/runtime/mgcscavenge.go658 +0x59 fp=0xc0000657c8 sp=0xc0000657a8 pc=0x4239f9
runtime.gcenable.gowrap2�)
�C:/Program Files/Go/src/runtime/mgc.go204 +0x25 fp=0xc0000657e0 sp=0xc0000657c8 pc=0x41a105
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc0000657e8 sp=0xc0000657e0 pc=0x476e01
created by runtime.gcenable in goroutine 1
�C:/Program Files/Go/src/runtime/mgc.go204 +0xa5

goroutine 33 gp=0xc000128000 m=nil [finalizer wait, 1 minutes]:
ime.procUnpin�0x0?, 0xf3f8a8?, 0xe0?, 0x7?, 0x2000000020?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc000068620 sp=0xc000068600 pc=0x46f28e
runtime.runfinq�)
�C:/Program Files/Go/src/runtime/mfinal.go193 +0x107 fp=0xc0000687e0 sp=0xc000068620 pc=0x4191e7
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc0000687e8 sp=0xc0000687e0 pc=0x476e01
created by runtime.createfing in goroutine 1
�C:/Program Files/Go/src/runtime/mfinal.go163 +0x3d

goroutine 2 gp=0xc000007180 m=nil [chan receive]:
ime.procUnpin�0xc000068f60?, 0x5d2265?, 0x60?, 0xdb?, 0x105f8c0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc000068f18 sp=0xc000068ef8 pc=0x46f28e
�0xc000038460, 0x0, 0x1)
�C:/Program Files/Go/src/runtime/chan.go639 +0x41c fp=0xc000068f90 sp=0xc000068f18 pc=0x409d7c
runtime.selectnbrecv�0x0?, 0x0?)
�C:/Program Files/Go/src/runtime/chan.go489 +0x12 fp=0xc000068fb8 sp=0xc000068f90 pc=0x409932
runtime.unique_runtime_registerUniqueMapCleanup.func1�...)
�C:/Program Files/Go/src/runtime/mgc.go1732
runtime.unique_runtime_registerUniqueMapCleanup.gowrap1�)
�C:/Program Files/Go/src/runtime/mgc.go1735 +0x2f fp=0xc000068fe0 sp=0xc000068fb8 pc=0x41d16f
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc000068fe8 sp=0xc000068fe0 pc=0x476e01
created by unique.runtime_registerUniqueMapCleanup in goroutine 1
�C:/Program Files/Go/src/runtime/mgc.go1730 +0x96

goroutine 3 gp=0xc0003741c0 m=nil [GC worker (idle), 1 minutes]:
ime.procUnpin�0x24efc236fb3f3?, 0x3?, 0x2a?, 0x13?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc000069738 sp=0xc000069718 pc=0x46f28e
runtime.gcBgMarkWorker�0xc000038af0)
�C:/Program Files/Go/src/runtime/mgc.go1363 +0xe9 fp=0xc0000697c8 sp=0xc000069738 pc=0x41c489
runtime.gcBgMarkStartWorkers.gowrap1�)
�C:/Program Files/Go/src/runtime/mgc.go1279 +0x25 fp=0xc0000697e0 sp=0xc0000697c8 pc=0x41c365
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc0000697e8 sp=0xc0000697e0 pc=0x476e01
created by runtime.gcBgMarkStartWorkers in goroutine 1
�C:/Program Files/Go/src/runtime/mgc.go1279 +0x105

goroutine 4 gp=0xc000374380 m=nil [GC worker (idle)]:
ime.procUnpin�0x17b92c0?, 0x3?, 0x39?, 0x42?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc000069f38 sp=0xc000069f18 pc=0x46f28e
runtime.gcBgMarkWorker�0xc000038af0)
�C:/Program Files/Go/src/runtime/mgc.go1363 +0xe9 fp=0xc000069fc8 sp=0xc000069f38 pc=0x41c489
runtime.gcBgMarkStartWorkers.gowrap1�)
�C:/Program Files/Go/src/runtime/mgc.go1279 +0x25 fp=0xc000069fe0 sp=0xc000069fc8 pc=0x41c365
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc000069fe8 sp=0xc000069fe0 pc=0x476e01
created by runtime.gcBgMarkStartWorkers in goroutine 1
�C:/Program Files/Go/src/runtime/mgc.go1279 +0x105

goroutine 6 gp=0xc000374700 m=nil [GC worker (idle), 1 minutes]:
ime.procUnpin�0x24efc35070010?, 0x3?, 0xba?, 0xc2?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc00006af38 sp=0xc00006af18 pc=0x46f28e
runtime.gcBgMarkWorker�0xc000038af0)
�C:/Program Files/Go/src/runtime/mgc.go1363 +0xe9 fp=0xc00006afc8 sp=0xc00006af38 pc=0x41c489
runtime.gcBgMarkStartWorkers.gowrap1�)
�C:/Program Files/Go/src/runtime/mgc.go1279 +0x25 fp=0xc00006afe0 sp=0xc00006afc8 pc=0x41c365
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc00006afe8 sp=0xc00006afe0 pc=0x476e01
created by runtime.gcBgMarkStartWorkers in goroutine 1
�C:/Program Files/Go/src/runtime/mgc.go1279 +0x105

goroutine 20 gp=0xc000128540 m=nil [sleep, 1 minutes]:
ime.procUnpin�0x24f17a31a14e4?, 0x40a2de?, 0xe0?, 0x80?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc0006a5ee8 sp=0xc0006a5ec8 pc=0x46f28e
.mapinitnoop�0x5f5e100)
�C:/Program Files/Go/src/runtime/time.go315 +0xf2 fp=0xc0006a5f20 sp=0xc0006a5ee8 pc=0x472ef2
github.com/rs/zerolog/diode/internal/diodes.(*Poller).Next�0xc000426990)
�op/Smartstream.TV/workspace/etrtbb-dsp/_gobuyer/pkg/cache/github.com/rs/zerolog@v1.33.0/diode/internal/diodes/waiter.go66 +0x25 fp=0xc0006a5f40 sp=0xc0006a5f20 pc=0xa30a45
github.com/rs/zerolog/diode.Writer.poll�{{0x1048a40, 0xc000126420}, {0x104dcb0, 0xc000426990}, 0xc0007887c0, 0xc000102460})
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go96 +0x72 fp=0xc0006a5fa0 sp=0xc0006a5f40 pc=0xa31cd2
github.com/rs/zerolog/diode.NewWriter.gowrap1�)
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go70 +0x34 fp=0xc0006a5fe0 sp=0xc0006a5fa0 pc=0xa31834
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc0006a5fe8 sp=0xc0006a5fe0 pc=0x476e01
created by github.com/rs/zerolog/diode.NewWriter in goroutine 1
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go70 +0x32e

goroutine 21 gp=0xc000128700 m=nil [sleep, 1 minutes]:
ime.procUnpin�0x24f17a319c739?, 0x40a2de?, 0x50?, 0x81?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc0005e3ee8 sp=0xc0005e3ec8 pc=0x46f28e
.mapinitnoop�0x5f5e100)
�C:/Program Files/Go/src/runtime/time.go315 +0xf2 fp=0xc0005e3f20 sp=0xc0005e3ee8 pc=0x472ef2
github.com/rs/zerolog/diode/internal/diodes.(*Poller).Next�0xc0004269f0)
�op/Smartstream.TV/workspace/etrtbb-dsp/_gobuyer/pkg/cache/github.com/rs/zerolog@v1.33.0/diode/internal/diodes/waiter.go66 +0x25 fp=0xc0005e3f40 sp=0xc0005e3f20 pc=0xa30a45
github.com/rs/zerolog/diode.Writer.poll�{{0x1048a40, 0xc000126480}, {0x104dcb0, 0xc0004269f0}, 0xc0007887e0, 0xc0001024d0})
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go96 +0x72 fp=0xc0005e3fa0 sp=0xc0005e3f40 pc=0xa31cd2
github.com/rs/zerolog/diode.NewWriter.gowrap1�)
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go70 +0x34 fp=0xc0005e3fe0 sp=0xc0005e3fa0 pc=0xa31834
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc0005e3fe8 sp=0xc0005e3fe0 pc=0x476e01
created by github.com/rs/zerolog/diode.NewWriter in goroutine 1
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go70 +0x32e

goroutine 22 gp=0xc0001288c0 m=nil [sleep, 1 minutes]:
ime.procUnpin�0x24f17a319b6c6?, 0x40a2de?, 0xc0?, 0x81?, 0x0?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc0006a1ee8 sp=0xc0006a1ec8 pc=0x46f28e
.mapinitnoop�0x5f5e100)
�C:/Program Files/Go/src/runtime/time.go315 +0xf2 fp=0xc0006a1f20 sp=0xc0006a1ee8 pc=0x472ef2
github.com/rs/zerolog/diode/internal/diodes.(*Poller).Next�0xc000426a50)
�op/Smartstream.TV/workspace/etrtbb-dsp/_gobuyer/pkg/cache/github.com/rs/zerolog@v1.33.0/diode/internal/diodes/waiter.go66 +0x25 fp=0xc0006a1f40 sp=0xc0006a1f20 pc=0xa30a45
github.com/rs/zerolog/diode.Writer.poll�{{0x1048a40, 0xc0001264e0}, {0x104dcb0, 0xc000426a50}, 0xc000788800, 0xc000102540})
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go96 +0x72 fp=0xc0006a1fa0 sp=0xc0006a1f40 pc=0xa31cd2
github.com/rs/zerolog/diode.NewWriter.gowrap1�)
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go70 +0x34 fp=0xc0006a1fe0 sp=0xc0006a1fa0 pc=0xa31834
.gcWriteBarrier6�{})
�runtime/memmove_amd64.s1700 +0x1 fp=0xc0006a1fe8 sp=0xc0006a1fe0 pc=0x476e01
created by github.com/rs/zerolog/diode.NewWriter in goroutine 1
�/workspace/etrtbb-dsp/_gobuyer/pkg/cache/gopkg.in/natefinch/lumberjack.v2@v2.2.1/chown_linux.go70 +0x32e

goroutine 23 gp=0xc000128a80 m=nil [select (scan), 1 minutes]:
ime.procUnpin�0xc00091ac48?, 0x2?, 0xd8?, 0x97?, 0xc00091aaf8?)
�C:/Program Files/Go/src/runtime/proc.go424 +0xce fp=0xc000ce2990 sp=0xc000ce2970 pc=0x46f28e
emacquire1�0xc000ce2c48, 0xc00091aaf4, 0xd?, 0x0, 0x0?, 0x1)
�ind.go335 +0x7a5 fp=0xc000ce2ab8 sp=0xc000ce2990 pc=0x44cd65
net.(*Resolver).lookupIPAddr�0x1793900, {0x104e980, 0xc000ca0a80}, {0xee7202, 0x3}, {0xeeeea3, 0x9})
�Go/src/syscall/syscall_unix.go342 +0x3d9 fp=0xc000ce2ca0 sp=0xc000ce2ab8 pc=0x5f5cd9
net.(*Resolver).internetAddrList�0x1793900?, {0x104e980?, 0xc000ca0a80?}, {0xee7202, 0x3}, {0xeeeea3?, 0x10?})
� Files/Go/src/os/file_posix.go289 +0x4c5 fp=0xc000ce2d98 sp=0xc000ce2ca0 pc=0x5f3945
ialer).MultipathTCP�0x1793900, {0x104e980, 0xc000ca0a80}, {0xee780d, 0x4}, {0xee7202?, 0x0?}, {0xeeeea3, 0xe}, {0x0, ...})
�ogram Files/Go/src/internal/bytealg/compare_native.go302 +0x3e5 fp=0xc000ce2e98 sp=0xc000ce2d98 pc=0x5de4c5
ay�0xc000ce2ff0, {0x104e8a0, 0x17b7740}, {0xee7202, 0x3}, {0xeeeea3, 0xe})
�ogram Files/Go/src/internal/bytealg/compare_native.go509 +0x405 fp=0xc000ce2fb8 sp=0xc000ce2e98 pc=0x5df485
fatal error: slice bounds out of range
panic during panic

runtime stack:
.procPin�{0xb150000000000046, 0x7900000000c00008})
�md64.s1067 +0x48 fp=0xc00008b142 sp=0xc00008b148 pc=0x46f168
runtime: g 0: unexpected return pc for .procPin called from 0xf168000000c00008
stack: frame={sp:0xc00008b148, fp:0xc00008b142} stack=[0xc000088000,0xc00008c000)
0x000000c00008b042:  0xb0b8000000000000  0x832e000000c00008 
0x000000c00008b052:  0x0184000000000043  0xb0980000000000ef 
0x000000c00008b062:  0x3115000000c00008  0x6c400000000000ef 
0x000000c00008b072:  0xb090000000c00000  0xa0b5000000c00008 
0x000000c00008b082:  0x0004010000000043  0xb0b8000000000000 
0x000000c00008b092:  0x8085000000c00008  0x3115000000000043 
0x000000c00008b0a2:  0xe6700000000000ef  0x6c40000000000103 
0x000000c00008b0b2:  0xb0f8000000c00000  0x7dcb000000c00008 
0x000000c00008b0c2:  0x6c40000000000043  0xf168000000c00000 
0x000000c00008b0d2:  0xb148000000000046  0xb148000000c00008 
0x000000c00008b0e2:  0xf168000000c00008  0x6c40000000000046 
0x000000c00008b0f2:  0xb138000000c00000  0x7d38000000c00008 
0x000000c00008b102:  0xb118000000000043  0x6c40000000c00008 
0x000000c00008b112:  0x7d60000000c00000  0x6c40000000000043 
0x000000c00008b122:  0xf168000000c00000  0xb148000000000046 
0x000000c00008b132:  0xb168000000c00008  0xf168000000c00008 
0x000000c00008b142: >0xb150000000000046  0x7900000000c00008 
0x000000c00008b152:  0x9923000000000043  0x00190000000000ef 
0x000000c00008b162:  0xb188000000000000  0x5a85000000c00008 
0x000000c00008b172:  0x9923000000000043  0x00030000000000ef 
0x000000c00008b182:  0xb1c8000000000000  0x5f0e000000c00008 
0x000000c00008b192:  0xf67f000000000043  0x9923000000000056 
0x000000c00008b1a2:  0x00190000000000ef  0xb306000000000000 
0x000000c00008b1b2:  0x0002000000000022  0xb2c5000000000000 
0x000000c00008b1c2:  0xb298000000c00008  0x74e6000000c00008 
0x000000c00008b1d2:  0xffff000000000045  0xc3b800000000ffff 
0x000000c00008b1e2:  0x0759000000000022  0x3151000000000098 
0x000000c00008b1f2:  0x6bd2000000000047  0xe67000000000011f 
0x000000c00008b202:  0xb270000000000103  0xaf73000000c00008 
0x000000c00008b212:  0xb240000000000045  0xb085000000c00008 
0x000000c00008b222:  0x1048000000000044  0xb2e0000000000000 
0x000000c00008b232:  0x0001000000c00008  0xb278000000000000 
0x000000c00008b242:  0xa1caf90000c00008 

What did you expect to see?

I am developing under windows, but the program is crosscompiled for linux. At first, because of the crashes, I thought that the Go executable is depending on the source code. But I think this is not correct. A binary compiled with Go is self-contained, isn't it?

I can reproduce it easily.

@ianlancetaylor ianlancetaylor changed the title fatal error: invalid runtime symbol table (every time if binary is recompiled and old binary is still serving) runtime: fatal error: invalid runtime symbol table (every time if binary is recompiled and old binary is still serving) Nov 11, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Nov 11, 2024
@ianlancetaylor
Copy link
Member

Can you show us how to reproduce the problem ourselves? In particular, precisely how are you updating the running program? Thanks.

@theo-stv
Copy link
Author

Hm, until now I don't know the code in my project which is responsible for the crash. My hope is, that this crash - that should not happen as far as I know - and the obvious dependency to the old binary gives some hint for finding the reason. I can deliver error messages that are in my estimation always different. But always it is invalid runtime symbol table.

The problem always arises when the binary by the compiler is directly overwritten by the new binary and when I then send requests to the server that still runs with the old binary.

The binary is directly updated by the compiler.

@ianlancetaylor
Copy link
Member

The binary is directly updated by the compiler.

Can you be more precise? For example, are you doing something like this?

> go build -o myserver
> ./myserver &
> go build -o myserver

We are only going to be able to fix this problem if we can reproduce it ourselves.

@theo-stv
Copy link
Author

I'm using vscode in Windows, and I have a build script. At the end the build script does:

go build -o ./bin/gobuyer ./

Then or normally before the build begins I interrupt the running server in my Virtual Machine that has the project directory as shared folder. I interrupt the server by ^C. But if I forget to interrupt the running server (on Linux), which can happen because I want to test something, then it crashes.

@seankhliao
Copy link
Member

we need more precise instructions on how to reproduce this.

@theo-stv
Copy link
Author

ok, I'll try.

By the way, sometimes I also get this when the binary is compiled and then I want to start the server. Because of any reason, the binary is corrupt. I recompile, and then everything's fine.

$ ./bin/gobuyer 
runtime: pcHeader: magic= 0x104b280 pad1= 0 pad2= 0 minLC= 0 ptrSize= 0 pcHeader.textStart= 0x104edd0 text= 0x401000 pluginpath= 
fatal error: invalid function symbol table
runtime: panic before malloc heap initialized

runtime stack:
Segmentation fault (core dumped)

@glycerine
Copy link

@theo-stv which virtual machine platform are you running on Windows? For example, are you using VirtualBox? If so, you can expect corruption via shared folders (for what you are doing), per this comment:

To quote https://forums.virtualbox.org/viewtopic.php?t=106957

Re: Shared folders corrupting files
Post by mpack » 1. Sep 2022, 11:00

It has long been known that you shouldn't use shared folders actively, i.e. having guest software hold files open for extended periods of time. They are used as an intermediate medium for copying files between guest and host. Basically the host writes, the guest reads.

If you want to make more extensive used of a shared folder, set up a true network share.

@theo-stv
Copy link
Author

@glycerine Many, many thanks! I think this is the problem. I have copied the binary in a folder out of the shared directory and it works. I cannot reproduce the problem. :-) :-)

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2024
@theo-stv
Copy link
Author

And yes, it's Oracle VirtualBox

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.
Projects
None yet
Development

No branches or pull requests

6 participants