xbusd: crash after 1000 processrequest through the http gateway

Create issue
Issue #159 resolved
Christophe de Vienne created an issue
panic: runtime error: index out of range

goroutine 270 [running]:
bitbucket.org/orus-io/xbus/services/director.(*RingBuffer).PushBack(...)
/tmp/build/d7a3d6e6/go/src/bitbucket.org/orus-io/xbus/services/director/jobqueue.go:261
bitbucket.org/orus-io/xbus/services/director.(*JobQueue).run.func2(0xc00039c780, 0xc0007d9c01)
/tmp/build/d7a3d6e6/go/src/bitbucket.org/orus-io/xbus/services/director/jobqueue.go:70 +0x2d4
bitbucket.org/orus-io/xbus/services/director.(*JobQueue).run(0xc0002986c0, 0xc0001b8660)
/tmp/build/d7a3d6e6/go/src/bitbucket.org/orus-io/xbus/services/director/jobqueue.go:115 +0x80b
created by bitbucket.org/orus-io/xbus/services/director.newJobQueue
/tmp/build/d7a3d6e6/go/src/bitbucket.org/orus-io/xbus/services/director/jobqueue.go:48 +0x1c4

Comments (5)

  1. Christophe de Vienne reporter

    After some tests I found that PushBack is misbehaving when the reader position is 0, which is the case after a thousand job were handled: the ring buffer does back to the buffer start.

  2. Log in to comment