Skip to content

panic in dgraph/query/query.go:492 #2810

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

Closed
relunctance opened this issue Dec 6, 2018 · 1 comment
Closed

panic in dgraph/query/query.go:492 #2810

relunctance opened this issue Dec 6, 2018 · 1 comment

Comments

@relunctance
Copy link

relunctance commented Dec 6, 2018

If you suspect this could be a bug, follow the template.

  • What version of Dgraph are you using?
Dgraph version   : v1.0.11-rc3-4-g701e18d0
Commit SHA-1     : 701e18d0
Commit timestamp : 2018-11-21 23:56:55 -0800
Branch           : master
  • Have you tried reproducing the issue with latest release?
    yes

  • What is the hardware spec (RAM, OS)?

CentOS release 6.2 (Final)
Linux 2.6.32-220.7.1.el6.x86_64 #1 SMP Wed Mar 7 00:52:02 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux 
MemTotal:       65910848 kB
MemFree:        24531660 kB
Buffers:          441096 kB
  • Steps to reproduce the issue (command/config used to run Dgraph).
    Data size and schema:
md5 <md5>: string @index(exact) @upsert . 7212931
pmd5 <pmd5>: uid @count @reverse . 6715929
xid <xid>: string @index(hash) . 7212931

url: http://127.0.0.1:8080/query?debug=true

{
  node(func: eq(md5, "72460aa5d07e44a639880f0aa129f3db")) {
    uid
    expand(_all_)  {
      expand(_all_)
    }
  }
}
  • Expected behaviour and actual result.
 492             if pc.Params.Facet != nil && len(pc.facetsMatrix[idx].FacetsList) > 0 {
 493                 // in case of Value we have only one Facets
 494                 for _, f := range pc.facetsMatrix[idx].FacetsList[0].Facets {
 495                     dst.AddValue(facetName(fieldName, f), facets.ValFor(f))
 496                 }
 497             }
2018/12/06 14:17:58 http: panic serving 10.18.32.38:58464: runtime error: index out of range
goroutine 2160787 [running]:
net/http.(*conn).serve.func1(0xc4e6529360)
    /home/gaoqilin/usr/local/go/src/net/http/server.go:1697 +0xd0
panic(0x148be40, 0x1db4190)
    /home/gaoqilin/usr/local/go/src/runtime/panic.go:491 +0x283
github.com/dgraph-io/dgraph/query.(*SubGraph).preTraverse(0xc42041a580, 0xc749d9, 0x1de7960, 0xc5667b9ec0, 0xc5667b9ec0, 0x0)
    /home/gaoqilin/gopath/src/github.com/dgraph-io/dgraph/query/query.go:492 +0x1800
github.com/dgraph-io/dgraph/query.(*SubGraph).preTraverse(0xc4203322c0, 0x6b4500, 0x1de7960, 0xc4e66ce780, 0x11e3fdb, 0xc4345caac0)
    /home/gaoqilin/gopath/src/github.com/dgraph-io/dgraph/query/query.go:442 +0x404
github.com/dgraph-io/dgraph/query.processNodeUids(0xc43b9095b8, 0xc4203322c0, 0xc6154c6150, 0x0)
    /home/gaoqilin/gopath/src/github.com/dgraph-io/dgraph/query/outputnode.go:452 +0x1d1
github.com/dgraph-io/dgraph/query.(*SubGraph).toFastJSON(0xc43b909678, 0xc6154c6150, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/gaoqilin/gopath/src/github.com/dgraph-io/dgraph/query/outputnode.go:500 +0x135
github.com/dgraph-io/dgraph/query.ToJson(0xc6154c6150, 0xc442cc0c80, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0)
    /home/gaoqilin/gopath/src/github.com/dgraph-io/dgraph/query/outputnode.go:53 +0x1e1
github.com/dgraph-io/dgraph/edgraph.(*Server).Query(0xc420321b98, 0x1de30c0, 0xc6154c6120, 0xc626ee94a0, 0xc69c46a120, 0x0, 0x0)
    /home/gaoqilin/gopath/src/github.com/dgraph-io/dgraph/edgraph/server.go:499 +0x75f
github.com/dgraph-io/dgraph/dgraph/cmd/alpha.queryHandler(0x1de2000, 0xc42e17c000, 0xc550006000)
    /home/gaoqilin/gopath/src/github.com/dgraph-io/dgraph/dgraph/cmd/alpha/http.go:107 +0x354
net/http.HandlerFunc.ServeHTTP(0x160bc78, 0x1de2000, 0xc42e17c000, 0xc550006000)
    /home/gaoqilin/usr/local/go/src/net/http/server.go:1918 +0x44
net/http.(*ServeMux).ServeHTTP(0x1e816a0, 0x1de2000, 0xc42e17c000, 0xc550006000)
    /home/gaoqilin/usr/local/go/src/net/http/server.go:2254 +0x130
net/http.serverHandler.ServeHTTP(0xc420402270, 0x1de2000, 0xc42e17c000, 0xc550006000)
    /home/gaoqilin/usr/local/go/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc4e6529360, 0x1de3000, 0xc4f1f37080)
    /home/gaoqilin/usr/local/go/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
    /home/gaoqilin/usr/local/go/src/net/http/server.go:2720 +0x288
@danielmai
Copy link
Contributor

This is fixed in the latest v1.0.11-rc4 with 290028d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants