runtime error: invalid memory address or nil pointer dereference
-
What version of Dgraph are you using? 1.0.5
-
Have you tried reproducing the issue with latest release? using latest
-
What is the hardware spec (RAM, OS)? ubuntu 16.04
-
Steps to reproduce the issue (command/config used to run Dgraph).
dgraph zero --my=<host-ip>:5080 --bindalldgraph server --my=<host-ip>:7080 --lru_mb 2048 --zero <host-ip>:5080 -
Expected behaviour and actual result. dgraph keeps crashing with this stacktrace:
2018/05/30 13:06:37 node.go:301: INFO: raft.node: 1 elected leader 1 at term 668
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1020e48]
goroutine 428845 [running]:
github.com/dgraph-io/dgraph/posting.(*List).Value(0x0, 0xe3a82f, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/aditya/go/src/github.com/dgraph-io/dgraph/posting/list.go:935 +0x58
github.com/dgraph-io/dgraph/worker.handleCompareFunction.func1(0x1c2ed1e2eed6f546, 0x79, 0xc46e54e000)
/home/aditya/go/src/github.com/dgraph-io/dgraph/worker/task.go:911 +0x31f
github.com/dgraph-io/dgraph/algo.ApplyFilter(0xc4707a9c20, 0xc468755838)
/home/aditya/go/src/github.com/dgraph-io/dgraph/algo/uidlist.go:24 +0xb3
github.com/dgraph-io/dgraph/worker.handleCompareFunction(0x1a95440, 0xc47160c000, 0xc4716b2c80, 0x1, 0xc467012160, 0xc470742090, 0xe3a82f, 0x0)
/home/aditya/go/src/github.com/dgraph-io/dgraph/worker/task.go:888 +0x4d2
github.com/dgraph-io/dgraph/worker.helpProcessTask(0x1a95440, 0xc47160c000, 0xc4716b2c80, 0x1, 0x0, 0x0, 0x13adae8)
/home/aditya/go/src/github.com/dgraph-io/dgraph/worker/task.go:715 +0x429
github.com/dgraph-io/dgraph/worker.processTask(0x1a95440, 0xc47160c000, 0xc4716b2c80, 0x1, 0xc47ff48000, 0xc4716b2c80, 0xc45e178b48)
/home/aditya/go/src/github.com/dgraph-io/dgraph/worker/task.go:626 +0x1be
github.com/dgraph-io/dgraph/worker.ProcessTaskOverNetwork(0x1a95440, 0xc47160c000, 0xc4716b2c80, 0x0, 0xffffffffffffffff, 0x994243)
/home/aditya/go/src/github.com/dgraph-io/dgraph/worker/task.go:149 +0x546
github.com/dgraph-io/dgraph/query.ProcessGraph(0x1a95440, 0xc47160c000, 0xc420350580, 0x0, 0xc468e801e0)
/home/aditya/go/src/github.com/dgraph-io/dgraph/query/query.go:1885 +0x1cbd
created by github.com/dgraph-io/dgraph/query.(*QueryRequest).ProcessQuery
/home/aditya/go/src/github.com/dgraph-io/dgraph/query/query.go:2518 +0x964
dgraphzero
2018/05/30 13:05:42 zero.go:336: Got connection request: id:1 addr:"<host-ip>:7080"
2018/05/30 13:05:42 zero.go:445: Connected
2018/05/30 13:05:45 oracle.go:386: No healthy connection found to leader of group 1
2018/05/30 13:05:45 pool.go:158: Echo error from <host-ip>:7080. Err: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <host-ip>:7080: getsockopt: connection refused"
2018/05/30 13:05:55 oracle.go:386: No healthy connection found to leader of group 1
2018/05/30 13:06:05 oracle.go:75: purging below ts:14919230, len(o.commits):19, len(o.aborts):43, len(o.rowCommit):25
2018/05/30 13:06:15 oracle.go:75: purging below ts:14919312, len(o.commits):19, len(o.aborts):43, len(o.rowCommit):22
2018/05/30 13:06:25 oracle.go:392: Error while fetching minTs from group 1, err: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <host-ip>:7080: getsockopt: connection refused"
2018/05/30 13:06:25 pool.go:158: Echo error from <host-ip>:7080. Err: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <host-ip>:7080: getsockopt: connection refused"
2018/05/30 13:06:33 zero.go:336: Got connection request: id:1 addr:"<host-ip>:7080"
2018/05/30 13:06:33 zero.go:445: Connected
2018/05/30 13:06:35 oracle.go:386: No healthy connection found to leader of group 1
2018/05/30 13:06:35 pool.go:158: Echo error from <host-ip>:7080. Err: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <host-ip>:7080: getsockopt: connection refused"
2018/05/30 13:06:45 oracle.go:386: No healthy connection found to leader of group 1
2018/05/30 13:06:55 oracle.go:75: purging below ts:14919401, len(o.commits):174, len(o.aborts):4, len(o.rowCommit):175
2018/05/30 13:07:05 oracle.go:392: Error while fetching minTs from group 1, err: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <host-ip>:7080: getsockopt: connection refused"
2018/05/30 13:07:05 pool.go:158: Echo error from <host-ip>:7080. Err: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <host-ip>:7080: getsockopt: connection refused"
2018/05/30 13:07:10 zero.go:336: Got connection request: id:1 addr:"<host-ip>:7080"
2018/05/30 13:07:10 zero.go:445: Connected
2018/05/30 13:07:15 oracle.go:386: No healthy connection found to leader of group 1
2018/05/30 13:07:15 pool.go:158: Echo error from <host-ip>:7080. Err: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp <host-ip>:7080: getsockopt: connection refused"
2018/05/30 13:07:25 oracle.go:386: No healthy connection found to leader of group 1
Do you have some sort of existing data there before? Or, are you starting with a clean slate?
we have existing data.
And this happens consistently? If so, can you share your directories with me?
this happens consistently?
Happening every few minutes.
can you share your directories with me?
yes, how can I send it to you?
Upload them somewhere, and send me a link at my name at dgraph.io.
I tried this out today. Zero state contains IP addresses that you had originally specified, so I'm unable to replicate your setup locally.
Recently, a bunch of bugs got fixed in master. Can you retry and see if you still see this crash in master?
I was able to dig into the code and figure out the cause of the crash you're seeing. Submitted https://github.com/dgraph-io/dgraph/commit/2adb06b675901c7829da13d90e2cd193fee65f6b, which should fix the crash. Please retry with master.
Closing this issue. I haven't seen this being triggered since the commit above.