zrepl/rpc
Christian Schwarz dc03db7423 rpc/grpcclientidentity/authlistener_grpc_adaptor: don't assume peer.Addr is set
On Illumos, getpeername doesn't work from Go on socketpair sockets.
That's why .RemoteAddr() returns nil on such a socket.
And that `nil` ultimately lands in the `p.Addr`.
So, `p.Addr.String()` would deref `nil`, leading to

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xaea33e]

    goroutine 614 [running]:
    github.com/zrepl/zrepl/rpc/grpcclientidentity.NewInterceptors.func1({0xf1e158, 0xc000631200}, {0xd514c0, 0xc000631230}, 0xc000032740, 0xc000524348)
    	/dpool/export/home/mills/Downloads/code/oi-userland-gh/components/sysutils/zrepl/build/amd64/rpc/grpcclientidentity/authlistener_grpc_adaptor.go:121 +0x13e
    github.com/zrepl/zrepl/replication/logic/pdu._Replication_ListFilesystems_Handler({0xdb30c0, 0xc00001a630}, {0xf1e158, 0xc000631200}, 0xc00052b7a0, 0xc000522000)
    	/dpool/export/home/mills/Downloads/code/oi-userland-gh/components/sysutils/zrepl/build/amd64/replication/logic/pdu/pdu_grpc.pb.go:186 +0x16a
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc00016e700, {0xf2bc00, 0xc0000f2780}, 0xc00011c200, 0xc000522150, 0x1497c78, 0x0)
    	/dpool/export/home/mills/Downloads/code/oi-userland-gh/components/sysutils/zrepl/zrepl-0.5.0/gopath/pkg/mod/google.golang.org/grpc@v1.35.0/server.go:1217 +0xe28
    google.golang.org/grpc.(*Server).handleStream(0xc00016e700, {0xf2bc00, 0xc0000f2780}, 0xc00011c200, 0x0)
    	/dpool/export/home/mills/Downloads/code/oi-userland-gh/components/sysutils/zrepl/zrepl-0.5.0/gopath/pkg/mod/google.golang.org/grpc@v1.35.0/server.go:1540 +0xcb3
    google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000373b70, 0xc00016e700, {0xf2bc00, 0xc0000f2780}, 0xc00011c200)
    	/dpool/export/home/mills/Downloads/code/oi-userland-gh/components/sysutils/zrepl/zrepl-0.5.0/gopath/pkg/mod/google.golang.org/grpc@v1.35.0/server.go:878 +0xad
    created by google.golang.org/grpc.(*Server).serveStreams.func1
    	/dpool/export/home/mills/Downloads/code/oi-userland-gh/components/sysutils/zrepl/zrepl-0.5.0/gopath/pkg/mod/google.golang.org/grpc@v1.35.0/server.go:876 +0x1ec

fixes https://github.com/zrepl/zrepl/issues/598
2022-07-10 23:59:40 +02:00
..
dataconn Add --skip-cert-check flag to zrepl configcheck to prevent checking cert files 2022-07-08 20:18:41 +02:00
grpcclientidentity rpc/grpcclientidentity/authlistener_grpc_adaptor: don't assume peer.Addr is set 2022-07-10 23:59:40 +02:00
netadaptor [#307] rpc: proper handling of context cancellation for transportmux + dataconn 2020-05-18 19:46:24 +02:00
transportmux [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
versionhandshake rework size estimation & dry sends 2021-10-09 15:43:27 +02:00
rpc_client.go rework size estimation & dry sends 2021-10-09 15:43:27 +02:00
rpc_debug.go bump golangci-lint to 1.35.2 and fix resulting lint errors 2021-01-25 00:16:01 +01:00
rpc_doc.go format source tree using goimports 2019-03-22 19:41:12 +01:00
rpc_logging.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00
rpc_mux.go format source tree using goimports 2019-03-22 19:41:12 +01:00
rpc_server.go [#307] add package trace, integrate it with logging, and adopt it throughout zrepl 2020-05-19 11:30:02 +02:00