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
runtime.boundserror in line 48, in (*memUvarintReader).ReadUvarint #1651
Comments
@agnivade A unit test trying to reproduce the sequence of steps that led you to this crash would be of great help here. If not, at least some context into how you're using bleve might prove helpful. |
@abhinavdangeti - Unfortunately, I don't have a unit test because this is just a crash reported in Sentry. I can help with the second answer though. Mattermost uses Bleve as a search layer to search users, channels, posts. You can see our code here: https://github.com/mattermost/mattermost-server/tree/master/services/searchengine/bleveengine The entry point to this crash starts from this file: github.com/mattermost/mattermost-server/v6/services/searchengine/bleveengine/search.go. Hopefully that helps. |
This bounds check is to throw an overflow while decoding a 64-bit integer, should it occur from calls to SkipUvarint/SkipBytes. For: blevesearch/bleve#1651 ``` Some context on the memUvarintReader .. The code here reflects ReadUVarint(..) from https://cs.opensource.google/go/go/+/refs/tags/go1.13.7:src/encoding/binary/varint.go But as reported here: golang/go#40618, it appears it contained an error prone path that was addressed in 1.15. ```
This bounds check is to return an empty uint64 while decoding a 64-bit integer, should the reader have already read all the bytes available. For: blevesearch/bleve#1651 ``` Some context on the memUvarintReader .. The code here reflects ReadUVarint(..) from https://cs.opensource.google/go/go/+/refs/tags/go1.13.7:src/encoding/binary/varint.go But as reported here: golang/go#40618, it appears it contained an error prone path that was addressed in 1.15. ```
This bounds check is to return an empty uint64 while decoding a 64-bit integer, should the reader have already read all the bytes available. For: blevesearch/bleve#1651 ``` Some context on the memUvarintReader .. The code here reflects ReadUVarint(..) from https://cs.opensource.google/go/go/+/refs/tags/go1.13.7:src/encoding/binary/varint.go But as reported here: golang/go#40618, it appears it contained an error prone path that was addressed in 1.15. ```
This bounds check is to return an empty uint64 while decoding a 64-bit integer, should the reader have already read all the bytes available. For: blevesearch/bleve#1651 ``` Some context on the memUvarintReader .. The code here reflects ReadUVarint(..) from https://cs.opensource.google/go/go/+/refs/tags/go1.13.7:src/encoding/binary/varint.go But as reported here: golang/go#40618, it appears it contained an error prone path that was addressed in 1.15. ```
Place bounds check within memUvarintReader's ReadUvarint
This bounds check is to return an empty uint64 while decoding a 64-bit integer, should the reader have already read all the bytes available. For: blevesearch/bleve#1651 ``` Some context on the memUvarintReader .. The code here reflects ReadUVarint(..) from https://cs.opensource.google/go/go/+/refs/tags/go1.13.7:src/encoding/binary/varint.go But as reported here: golang/go#40618, it appears it contained an error prone path that was addressed in 1.15. ```
This bounds check is to return an empty uint64 while decoding a 64-bit integer, should the reader have already read all the bytes available. For: blevesearch/bleve#1651 ``` Some context on the memUvarintReader .. The code here reflects ReadUVarint(..) from https://cs.opensource.google/go/go/+/refs/tags/go1.13.7:src/encoding/binary/varint.go But as reported here: golang/go#40618, it appears it contained an error prone path that was addressed in 1.15. ```
This bounds check is to return an empty uint64 while decoding a 64-bit integer, should the reader have already read all the bytes available. For: blevesearch/bleve#1651 ``` Some context on the memUvarintReader .. The code here reflects ReadUVarint(..) from https://cs.opensource.google/go/go/+/refs/tags/go1.13.7:src/encoding/binary/varint.go But as reported here: golang/go#40618, it appears it contained an error prone path that was addressed in 1.15. ```
This bounds check is to return an empty uint64 while decoding a 64-bit integer, should the reader have already read all the bytes available. For: blevesearch/bleve#1651 ``` Some context on the memUvarintReader .. The code here reflects ReadUVarint(..) from https://cs.opensource.google/go/go/+/refs/tags/go1.13.7:src/encoding/binary/varint.go But as reported here: golang/go#40618, it appears it contained an error prone path that was addressed in 1.15. ```
Made some fixes within blevesearch/zapx and this change upgrades the version(s) of zapx used by bleve .. |
Thanks! |
We just received such a crash in Sentry. Bleve version used is 2.3.0
I hope the stack trace is enough to identify the cause here. Unfortunately, I don't have anything more than this since this just comes from Sentry.
The text was updated successfully, but these errors were encountered: