Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Panic cause shutdown during thread remove over rest API #769

Closed
andrewxhill opened this issue May 15, 2019 · 1 comment · Fixed by #762
Closed

Panic cause shutdown during thread remove over rest API #769

andrewxhill opened this issue May 15, 2019 · 1 comment · Fixed by #762
Labels
bug Something isn't working

Comments

@andrewxhill
Copy link
Member

2019/05/13 14:59:21 [Recovery] 2019/05/13 - 14:59:21 panic recovered:
DELETE /api/v0/threads/12D3KooWJNZke6ecTk7aGMKXCYNyNj8RU74326fJBFvw79zruRtZ HTTP/1.1
Host: 127.0.0.1:40600
Connection: close
Accept: /
Accept-Encoding: gzip,deflate
Connection: close
Content-Length: 0
User-Agent: node-fetch/1.0 (+https://github.com/bitinn/node-fetch)
X-Textile-Args:
X-Textile-Opts:

runtime error: slice bounds out of range
/usr/local/go/src/runtime/panic.go:54 (0x402d8aa)
panicslice: panic(sliceError)
/Users/andrewhill/go/pkg/mod/github.com/textileio/go-textile@v0.1.13-rc8/core/threads.go:345 (0x4e29448)
(*Textile).RemoveThread: copy(t.loadedThreads[index:], t.loadedThreads[index+1:])
/Users/andrewhill/go/pkg/mod/github.com/textileio/go-textile@v0.1.13-rc8/core/api_threads.go:236 (0x4de8239)
(*api).rmThreads: if _, err := a.node.RemoveThread(id); err != nil {
/Users/andrewhill/go/pkg/mod/github.com/gin-gonic/gin@v1.3.0/context.go:108 (0x4731192)
(*Context).Next: c.handlersc.index
/Users/andrewhill/go/pkg/mod/github.com/gin-gonic/gin@v1.3.0/recovery.go:48 (0x4742719)
RecoveryWithWriter.func1: c.Next()
/Users/andrewhill/go/pkg/mod/github.com/gin-gonic/gin@v1.3.0/context.go:108 (0x4731192)
(*Context).Next: c.handlersc.index
/Users/andrewhill/go/pkg/mod/github.com/gin-gonic/gin@v1.3.0/logger.go:84 (0x4741ade)
LoggerWithWriter.func1: c.Next()
/Users/andrewhill/go/pkg/mod/github.com/gin-gonic/gin@v1.3.0/context.go:108 (0x4731192)
(*Context).Next: c.handlersc.index
/Users/andrewhill/go/pkg/mod/github.com/gin-gonic/gin@v1.3.0/gin.go:361 (0x4739bd6)
(*Engine).handleHTTPRequest: c.Next()
/Users/andrewhill/go/pkg/mod/github.com/gin-gonic/gin@v1.3.0/gin.go:326 (0x4739413)
(*Engine).ServeHTTP: engine.handleHTTPRequest(c)
/usr/local/go/src/net/http/server.go:2774 (0x4325807)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1878 (0x43213f0)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:1337 (0x405bac0)
goexit: BYTE $0x90 // NOP

@andrewxhill andrewxhill added the bug Something isn't working label May 15, 2019
@andrewxhill
Copy link
Member Author

trying to figure out what exactly causes this.

I get it when running the Files recipes in js-http-playground. It might have been caused by trying to remove a thread 2x in a row.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant