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

panic: assignment to entry on nil map #3885

Closed
campoy opened this issue Aug 30, 2019 · 3 comments
Closed

panic: assignment to entry on nil map #3885

campoy opened this issue Aug 30, 2019 · 3 comments
Assignees
Labels
area/crash Dgraph issues that cause an operation to fail, or the whole server to crash. kind/bug Something is broken. priority/P0 Critical issue that requires immediate attention. status/accepted We accept to investigate/work on it.
Milestone

Comments

@campoy
Copy link
Contributor

campoy commented Aug 30, 2019

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

  • What version of Dgraph are you using?

v1.1.0-rc3

  • Have you tried reproducing the issue with latest release?

yes

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

Debian cloud instance on GCP

  • Steps to reproduce the issue (command/config used to run Dgraph).

Not sure how to reproduce it, I was loading the data in the attached file after a DROP ALL and got the panic.

Once I restarted the alpha it paniced again once, then it started correctly.

Panic logs:

panic: assignment to entry in nil map

goroutine 3836 [running]:
github.com/dgraph-io/dgraph/posting.(*List).updateMutationLayer(0xc009827f20, 0xc021b17c20)
        /tmp/go/src/github.com/dgraph-io/dgraph/posting/list.go:318 +0x232
github.com/dgraph-io/dgraph/posting.(*List).addMutationInternal(0xc009827f20, 0x1945020, 0xc0093a4f80, 0xc0093a5700, 0xc00aef8500, 0x22b7200, 0xbf5238d24accf928)
        /tmp/go/src/github.com/dgraph-io/dgraph/posting/list.go:439 +0xb1
github.com/dgraph-io/dgraph/posting.(*Txn).addMutationHelper(0xc0093a5700, 0x1945020, 0xc0093a4f80, 0xc009827f20, 0x0, 0xc00aef8500, 0xc000000000, 0x0, 0x0, 0xc000040000, ...)
        /tmp/go/src/github.com/dgraph-io/dgraph/posting/index.go:361 +0x205
github.com/dgraph-io/dgraph/posting.(*List).AddMutationWithIndex(0xc009827f20, 0x1945020, 0xc0093a4f80, 0xc00aef8500, 0xc0093a5700, 0x0, 0x0)
        /tmp/go/src/github.com/dgraph-io/dgraph/posting/index.go:394 +0x11e
github.com/dgraph-io/dgraph/worker.runMutation(0x1945020, 0xc0093a4f80, 0xc00aef8500, 0xc0093a5700, 0x0, 0x0)
        /tmp/go/src/github.com/dgraph-io/dgraph/worker/mutation.go:115 +0x35d
github.com/dgraph-io/dgraph/worker.(*node).applyMutations.func3(0xc00aef6468, 0x1cb, 0x373, 0xc0237a8340, 0xc022b9aa00)
        /tmp/go/src/github.com/dgraph-io/dgraph/worker/draft.go:284 +0xb1
github.com/dgraph-io/dgraph/worker.(*node).applyMutations.func4(0xc009827e60, 0xc021e6b6b0, 0xc013c3a7e0, 0xc8d, 0xe58)
        /tmp/go/src/github.com/dgraph-io/dgraph/worker/draft.go:313 +0x7d
created by github.com/dgraph-io/dgraph/worker.(*node).applyMutations
        /tmp/go/src/github.com/dgraph-io/dgraph/worker/draft.go:312 +0x9a7
  • Expected behaviour and actual result.

It should work
pokedex.json.txt

@campoy campoy added this to the Dgraph v1.1 milestone Aug 30, 2019
@campoy campoy added area/crash Dgraph issues that cause an operation to fail, or the whole server to crash. kind/bug Something is broken. priority/P0 Critical issue that requires immediate attention. status/accepted We accept to investigate/work on it. labels Aug 30, 2019
@gitlw gitlw self-assigned this Aug 30, 2019
@danielmai
Copy link
Contributor

@campoy what client were you using to send this mutation?

@campoy
Copy link
Contributor Author

campoy commented Sep 3, 2019

I was sending the query with curl.

manishrjain added a commit that referenced this issue Sep 3, 2019
Concurrently running queries and mutations within the same transaction
can be using posting.List, making it hard to determine when the list can
be released. Calling a release causes panics. So, for now, don't call
it. Look for a way to effectively use postingPool later.

Fixes #3861, #3885.
@manishrjain
Copy link
Contributor

Should be fixed by my change above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/crash Dgraph issues that cause an operation to fail, or the whole server to crash. kind/bug Something is broken. priority/P0 Critical issue that requires immediate attention. status/accepted We accept to investigate/work on it.
Development

No branches or pull requests

4 participants