# Known issue with Badger? sync.runtime\_Semacquire panic

**URL:** <https://discuss.dgraph.io/t/known-issue-with-badger-sync-runtime-semacquire-panic/2445>\
**Category:** Users\
**Created:** [April 11, 2018, 5:40pm UTC](https://discuss.dgraph.io/t/known-issue-with-badger-sync-runtime-semacquire-panic/2445 "2018-04-11T17:40:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrNull](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/mrnull/32/769_2.png) [@mrNull](https://discuss.dgraph.io/u/mrNull)\
**Post date:** [April 11, 2018, 5:40pm UTC](https://discuss.dgraph.io/t/known-issue-with-badger-sync-runtime-semacquire-panic/2445/1 "2018-04-11T17:40:25Z")

</div>

I’m running a sustained load test using badger (no dgraph just yet) to test the underlying scalability. I’m writing ~50KEPS on an i3.4XL in AWS and after around 24 hours with a 12 hour TTL the program panic’d with the below paste. Just seeing if this is a known issue before making a more targeting test case to post.

opts := badger.DefaultOptions  
opts.Dir = config.DBDirectory  
opts.ValueDir = config.DBDirectory  
opts.TableLoadingMode = options.MemoryMap  
opts.MaxTableSize = 2 \* (1024 \* 1024 \* 1024) // 2GB

And a go routine running every 30 mins on a ticker that calls: (err handling removed for clarity)  
g.db.PurgeOlderVersions()  
g.db.RunValueLogGC(0.5)

```auto
goroutine 2787863423 [semacquire]:
sync.runtime_Semacquire(0xc7bfdec26c)
        /usr/local/go/src/runtime/sema.go:56 +0x39
sync.(*WaitGroup).Wait(0xc7bfdec260)
        /usr/local/go/src/sync/waitgroup.go:129 +0x72
github.com/dgraph-io/badger.(*request).Wait(0xc7bfdec230, 0x460261, 0xc4205ae1e0)
        /mnt/mrnull/golang/src/github.com/dgraph-io/badger/value.go:712 +0x35
github.com/dgraph-io/badger.(*DB).batchSetAsync.func1(0xc7bfdec230, 0xc9205b39a0)
        /mnt/mrnull/golang/src/github.com/dgraph-io/badger/db.go:727 +0x2b
created by github.com/dgraph-io/badger.(*DB).batchSetAsync
        /mnt/mrnull/golang/src/github.com/dgraph-io/badger/db.go:726 +0x9c

goroutine 2787884118 [running]:
        goroutine running on other thread; stack unavailable

```

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [April 13, 2018, 11:21pm UTC](https://discuss.dgraph.io/t/known-issue-with-badger-sync-runtime-semacquire-panic/2445/2 "2018-04-13T23:21:29Z")

</div>

No, this isn’t a known issue. It would be helpful if you can share the entire stack trace and a program which reproduces this.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/2/2b38fdece2abe5814f2e51bee69d1e67fc304b0a.png) [@system](https://discuss.dgraph.io/u/system)\
**Post date:** [May 13, 2018, 11:21pm UTC](https://discuss.dgraph.io/t/known-issue-with-badger-sync-runtime-semacquire-panic/2445/3 "2018-05-13T23:21:36Z")

</div>

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