Error in dgraphassigner when using prebuilt binaries

While setting up dgraph on an EC2 machine, I simply followed the automatic download instructions on the

i.e. I ran

curl | bash

The binaries installed correctly in /usr/local/bin. However when I try to run dgraphassigner as follows:

dgraphassigner --numInstances 1 --instanceIdx 0 --rdfgzips benchmarks/data/rdf-films.gz --uids data/u

I get the following error:

INFO[0000] Set max procs to num cpus num_cpus=2 package=uidassigner_main prev_maxprocs=2
INFO[0000] Only XIDs with FP(xid)%numInstance == instanceIdx will be given UID instanceIdx=0 numInstances=1 package=uidassigner_main
INFO[0000] Handling… package=uidassigner_main path=benchmarks/data/rdf-films.gz
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x62ecb9]

goroutine 2915 [running]:
panic(0xafc160, 0xc82000e0d0)
/usr/local/go/src/runtime/panic.go:481 +0x3e6*DB).Get(0x0, 0xc820028218, 0xc820105360, 0x10, 0x10, 0x0, 0x0, 0x0)
/home/ubuntu/go_work/src/ +0xc9*Store).Get(0xc8201415c0, 0xc820105360, 0x10, 0x10, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/ubuntu/go_work/src/ +0x93*List).getPostingList(0xc82012a5b0, 0xc64948)
/home/ubuntu/go_work/src/ +0x281*List).init(0xc82012a5b0, 0xc820105360, 0x10, 0x10, 0xc8201415c0, 0x0)
/home/ubuntu/go_work/src/ +0x25e, 0x10, 0x10, 0xc8201415c0, 0x0)
/home/ubuntu/go_work/src/ +0x24a, 0xa, 0x0, 0x1, 0x0, 0x0, 0x0)
/home/ubuntu/go_work/src/ +0x120*state).assignUid(0xc820079810, 0xc8203b9cc1, 0xa, 0x0, 0x0)
/home/ubuntu/go_work/src/ +0x170*state).assignUidsOnly(0xc820079810, 0xc820144330)
/home/ubuntu/go_work/src/ +0x1ab
created by
/home/ubuntu/go_work/src/ +0x289

The same command runs on my mac with my custom built binary just fine.

This turns out to be because the directory data was missing. After I create it works fine. However on my manually built binary, it created the directory before proceeding and doesn’t crash.

Is there a reason prebuilt binaries have a different behavior? Or is it a Mac vs Linux difference?

The script picks up the latest release and installs that. When you do a custom build, you build from master. That’s the difference. Since the last release, we started automatically creating the directories.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.