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: send on closed channel using the IndexBatcher #41

Open
prologic opened this issue May 30, 2018 · 6 comments
Open

panic: send on closed channel using the IndexBatcher #41

prologic opened this issue May 30, 2018 · 6 comments

Comments

@prologic
Copy link

I'm trying to use the IndexBatcher in this repo and get a panic:

panic: send on closed channel

goroutine 20 [running]:
github.com/blevesearch/bleve/index.AnalysisWorker(0xc4200961e0, 0xc420096240)
	/Users/prologic/go/src/github.com/blevesearch/bleve/index/analysis.go:107 +0x7b
created by github.com/blevesearch/bleve/index.NewAnalysisQueue
	/Users/prologic/go/src/github.com/blevesearch/bleve/index/analysis.go:94 +0xcd

Not really sure what's triggering this yet... Filing here for visibility.

@mschoch
Copy link
Contributor

mschoch commented May 30, 2018

The batcher was contributed by another user, so I don't have much knowledge of the internals. I would start by reviewing this, the line numbers are different, but I believe it's the same panic channel send as this:

blevesearch/bleve#195

This suggests the likely cause is that a Batch is being reused incorrectly somehow

@prologic
Copy link
Author

You literally just linked to the same exact issue I found too :) congrats!

@mschoch
Copy link
Contributor

mschoch commented May 30, 2018

Did a quick review and don't see any obvious problem. It looks like after a batch finishes executing, it is reset and then reused, which should be safe. If you have a sample program that can reproduce it that will help.

@prologic
Copy link
Author

I do actually! It repros very quickly with a load test using hey -- unfortunately the code is not yet published anywhere you can access; privately hosted atm. If you're keen on helping me debug this we can go offline and I can get you access to the code?

@mschoch
Copy link
Contributor

mschoch commented May 30, 2018

It's not super high priority, but I hate knowing there is an unsolved mystery out there. Let me know what works best for you, you can email me directly at [email protected]

@prologic
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants