-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels

Description
Hi guys,
Hope you are all well !
I have 2 major issues with the go-sdk and managed to reproduce them into the following repository.
Ref. https://github.com/x0rzkov/manticore-gosdk-issue
In a nutshell, the two issues are:
- On some queries, I have a slice bounds out of range error.
To reproduce, please see the README.md of the repository above.
runtime error: slice bounds out of range [:774778400] with capacity 22412
/usr/local/go/src/runtime/panic.go:106 (0x432eb2)
goPanicSliceAcap: panic(boundsError{x: int64(x), signed: true, y: y, code: boundsSliceAcap})
/home/ubuntu/lucmichalski/paper2code/pkg/manticore/sphinxql.go:311 (0x10a139c)
(*apibuf).getMysqlStrLen: result := string((*buf)[:lng])
/home/ubuntu/lucmichalski/paper2code/pkg/manticore/sphinxql.go:234 (0x10a0a5a)
(*Sqlresult).parserow: strValue := buf.getMysqlStrLen()
/home/ubuntu/lucmichalski/paper2code/pkg/manticore/sphinxql.go:74 (0x109f901)
(*Sqlresult).parseChain: if !rs.parserow(source) {
/home/ubuntu/lucmichalski/paper2code/pkg/manticore/sphinxql.go:20 (0x10a62b5)
parseSphinxqlAnswer.func1: if rs.parseChain(answer) {
/home/ubuntu/lucmichalski/paper2code/pkg/manticore/client.go:225 (0x1093649)
(*Client).netQuery: return parser(&answer), nil
/home/ubuntu/lucmichalski/paper2code/pkg/manticore/manticore.go:398 (0x109503f)
(*Client).Sphinxql: blob, err := cl.netQuery(commandSphinxql,
/home/ubuntu/lucmichalski/paper2code/main.go:3639 (0x118b2a7)
controllersSearch: res2, err2 := cl.Sphinxql(query)
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161 (0xc9b61a)
(*Context).Next: c.handlers[c.index](c)
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/recovery.go:83 (0xcaedaf)
RecoveryWithWriter.func1: c.Next()
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161 (0xc9b61a)
(*Context).Next: c.handlers[c.index](c)
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/logger.go:241 (0xcadee0)
LoggerWithConfig.func1: c.Next()
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/context.go:161 (0xc9b61a)
(*Context).Next: c.handlers[c.index](c)
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/gin.go:409 (0xca53f5)
(*Engine).handleHTTPRequest: c.Next()
/home/ubuntu/go/pkg/mod/github.com/gin-gonic/gin@v1.6.3/gin.go:367 (0xca4b0c)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/home/ubuntu/go/pkg/mod/github.com/qor/session@v0.0.0-20170907035918-8206b0adab70/gorilla/gorilla.go:125 (0xb2b591)
Gorilla.Middleware.func1: handler.ServeHTTP(w, req.WithContext(ctx))
/usr/local/go/src/net/http/server.go:2012 (0x76eb73)
HandlerFunc.ServeHTTP: f(w, r)
/usr/local/go/src/net/http/server.go:2807 (0x772002)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1895 (0x76d97b)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:1373 (0x465670)
goexit: BYTE ``````x90 // NOP
%CODE_BLOCK%`
2. Sphinxql: failed to read searchd response
When I dockerize manticore and make a query to manticore from the local env; everything works, and when I do exactly the same thing/query/task/action within dockerized application it triggers a failed to read searchd response.
All the details to reproduce are also available in the README of the repository.
Hope that you will find quickly the issues related to these bugs ^^
Cheers,
X