You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As title, it seems to relate to golang/go#23345.
Is there any way to avoid this problem?
Here is my test steps.
Sample code
package main
import (
"log""time""github.com/valyala/gorpc"
)
funcmain() {
gofunc() {
s:=&gorpc.Server{
// Accept clients on this TCP address.Addr: "0.0.0.0:12345",
// Echo handler - just return back the message we received from the clientHandler: func(clientAddrstring, requestinterface{}) interface{} {
log.Printf("Obtained request %+v from the client %s\n", request, clientAddr)
returnrequest
},
}
iferr:=s.Serve(); err!=nil {
log.Fatalf("Cannot start rpc server: %s", err)
}
}()
c:=&gorpc.Client{
// TCP address of the server.Addr: "127.0.0.1:12345",
}
c.Start()
time.Sleep(3*time.Second)
// All client methods issuing RPCs are thread-safe and goroutine-safe,// i.e. it is safe to call them from multiple concurrently running goroutines.resp, err:=c.Call("foobar")
iferr!=nil {
log.Fatalf("Error when sending request to server: %s", err)
}
ifresp.(string) !="foobar" {
log.Fatalf("Unexpected response from the server: %+v", resp)
}
log.Printf("resp: %v", resp)
}
Use go1.9, and build with GOARCH=arm GOARM=7 GOOS=linux go build -o testgorpc ./main.go
Run testgorpc and get panic as the client connects to the server.
Hi,
As title, it seems to relate to golang/go#23345.
Is there any way to avoid this problem?
Here is my test steps.
GOARCH=arm GOARM=7 GOOS=linux go build -o testgorpc ./main.go
testgorpc
and get panic as the client connects to the server.The text was updated successfully, but these errors were encountered: