Skip to content
This repository has been archived by the owner on Sep 8, 2018. It is now read-only.

panic in github.com/djherbis/nio #16

Closed
danp opened this issue Jan 17, 2017 · 11 comments
Closed

panic in github.com/djherbis/nio #16

danp opened this issue Jan 17, 2017 · 11 comments

Comments

@danp
Copy link

danp commented Jan 17, 2017

Was doing a simple test as described in the quickstart. When querying, I got this panic from the ingeststore:

% ~/Downloads/oklog-0.1.0-darwin-amd64 ingeststore -store.segment-replication-factor 1
ts=2017-01-17T14:20:54Z level=info cluster=0.0.0.0:7659
ts=2017-01-17T14:20:54Z level=info fast=tcp://0.0.0.0:7651
ts=2017-01-17T14:20:54Z level=info durable=tcp://0.0.0.0:7652
ts=2017-01-17T14:20:54Z level=info bulk=tcp://0.0.0.0:7653
ts=2017-01-17T14:20:54Z level=info API=tcp://0.0.0.0:7650
ts=2017-01-17T14:20:54Z level=info ingest_path=data/ingest
ts=2017-01-17T14:20:54Z level=info store_path=data/store
ts=2017-01-17T14:20:54Z level=debug component=cluster Join=0
panic: runtime error: slice bounds out of range

goroutine 1858 [running]:
github.com/djherbis/nio.(*PipeWriter).Write(0xc42000e050, 0xc4205ec99c, 0x1e, 0x664, 0x0, 0x0, 0x0)
	/Users/peter/src/github.com/djherbis/nio/sync.go:135 +0x30a
github.com/oklog/oklog/pkg/store.newConcurrentFilteringReadCloser.func1(0x2693d80, 0xc421f83620, 0xc42000e050, 0xc4200148c0)
	/Users/peter/src/github.com/oklog/oklog/pkg/store/query.go:265 +0x198
created by github.com/oklog/oklog/pkg/store.newConcurrentFilteringReadCloser
	/Users/peter/src/github.com/oklog/oklog/pkg/store/query.go:276 +0x210

Was running ingeststore like so:

% ~/Downloads/oklog-0.1.0-darwin-amd64 ingeststore -store.segment-replication-factor 1

a producer like so:

% while true; do echo hi; done | ~/Downloads/oklog-0.1.0-darwin-amd64 forward localhost

and this query:

% ~/Downloads/oklog-0.1.0-darwin-amd64 query -from 1m -v -q hi
-from 2017-01-17T10:25:07-04:00 -to 2017-01-17T10:26:07-04:00
Get http://localhost:7650/store/query?from=2017-01-17T10%3A25%3A07-04%3A00&to=2017-01-17T10%3A26%3A07-04%3A00&q=hi: EOF

Will try and dig in but perhaps you'll spot the problem sooner.

@peterbourgon
Copy link
Member

Ha! Fun. Thanks for that.

@danp
Copy link
Author

danp commented Jan 17, 2017

Opened djherbis/nio#3.

@peterbourgon
Copy link
Member

Great spot!

@danp
Copy link
Author

danp commented Jan 17, 2017

PR merged! I suppose since go get [-u] will fetch the updated nio package this can be closed?

@peterbourgon
Copy link
Member

So fast! Let me reproduce and verify the fix, then I'll make an emergency v0.1.1 release ;) before closing this out.

@peterbourgon
Copy link
Member

Hmm. I can't reproduce on my machine. But I'll still vendor, capture the update, and make a new release.

@danp
Copy link
Author

danp commented Jan 17, 2017

Running while true; do ~/Downloads/oklog-0.1.0-darwin-amd64 query -from 1m -v -q hi | head; done while the ingest store and producer were also running repro'd it pretty reliably fwiw.

@djherbis
Copy link

This should be fixed now, it was definitely a bug in djherbis/nio, thanks @danp for the pr!

@peterbourgon
Copy link
Member

@danp Would you mind confirming it's fixed in https://github.com/oklog/oklog/releases/tag/v0.1.1?

@danp
Copy link
Author

danp commented Jan 17, 2017

Seems good! I have been running it for 5+ minutes now which is way longer than the 0.1.0 binary lasted.

@peterbourgon
Copy link
Member

Good enough! 😎

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

No branches or pull requests

3 participants