Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash - probably a bad query? #1035

Closed
clanstyles opened this issue Jun 11, 2017 · 1 comment
Closed

Crash - probably a bad query? #1035

clanstyles opened this issue Jun 11, 2017 · 1 comment
Labels
kind/bug Something is broken.

Comments

@clanstyles
Copy link

clanstyles commented Jun 11, 2017

I'm using the dbpedia dataset and bulk loaded article_categories_en.ttl.bz2

wget http://downloads.dbpedia.org/3.9/en/article_categories_en.ttl.bz2
bzip2 -d article_categories_en.ttl.bz2 && gzip article_categories_en.ttl

Then I bulk loaded the data into a fresh dgraph db.

dgraphloader -r article_categories_en.ttl.gz

I tried to understand how the data was imported. I tried to describe the schema via

schema {
}

which renders

{
  "schema": [
    {
      "predicate": "_uid_",
      "type": "default"
    },
    {
      "predicate": "_predicate_",
      "type": "default"
    },
    {
      "predicate": "http://purl.org/dc/terms/subject",
      "type": "uid"
    }
  ]
}

This layout looks quite odd to me. I've been trying to figure out how to do anything with it, even query it. I ran the query:

{
  _predicate_(func:anyoftext(_predicate_, "something")) {
    
  }
}

which causes:

2017/06/11 04:53:12 lists.go:284: Dirty map size: 0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xc5a5cc]

goroutine 7037 [running]:
github.com/dgraph-io/dgraph/worker.processTask(0x7fa988360050, 0xc541b9a6c0, 0xc42010a380, 0x1, 0x0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/dgraph-io/dgraph/worker/task.go:197 +0x17c
github.com/dgraph-io/dgraph/worker.ProcessTaskOverNetwork(0x7fa988360050, 0xc541b9a6c0, 0xc42010a380, 0x0, 0x0, 0x0)
	/home/travis/gopath/src/github.com/dgraph-io/dgraph/worker/task.go:60 +0x87a
github.com/dgraph-io/dgraph/query.ProcessGraph(0x1739ec0, 0xc541b9a6c0, 0xc420151680, 0x0, 0xc541b9a720)
	/home/travis/gopath/src/github.com/dgraph-io/dgraph/query/query.go:1621 +0x20fd
created by github.com/dgraph-io/dgraph/query.ProcessQuery
	/home/travis/gopath/src/github.com/dgraph-io/dgraph/query/query.go:1248 +0x70c

as a side note why should you be allowed to import a quad with a name that is a link, which contains invalid characters you can't even query?

@manishrjain manishrjain added the kind/bug Something is broken. label Jun 11, 2017
@ashwin95r
Copy link
Contributor

The crash was due to a nil list and has been fixed.

@clanstyles Regarding the usage of a link as a predicate, it has to be done with <>. For example:

{
  me(id: <http://dbpedia.org/resource/Albedo>) {
    <http://purl.org/dc/terms/subject> {
      _uid_
    }
  }
}

retrurns

{
  "me": [
    {
      "_uid_": "0x4339",
      "http://purl.org/dc/terms/subject": [
        {
          "_uid_": "0x2bae"
        },
        {
          "_uid_": "0x424e"
        },
        {
          "_uid_": "0x57bb"
        },
        {
          "_uid_": "0x5afc"
        },
        {
          "_uid_": "0x8ae4"
        },
        {
          "_uid_": "0xc0dc"
        }
      ]
    }
  ],
  "server_latency": {
    "json": "687µs",
    "parsing": "842µs",
    "processing": "551µs",
    "total": "2ms"
  }
}

ashwin95r added a commit that referenced this issue Jun 12, 2017
ashwin95r added a commit that referenced this issue Jun 12, 2017
@manishrjain manishrjain added the kind/bug Something is broken. label Mar 21, 2018
@manishrjain manishrjain added the kind/bug Something is broken. label Mar 22, 2018
arijitAD pushed a commit that referenced this issue Oct 15, 2020
* stub dev rpc set authorities

* implement set authorities rpc dev call

* add test for rpc dev setAuthorities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken.
Development

No branches or pull requests

3 participants