aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-02-14 22:05:42 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-02-14 22:05:42 +0100
commite0e9f890f2df95843b785ba954dc78ecacfa0fe9 (patch)
treece3f9ac44c727c8dcc1b9c91203ca829f04c1d2c
parentbba151995837343a6173e2fd38bb3215e1e1b663 (diff)
rpctype: increase rpc timeouts
Fuzzers episodically crash with: panic: read tcp 10.128.0.3:33708->10.128.0.2:42452: i/o timeout goroutine 10 [running]: panic(0x1197640, 0xc83dce3b80) /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6 main.triageInput(0x5, 0xc8213767e0, 0xc84bd04900, 0x2, 0xc847a7e800, 0x86e, 0x880, 0x0) /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/fuzzer.go:523 +0xa52 main.main.func4(0x5, 0xc8213767e0, 0xc823396180, 0xc8205360c0) /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/fuzzer.go:251 +0xcf4 created by main.main /syzkaller/gopath/src/github.com/google/syzkaller/syz-fuzzer/fuzzer.go:276 +0x1085
-rw-r--r--rpctype/rpc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpctype/rpc.go b/rpctype/rpc.go
index 32d751be4..e2005dbcb 100644
--- a/rpctype/rpc.go
+++ b/rpctype/rpc.go
@@ -54,7 +54,7 @@ type RpcClient struct {
}
func NewRpcClient(addr string) (*RpcClient, error) {
- conn, err := net.DialTimeout("tcp", addr, 15*time.Second)
+ conn, err := net.DialTimeout("tcp", addr, 30*time.Second)
if err != nil {
return nil, err
}
@@ -68,7 +68,7 @@ func NewRpcClient(addr string) (*RpcClient, error) {
}
func (cli *RpcClient) Call(method string, args, reply interface{}) error {
- cli.conn.SetDeadline(time.Now().Add(30 * time.Second))
+ cli.conn.SetDeadline(time.Now().Add(60 * time.Second))
err := cli.c.Call(method, args, reply)
cli.conn.SetDeadline(time.Time{})
return err