dgraph icon indicating copy to clipboard operation
dgraph copied to clipboard

Issues with watermark

Open pawanrawal opened this issue 9 years ago • 11 comments

While trying to load this http://downloads.dbpedia.org/current/core/mappingbased_objects_en.ttl.bz2 faced a couple of issues. Two times the loader got stuck, the server displayed

[3484] Writing batch of size: 10059
[3485] Writing batch of size: 4114
2017/01/16 10:58:29 lists.go:136: Commit counters. done: 1487000 noop: 1826245
Taking snapshot for group: 1 at watermark: 9027

Writing snapshot to WAL: {Data:[9 1 0 0 0 0 0 0 0 16 1 26 15 108 111 99 97 108 104 111 115 116 58 49 50 51 52 53] Metadata:{ConfState:{Nodes:[1] XXX_unrecognized:[]} Index:9027 Term:2 XXX_unrecognized:[]} XXX_unrecognized:[]}
Current watermark 9027 <= previous snapshot 9027. Skipping.

in logs.

At other time the server crashed with x.Water being nil on line 336 in posting/list.go. I can't seem to reproduce it after trying it a couple of times now though.

pawanrawal avatar Jan 16 '17 00:01 pawanrawal

The log is alright. It just says that it's not going to take another snapshot; because we're caught up.

the water being nil is the strange case.

manishrjain avatar Jan 16 '17 01:01 manishrjain

2017/01/19 16:38:00 lists.go:136: Commit counters. done: 35994 noop:     0
[1454] Writing batch of size: 6862
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x41de5a6]

goroutine 10473 [running]:
panic(0x45bcfe0, 0xc4200120b0)
	/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:500 +0x1a1
github.com/dgraph-io/dgraph/posting.(*List).addMutation(0xc4a4451ef0, 0x4926700, 0xc46f955620, 0xc44dd51020, 0x5, 0x5, 0x415090abf3)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/posting/list.go:336 +0x2b6
github.com/dgraph-io/dgraph/posting.(*List).AddMutationWithIndex(0xc4a4451ef0, 0x4926700, 0xc46f955620, 0xc44dd51020, 0x0, 0x0)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/posting/index.go:171 +0x2c0
github.com/dgraph-io/dgraph/worker.runMutations(0x7702928, 0xc46f955620, 0xc44556a000, 0x3e8, 0x400, 0x0, 0x0)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/worker/mutation.go:50 +0x24c
github.com/dgraph-io/dgraph/worker.(*node).processMutation(0xc420137560, 0x2, 0x1433, 0x0, 0xc457f76000, 0xe650, 0xe650, 0x0, 0x0, 0x0, ...)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/worker/draft.go:372 +0x13b
github.com/dgraph-io/dgraph/worker.(*node).process(0xc420137560, 0x2, 0x1433, 0x0, 0xc457f76000, 0xe650, 0xe650, 0x0, 0x0, 0x0, ...)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/worker/draft.go:405 +0x387
created by github.com/dgraph-io/dgraph/worker.(*node).processApplyCh
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/worker/draft.go:444 +0x42a

Reproduced it as above, -- the same file, setting dgraph-mem limit to 2GB

squalfof avatar Jan 19 '17 08:01 squalfof

If no one's on this, can i pick this one ?

squalfof avatar Jan 19 '17 09:01 squalfof

I fixed at least one part of this today. Can you pull master and double check, if you can still reproduce this bug.

Sent from Nexus 6P

On Jan 19, 2017 8:33 PM, "KG.Xu" [email protected] wrote:

If no one's on this, can i pick this one ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dgraph-io/dgraph/issues/489#issuecomment-273723911, or mute the thread https://github.com/notifications/unsubscribe-auth/ABsyNEdyXvcpBKEAOBaM_H8AUgo9SSUBks5rTy3PgaJpZM4LkFXS .

manishrjain avatar Jan 19 '17 09:01 manishrjain

still could appear, given the newest version ("Bring back client helper functions") , with posting/list.go from line 336 -> 337, posting/index.go line 171 -> 173, diff with the last crash screenshot

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

goroutine 35201 [running]:
panic(0x45bfd80, 0xc4200120b0)
	/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:500 +0x1a1
github.com/dgraph-io/dgraph/posting.(*List).addMutation(0xc480ddfb20, 0x492a700, 0xc44dfa0990, 0xc4ab85b920, 0x4979b40, 0x5, 0x405ca20)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/posting/list.go:337 +0x2b6
github.com/dgraph-io/dgraph/posting.(*List).AddMutationWithIndex(0xc480ddfb20, 0x492a700, 0xc44dfa0990, 0xc4ab85b920, 0x0, 0x0)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/posting/index.go:173 +0x2f3
github.com/dgraph-io/dgraph/worker.runMutations(0x77a58e0, 0xc44dfa0990, 0xc4aa1ca900, 0x484, 0x520, 0x0, 0x0)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/worker/mutation.go:50 +0x24c
github.com/dgraph-io/dgraph/worker.(*node).processMutation(0xc4204d0000, 0x2, 0x446a, 0x0, 0xc44c4a4000, 0x6c6b, 0x6c6b, 0x0, 0x0, 0x0, ...)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/worker/draft.go:372 +0x13b
github.com/dgraph-io/dgraph/worker.(*node).process(0xc4204d0000, 0x2, 0x446a, 0x0, 0xc44c4a4000, 0x6c6b, 0x6c6b, 0x0, 0x0, 0x0, ...)
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/worker/draft.go:405 +0x387
created by github.com/dgraph-io/dgraph/worker.(*node).processApplyCh
	/Users/xa_xx/go/src/github.com/dgraph-io/dgraph/worker/draft.go:444 +0x42a

squalfof avatar Jan 22 '17 00:01 squalfof

Looking.

manishrjain avatar Jan 23 '17 03:01 manishrjain

I was able to load up this entire data set, without any issues. Though querying the data is currently an issue: https://github.com/dgraph-io/dgraph/issues/521

Edit: Loading it one more time to ensure that it can load OK.

manishrjain avatar Jan 23 '17 04:01 manishrjain

Ran it twice. Works for me. Please reopen if you can reproduce this on master.

manishrjain avatar Jan 23 '17 04:01 manishrjain

#550

ashwin95r avatar Feb 10 '17 00:02 ashwin95r

Submitted a fix for #550. Please verify the fix.

manishrjain avatar Feb 10 '17 02:02 manishrjain

This was verified and it works well now.

pawanrawal avatar Feb 20 '17 04:02 pawanrawal