Go: Plugin: net/http.Get fatals with "runtime: unerwarteter Return-PC für runtime.goexit called"

Erstellt am 27. Jan. 2018  ·  1Kommentar  ·  Quelle: golang/go

Welche Version von Go verwenden Sie ( go version )?

go version go1.10rc1 darwin/amd64

Reproduziert sich dieses Problem mit der neuesten Version?

JAWOHL

Welches Betriebssystem und welche Prozessorarchitektur verwenden Sie ( go env )?

GOARCH="amd64"
GOBIN="/Users/juhwany/go_workspace/bin"
GOCACHE="/Users/juhwany/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/juhwany/go_workspace"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mk/2tyywdsn0jq6l0vl8094tss80000gp/T/go-build778249571=/tmp/go-build -gno-record-gcc-switches -fno-common"

Was hast du gemacht?

Wenn es die http.Get-Methode im Plugin aufruft. Es tritt ein schwerwiegender Fehler wie runtime: unexpected return pc for runtime.goexit called from 0x4460ce0

Sie können das Problem mit dieser Demo reproduzieren (https://github.com/nzlov/testplugin)

Reproduktionsschritte

  1. Plugin bauen
    go build --buildmode=plugin post.go
  1. Hauptanwendung erstellen
    go build main.go

  2. Lauf
    ./hauptsächlich

Unter Linux funktioniert es gut. Es passiert nur auf darwin/amd64.

Was hast du erwartet zu sehen?

Ohne schwerwiegenden Fehler ausführen

Was hast du stattdessen gesehen?

runtime: unexpected return pc for runtime.goexit called from 0x4460ce0
stack: frame={sp:0xc420050fb8, fp:0xc420050fc0} stack=[0xc420050000,0xc420051000)
000000c420050eb8:  0000000000000000  0000000000000000
000000c420050ec8:  0000000000000000  0000000000000000
000000c420050ed8:  0000000000000000  0000000000000000
000000c420050ee8:  0000000000000000  0000000000000000
000000c420050ef8:  0000000000000000  0000000000000000
000000c420050f08:  0000000000000000  0000000000000000
000000c420050f18:  0000000000000000  0000000000000000
000000c420050f28:  000000c42003efa8  0000000005378b96 <net/http.(*Transport).getConn.func4+118>
000000c420050f38:  0000000004460ce0  00000000043154e0
000000c420050f48:  000000c42009e020  0000000000000000
000000c420050f58:  0000000005429ff7  0000000000000005
000000c420050f68:  000000c4200ba1c0  0000000000000012
000000c420050f78:  0000000000000000  0000000000000000
000000c420050f88:  0000000000000000  0000000000000000
000000c420050f98:  0000000000000000  0000000000000000
000000c420050fa8:  0000000000000000  0000000005192201 <runtime.goexit+1>
000000c420050fb8: <0000000004460ce0 >00000000043154e0
000000c420050fc8:  000000c42009e020  000000c420098f00
000000c420050fd8:  000000c42008a180  0000000000000000
000000c420050fe8:  0000000000000000  0000000000000000
000000c420050ff8:  0000000000000000
fatal error: unknown caller pc

runtime stack:
runtime: unexpected return pc for runtime.morestack called from 0x0
stack: frame={sp:0x7fff5fbff978, fp:0x7fff5fbff980} stack=[0x7fff5fb80520,0x7fff5fbff9a0)
00007fff5fbff878:  0000000004465be0  00007fff5fbff8c8
00007fff5fbff888:  000000000515653c <runtime.(*mcentral).grow+236>  000000c41fff4dff
00007fff5fbff898:  000000c400000000  0000000004591b60
00007fff5fbff8a8:  0000000004591b60  0000000000000011
00007fff5fbff8b8:  000000c420076900  000000c42003eaf8
00007fff5fbff8c8:  000000000536ef75 <net/http.(*Transport).dialConn+85>  000000c420076900
00007fff5fbff8d8:  0000000000000000  0000000000000000
00007fff5fbff8e8:  0000000000000000  0000000000000000
00007fff5fbff8f8:  000000c420076900  000000c420076901
00007fff5fbff908:  0000000004465b01  00007fff5fbff930
00007fff5fbff918:  0000000005179555 <runtime.selparkcommit+133>  0000000004465be0
00007fff5fbff928:  000000c4201241e0  00007fff5fbff960
00007fff5fbff938:  00000000051724eb <runtime.park_m+187>  000000c420000180
00007fff5fbff948:  0000000000000000  000000000458a601
00007fff5fbff958:  0000000004465be0  000000c420065328
00007fff5fbff968:  000000c42003ef28  000000000518f859 <runtime.morestack+137>
00007fff5fbff978: <0000000000000000 >00007fff5fbff9d8
00007fff5fbff988:  00000000040549b3 <runtime.rt0_go+515>  00007fff5fbff9d8
00007fff5fbff998:  00000000040549ba <runtime.rt0_go+522>
runtime.throw(0x542898e, 0x11)
    /usr/local/go/src/runtime/panic.go:619 +0x81
runtime.gentraceback(0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0xc420076900, 0x0, 0x0, 0x7fffffff, 0x5438a88, 0x7fff5fbff6b8, 0x0, ...)
    /usr/local/go/src/runtime/traceback.go:292 +0x1bb2
runtime.copystack(0xc420076900, 0x1000, 0x7fff5fbff801)
    /usr/local/go/src/runtime/stack.go:891 +0x26e
runtime.newstack()
    /usr/local/go/src/runtime/stack.go:1063 +0x310
runtime: unexpected return pc for runtime.morestack called from 0x0
stack: frame={sp:0x7fff5fbff978, fp:0x7fff5fbff980} stack=[0x7fff5fb80520,0x7fff5fbff9a0)
00007fff5fbff878:  0000000004465be0  00007fff5fbff8c8
00007fff5fbff888:  000000000515653c <runtime.(*mcentral).grow+236>  000000c41fff4dff
00007fff5fbff898:  000000c400000000  0000000004591b60
00007fff5fbff8a8:  0000000004591b60  0000000000000011
00007fff5fbff8b8:  000000c420076900  000000c42003eaf8
00007fff5fbff8c8:  000000000536ef75 <net/http.(*Transport).dialConn+85>  000000c420076900
00007fff5fbff8d8:  0000000000000000  0000000000000000
00007fff5fbff8e8:  0000000000000000  0000000000000000
00007fff5fbff8f8:  000000c420076900  000000c420076901
00007fff5fbff908:  0000000004465b01  00007fff5fbff930
00007fff5fbff918:  0000000005179555 <runtime.selparkcommit+133>  0000000004465be0
00007fff5fbff928:  000000c4201241e0  00007fff5fbff960
00007fff5fbff938:  00000000051724eb <runtime.park_m+187>  000000c420000180
00007fff5fbff948:  0000000000000000  000000000458a601
00007fff5fbff958:  0000000004465be0  000000c420065328
00007fff5fbff968:  000000c42003ef28  000000000518f859 <runtime.morestack+137>
00007fff5fbff978: <0000000000000000 >00007fff5fbff9d8
00007fff5fbff988:  00000000040549b3 <runtime.rt0_go+515>  00007fff5fbff9d8
00007fff5fbff998:  00000000040549ba <runtime.rt0_go+522>
runtime.morestack()
    /usr/local/go/src/runtime/asm_amd64.s:480 +0x89

goroutine 19 [copystack]:
runtime.newobject(0x42aba80, 0x0)
    /usr/local/go/src/runtime/malloc.go:838 +0x51 fp=0xc420050af8 sp=0xc420050af0 pc=0x5152411
net/http.(*Transport).dialConn(0x4460ce0, 0x43154e0, 0xc42009e020, 0x0, 0x5429ff7, 0x5, 0xc4200ba1c0, 0x12, 0x0, 0x0, ...)
    /usr/local/go/src/net/http/transport.go:1096 +0x55 fp=0xc420050f38 sp=0xc420050af8 pc=0x536ef75
net/http.(*Transport).getConn.func4(0x4460ce0, 0x43154e0, 0xc42009e020, 0xc420098f00, 0xc42008a180)
    /usr/local/go/src/net/http/transport.go:957 +0x76 fp=0xc420050fb8 sp=0xc420050f38 pc=0x5378b96
runtime: unexpected return pc for runtime.goexit called from 0x4460ce0
stack: frame={sp:0xc420050fb8, fp:0xc420050fc0} stack=[0xc420050000,0xc420051000)
000000c420050eb8:  0000000000000000  0000000000000000
000000c420050ec8:  0000000000000000  0000000000000000
000000c420050ed8:  0000000000000000  0000000000000000
000000c420050ee8:  0000000000000000  0000000000000000
000000c420050ef8:  0000000000000000  0000000000000000
000000c420050f08:  0000000000000000  0000000000000000
000000c420050f18:  0000000000000000  0000000000000000
000000c420050f28:  000000c42003efa8  0000000005378b96 <net/http.(*Transport).getConn.func4+118>
000000c420050f38:  0000000004460ce0  00000000043154e0
000000c420050f48:  000000c42009e020  0000000000000000
000000c420050f58:  0000000005429ff7  0000000000000005
000000c420050f68:  000000c4200ba1c0  0000000000000012
000000c420050f78:  0000000000000000  0000000000000000
000000c420050f88:  0000000000000000  0000000000000000
000000c420050f98:  0000000000000000  0000000000000000
000000c420050fa8:  0000000000000000  0000000005192201 <runtime.goexit+1>
000000c420050fb8: <0000000004460ce0 >00000000043154e0
000000c420050fc8:  000000c42009e020  000000c420098f00
000000c420050fd8:  000000c42008a180  0000000000000000
000000c420050fe8:  0000000000000000  0000000000000000
000000c420050ff8:  0000000000000000
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420050fc0 sp=0xc420050fb8 pc=0x5192201
created by net/http.(*Transport).getConn
    /usr/local/go/src/net/http/transport.go:956 +0x36d

goroutine 1 [select]:
net/http.(*Transport).getConn(0x4460ce0, 0xc420098ed0, 0x0, 0x5429ff7, 0x5, 0xc4200ba1c0, 0x12, 0x0, 0x0, 0x4288e00)
    /usr/local/go/src/net/http/transport.go:962 +0x55e
net/http.(*Transport).RoundTrip(0x4460ce0, 0xc420162000, 0x4460ce0, 0x0, 0x0)
    /usr/local/go/src/net/http/transport.go:409 +0x62e
net/http.send(0xc420162000, 0x545a980, 0x4460ce0, 0x0, 0x0, 0x0, 0xc42014a9d8, 0xf8, 0xc420065c70, 0x1)
    /usr/local/go/src/net/http/client.go:252 +0x185
net/http.(*Client).send(0x55afbc0, 0xc420162000, 0x0, 0x0, 0x0, 0xc42014a9d8, 0x0, 0x1, 0x51523f8)
    /usr/local/go/src/net/http/client.go:176 +0xfa
net/http.(*Client).Do(0x55afbc0, 0xc420162000, 0x5429ff7, 0x16, 0x0)
    /usr/local/go/src/net/http/client.go:615 +0x298
net/http.(*Client).Get(0x55afbc0, 0x5429ff7, 0x16, 0xc420098cf0, 0xc4200bcfc0, 0xc4200bcfc0)
    /usr/local/go/src/net/http/client.go:396 +0x9d
net/http.Get(0x5429ff7, 0x16, 0x1, 0xffffffffffffffff, 0xc420065ef8)
    /usr/local/go/src/net/http/client.go:370 +0x44
plugin/unnamed-71262ac8d344fb916e3c94d62f776ef5713970c9.Init()
    /Users/juhwany/go_workspace/src/testplugin/post.go:9 +0x3a
main.main()
    /Users/juhwany/go_workspace/src/testplugin/main.go:17 +0xb7
FrozenDueToAge OS-Darwin

Hilfreichster Kommentar

@juhwany danke, dass du dieses Problem gemeldet hast! Wie Sie bereits festgestellt haben, handelt es sich um ein Duplikat von https://github.com/golang/go/issues/23133 . Vielen Dank für Ihr Feedback zu diesem Problem. Ich habe diese Ausgabe umbenannt, aber ich werde auch die andere umbenennen und diese schließen.

>Alle Kommentare

@juhwany danke, dass du dieses Problem gemeldet hast! Wie Sie bereits festgestellt haben, handelt es sich um ein Duplikat von https://github.com/golang/go/issues/23133 . Vielen Dank für Ihr Feedback zu diesem Problem. Ich habe diese Ausgabe umbenannt, aber ich werde auch die andere umbenennen und diese schließen.

War diese Seite hilfreich?
0 / 5 - 0 Bewertungen