Mrs4s / go-cqhttp

cqhttp的golang实现,轻量、原生跨平台.
GNU Affero General Public License v3.0
10.4k stars 1.63k forks source link

[Bug]: 运行一段时间后无法发送消息,出现btree I/O error: EOF报错 #1366

Closed assassingyk closed 2 years ago

assassingyk commented 2 years ago

请确保您已阅读以上注意事项,并勾选下方的确认框。

go-cqhttp 版本

v1.0.0-rc1

运行环境

Linux

运行架构

AMD64

连接方式

WebSocket (反向)

使用协议

0 | iPad

重现步骤

持续运行一段时间(18小时)后,出现runtime error: index out of range与assert failed!报错,之后使用反向ws发送群消息

期望的结果是什么?

正常发送消息

实际的结果是什么?

消息无法发送,报错btree I/O error: EOF

简单的复现代码/链接(可选)

No response

日志记录(可选)

[2022-02-11 06:00:00] [INFO]: 处置WS命令时发生无法恢复的异常:runtime error: index out of range [7211382046112287] with length 31
goroutine 31781 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xb25ea0, 0xc000770420})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x4e386c65000000b3, 0xc000386f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:447 +0x1fd
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x32c00, 0xc000386f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Get(0xc00018e500, 0x0)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:496 +0x28
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Get(0x1143440, {0xc000387090, 0xb7ddaa, 0xc000387090})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:45 +0xe5
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).makeImageOrVideoElem(0x0, 0x0, 0x0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:1340 +0x6b9
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ToElement(0xc00065e5a0, {0xc00066a6d0, 0x5}, 0xc0003882a0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:876 +0x1912
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage.func1()
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:583 +0xa5d
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage(0xc00065e5a0, {0xc00066a6cc, 0x40}, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:640 +0x182
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0xc0003e6200, {0x3, {0xc00066a6cb, 0x42}, {0xc00066a6cc, 0x40}, 0x0, 0x4b, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:725 +0x1f0
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004ed140, {0xc00066a68c, 0xe}, {0xc6d200, 0xc000708c80})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:206 +0x21c5
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004ed140, {0xc00066a68c, 0xe}, {0xc6d200, 0xc000708c80})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc00066a680, 0xa6, 0x511})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc0005f8550)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:00:00] [WARNING]: 监听反向WS Universal时出现错误: read tcp 127.0.0.1:58142->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:00:00] [INFO]: 处置WS命令时发生无法恢复的异常:assert failed!
goroutine 31782 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xa7bc20, 0xc636b0})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.assert(...)
    github.com/Mrs4s/go-cqhttp/internal/btree/helper.go:11
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insert(0xc00018e500, 0x4e386c65000000b3, 0xc00036ffd8, {0xc000088fa0, 0x98, 0xa0}, 0xc0001cf001)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:275 +0x525
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insert(0xc00018e500, 0x32c00, 0xc00036ffd8, {0xc000088fa0, 0x98, 0xa0}, 0x7f6e9da0d108)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:298 +0x1ea
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insertTopLevel(0xc00018e500, 0xc00018e508, 0xc00036ffd8, {0xc000088fa0, 0x0, 0xc00036fff0}, 0x7050aa)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:404 +0x52
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Insert(0xc00018e500, 0x112f900, {0xc000088fa0, 0x5, 0x0})
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:473 +0x4c
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Insert(0x1143440, {0xc000930a70, 0x10, 0xc000370140}, {0xc000088fa0, 0x98, 0xa0})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:35 +0xdd
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).checkMedia(0xc00065e5a0, {0xc0002a00a0, 0x1, 0x0}, 0x132e04e6)
    github.com/Mrs4s/go-cqhttp/coolq/event.go:746 +0x8c7
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).SendGroupMessage(0xc00065e5a0, 0x1, 0xc000370520)
    github.com/Mrs4s/go-cqhttp/coolq/bot.go:256 +0x125
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0xc0004b2e80, {0x3, {0xc00035f84a, 0x38}, {0xc00035f84b, 0x36}, 0x0, 0x4a, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:729 +0x270
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004ed140, {0xc00035f80c, 0xe}, {0xc6d200, 0xc0005f86e0})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:206 +0x21c5
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004ed140, {0xc00035f80c, 0xe}, {0xc6d200, 0xc0005f86e0})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc00035f800, 0x9b, 0x152a})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc00038c3c0)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:00:00] [INFO]: 处置WS命令时发生无法恢复的异常:assert failed!
goroutine 31793 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xa7bc20, 0xc636b0})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.assert(...)
    github.com/Mrs4s/go-cqhttp/internal/btree/helper.go:11
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insert(0xc00018e500, 0x4e386c65000000b3, 0xc000359fd8, {0xc0000890e0, 0x98, 0xa0}, 0xc000461701)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:275 +0x525
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insert(0xc00018e500, 0x32c00, 0xc000359fd8, {0xc0000890e0, 0x98, 0xa0}, 0x7f6e9da0d108)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:298 +0x1ea
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insertTopLevel(0xc00018e500, 0xc00018e508, 0xc000359fd8, {0xc0000890e0, 0x0, 0xc000359ff0}, 0x7050aa)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:404 +0x52
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Insert(0xc00018e500, 0x112f900, {0xc0000890e0, 0x5, 0x0})
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:473 +0x4c
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Insert(0x1143440, {0xc000b0ac00, 0x10, 0xc00035a140}, {0xc0000890e0, 0x98, 0xa0})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:35 +0xdd
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).checkMedia(0xc00065e5a0, {0xc0002a0100, 0x1, 0x0}, 0x21a1dd30)
    github.com/Mrs4s/go-cqhttp/coolq/event.go:746 +0x8c7
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).SendGroupMessage(0xc00065e5a0, 0x1, 0xc00035a520)
    github.com/Mrs4s/go-cqhttp/coolq/bot.go:256 +0x125
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0xc0003e6200, {0x3, {0xc0001e404a, 0x42}, {0xc0001e404b, 0x40}, 0x0, 0x4a, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:729 +0x270
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004ed140, {0xc0001e400c, 0xe}, {0xc6d200, 0xc000708af0})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:206 +0x21c5
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004ed140, {0xc0001e400c, 0xe}, {0xc6d200, 0xc000708af0})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc0001e4000, 0xa5, 0x600})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc00038c3c0)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:00:00] [INFO]: 发送群 ***(***) 的消息: 该买药了 (-675757252) 
[2022-02-11 06:00:03] [WARNING]: 向反向WS Universal服务器推送 Event 时出现错误: write tcp 127.0.0.1:58142->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:00:06] [INFO]: 开始尝试连接到反向WebSocket Universal服务器: ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:00:06] [INFO]: 已连接到反向WebSocket Universal服务器 ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:02:00] [INFO]: 处置WS命令时发生无法恢复的异常:runtime error: index out of range [135552] with length 31
goroutine 31830 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xb25ea0, 0xc0006464e0})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x2f36314534364343, 0xc00023af90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:447 +0x1fd
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x4e386c65000000b3, 0xc00023af90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x32c00, 0xc00023af90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Get(0xc00018e500, 0x0)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:496 +0x28
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Get(0x1143440, {0xc00023b090, 0xb7ddaa, 0xc00023b090})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:45 +0xe5
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).makeImageOrVideoElem(0x0, 0x0, 0x0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:1340 +0x6b9
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ToElement(0xc00065e5a0, {0xc00035e04f, 0x5}, 0xc00023c2a0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:876 +0x1912
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage.func1()
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:583 +0xa5d
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage(0xc00065e5a0, {0xc00035e04b, 0x40}, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:640 +0x182
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0xc0004b2e80, {0x3, {0xc00035e04a, 0x42}, {0xc00035e04b, 0x40}, 0x0, 0x4a, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:725 +0x1f0
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004e0060, {0xc00035e00c, 0xe}, {0xc6d200, 0xc000708820})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:206 +0x21c5
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004e0060, {0xc00035e00c, 0xe}, {0xc6d200, 0xc000708820})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc00035e000, 0xa5, 0x1789})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc00038c3c0)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:02:00] [WARNING]: 监听反向WS Universal时出现错误: read tcp 127.0.0.1:57556->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:02:03] [WARNING]: 向反向WS Universal服务器推送 Event 时出现错误: write tcp 127.0.0.1:57556->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:02:06] [INFO]: 开始尝试连接到反向WebSocket Universal服务器: ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:02:06] [INFO]: 已连接到反向WebSocket Universal服务器 ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:04:00] [INFO]: 处置WS命令时发生无法恢复的异常:runtime error: index out of range [2531893909464291875] with length 31
goroutine 31858 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xb25ea0, 0xc0006463d8})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x2f36314534364343, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:447 +0x1fd
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x4e386c65000000b3, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x32c00, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Get(0xc00018e500, 0xc0007bcf00)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:496 +0x28
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Get(0x1143440, {0xc000243090, 0xb7ddaa, 0xc000243090})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:45 +0xe5
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).makeImageOrVideoElem(0x44d225, 0x471e25, 0x0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:1340 +0x6b9
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ToElement(0xc00065e5a0, {0xc00040334f, 0x5}, 0xc0002442a0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:876 +0x1912
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage.func1()
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:583 +0xa5d
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage(0xc00065e5a0, {0xc00040334b, 0x40}, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:640 +0x182
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0xc0004437c0, {0x3, {0xc00040334a, 0x42}, {0xc00040334b, 0x40}, 0x0, 0x4a, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:725 +0x1f0
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004f4920, {0xc00040330c, 0xe}, {0xc6d200, 0xc000708730})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:206 +0x21c5
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004f4920, {0xc00040330c, 0xe}, {0xc6d200, 0xc000708730})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc000403300, 0xa5, 0x11e3})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc00038c3c0)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:04:00] [WARNING]: 监听反向WS Universal时出现错误: read tcp 127.0.0.1:57686->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:04:03] [WARNING]: 向反向WS Universal服务器推送 Event 时出现错误: write tcp 127.0.0.1:57686->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:04:06] [INFO]: 开始尝试连接到反向WebSocket Universal服务器: ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:04:06] [INFO]: 已连接到反向WebSocket Universal服务器 ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:06:00] [INFO]: 处置WS命令时发生无法恢复的异常:runtime error: index out of range [1991184918069287708] with length 31
goroutine 31890 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xb25ea0, 0xc0006464e0})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x2f36314534364343, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:447 +0x1fd
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x4e386c65000000b3, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x32c00, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Get(0xc00018e500, 0xc000381ba0)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:496 +0x28
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Get(0x1143440, {0xc000243090, 0xb7ddaa, 0xc000243090})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:45 +0xe5
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).makeImageOrVideoElem(0xc000627c50, 0xc000627c60, 0x0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:1340 +0x6b9
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ToElement(0xc00065e5a0, {0xc00040334f, 0x5}, 0xc0002442a0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:876 +0x1912
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage.func1()
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:583 +0xa5d
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage(0xc00065e5a0, {0xc00040334b, 0x40}, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:640 +0x182
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0xc0004437c0, {0x3, {0xc00040334a, 0x42}, {0xc00040334b, 0x40}, 0x0, 0x4a, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:725 +0x1f0
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004f4bc0, {0xc00040330c, 0xe}, {0xc6d200, 0xc000708730})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:206 +0x21c5
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004f4bc0, {0xc00040330c, 0xe}, {0xc6d200, 0xc000708730})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc000403300, 0xa5, 0x11e3})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc00038c3c0)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:06:00] [WARNING]: 监听反向WS Universal时出现错误: read tcp 127.0.0.1:57808->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:06:03] [WARNING]: 向反向WS Universal服务器推送 Event 时出现错误: write tcp 127.0.0.1:57808->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:06:06] [INFO]: 开始尝试连接到反向WebSocket Universal服务器: ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:06:06] [INFO]: 已连接到反向WebSocket Universal服务器 ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:08:00] [INFO]: 处置WS命令时发生无法恢复的异常:runtime error: index out of range [793439200565372335] with length 31
goroutine 31922 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xb25ea0, 0xc000646408})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x2f36314534364343, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:447 +0x1fd
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x4e386c65000000b3, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).lookup(0xc00018e500, 0x32c00, 0xc000242f90)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:463 +0x1c5
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Get(0xc00018e500, 0xc000381ba0)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:496 +0x28
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Get(0x1143440, {0xc000243090, 0xb7ddaa, 0xc000243090})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:45 +0xe5
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).makeImageOrVideoElem(0xc000449280, 0xc0004492e0, 0x0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:1340 +0x6b9
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ToElement(0xc00065e5a0, {0xc00040334f, 0x5}, 0xc0002442a0, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:876 +0x1912
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage.func1()
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:583 +0xa5d
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).ConvertStringMessage(0xc00065e5a0, {0xc00040334b, 0x40}, 0x2)
    github.com/Mrs4s/go-cqhttp/coolq/cqcode.go:640 +0x182
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0xc0004437c0, {0x3, {0xc00040334a, 0x42}, {0xc00040334b, 0x40}, 0x0, 0x4a, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:725 +0x1f0
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004e0aa0, {0xc00040330c, 0xe}, {0xc6d200, 0xc000708690})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:206 +0x21c5
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004e0aa0, {0xc00040330c, 0xe}, {0xc6d200, 0xc000708690})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc000403300, 0xa5, 0x11e3})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc00038c3c0)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:08:00] [WARNING]: 监听反向WS Universal时出现错误: read tcp 127.0.0.1:57928->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:08:03] [WARNING]: 向反向WS Universal服务器推送 Event 时出现错误: write tcp 127.0.0.1:57928->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:08:06] [INFO]: 开始尝试连接到反向WebSocket Universal服务器: ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:08:06] [INFO]: 已连接到反向WebSocket Universal服务器 ws://127.0.0.1:18088/ws/ 

[2022-02-11 06:54:17] [INFO]: 收到群  ***(***) 内  ***(***) 的消息: 竹竹今日运势 (-223675877) 
[2022-02-11 06:54:18] [INFO]: 处置WS命令时发生无法恢复的异常:btree I/O error: EOF
goroutine 32631 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xae72e0, 0xc0009272f0})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).get(0x52, 0x7f6e9da0d108)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:71 +0x105
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insert(0xc00018e500, 0x4e386c65000000b3, 0xc000243f58, {0xc000700140, 0x98, 0xa0}, 0xc0000d7334)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:274 +0x65
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insert(0xc00018e500, 0x32c00, 0xc000243f58, {0xc000700140, 0x98, 0xa0}, 0x7f6e9da0d108)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:298 +0x1ea
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insertTopLevel(0xc00018e500, 0xc00018e508, 0xc000243f58, {0xc000700140, 0x0, 0xc000243f70}, 0x7050aa)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:404 +0x52
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Insert(0xc00018e500, 0x112f900, {0xc000700140, 0xc000976680, 0x43f3a5})
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:473 +0x4c
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Insert(0x1143440, {0xc000930df0, 0x10, 0x492d50}, {0xc000700140, 0x98, 0xa0})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:35 +0xdd
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).checkMedia(0xc00065e5a0, {0xc0007a89c0, 0x3, 0x45047c}, 0x1a00823b)
    github.com/Mrs4s/go-cqhttp/coolq/event.go:746 +0x8c7
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).SendGroupMessage(0xc00065e5a0, 0x3, 0xc0002444a0)
    github.com/Mrs4s/go-cqhttp/coolq/bot.go:256 +0x125
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0x0, {0x5, {0xc00066a6f4, 0xf2}, {0x0, 0x0}, 0x0, 0x74, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:729 +0x270
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendMessage(0xc00058ac00, 0xc00058ac80, 0xc00058ad00, {0x5, {0xc00066a6f4, 0xf2}, {0x0, 0x0}, 0x0, 0x74, ...}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:679 +0x5b
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004e06e0, {0xc00066a68c, 0x8}, {0xc6d200, 0xc0005f8b90})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:219 +0x69e
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004e06e0, {0xc00066a68c, 0x8}, {0xc6d200, 0xc0005f8b90})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc00066a680, 0x17f, 0x557})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc00038c3c0)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:54:18] [WARNING]: 监听反向WS Universal时出现错误: read tcp 127.0.0.1:58050->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:54:18] [WARNING]: 向反向WS Universal服务器推送 Event 时出现错误: write tcp 127.0.0.1:58050->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:54:21] [INFO]: 开始尝试连接到反向WebSocket Universal服务器: ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:54:21] [INFO]: 已连接到反向WebSocket Universal服务器 ws://127.0.0.1:18088/ws/ 
[2022-02-11 06:54:34] [INFO]: 收到群  ***(***) 内  ***(***) 的消息: 竹竹今日运势 (466181934) 
[2022-02-11 06:54:34] [INFO]: 处置WS命令时发生无法恢复的异常:btree I/O error: EOF
goroutine 32638 [running]:
runtime/debug.Stack()
    runtime/debug/stack.go:24 +0x65
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest.func1()
    github.com/Mrs4s/go-cqhttp/server/websocket.go:414 +0x45
panic({0xae72e0, 0xc0005ea300})
    runtime/panic.go:1038 +0x215
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).get(0x52, 0x7f6e9da0d5b8)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:71 +0x105
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insert(0xc00018e500, 0x4e386c65000000b3, 0xc000243f58, {0xc000088be0, 0x98, 0xa0}, 0xc0000281c4)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:274 +0x65
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insert(0xc00018e500, 0x32c00, 0xc000243f58, {0xc000088be0, 0x98, 0xa0}, 0x7f6e9da0d5b8)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:298 +0x1ea
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).insertTopLevel(0xc00018e500, 0xc00018e508, 0xc000243f58, {0xc000088be0, 0x0, 0xc000243f70}, 0x7050aa)
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:404 +0x52
github.com/Mrs4s/go-cqhttp/internal/btree.(*DB).Insert(0xc00018e500, 0x112f900, {0xc000088be0, 0xc0003b01a0, 0x43f3a5})
    github.com/Mrs4s/go-cqhttp/internal/btree/btree.go:473 +0x4c
github.com/Mrs4s/go-cqhttp/internal/cache.(*Cache).Insert(0x1143440, {0xc000930270, 0x10, 0x492d50}, {0xc000088be0, 0x98, 0xa0})
    github.com/Mrs4s/go-cqhttp/internal/cache/cache.go:35 +0xdd
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).checkMedia(0xc00065e5a0, {0xc0007a8540, 0x3, 0x45047c}, 0x1a00823b)
    github.com/Mrs4s/go-cqhttp/coolq/event.go:746 +0x8c7
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).SendGroupMessage(0xc00065e5a0, 0x3, 0xc0002444a0)
    github.com/Mrs4s/go-cqhttp/coolq/bot.go:256 +0x125
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendGroupMessage(0xc00065e5a0, 0x0, {0x5, {0xc00066a6f4, 0xf2}, {0x0, 0x0}, 0x0, 0x74, {0x0, ...}}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:729 +0x270
github.com/Mrs4s/go-cqhttp/coolq.(*CQBot).CQSendMessage(0xc0006196b0, 0xc0006196c0, 0xc0006196d0, {0x5, {0xc00066a6f4, 0xf2}, {0x0, 0x0}, 0x0, 0x74, ...}, ...)
    github.com/Mrs4s/go-cqhttp/coolq/api.go:679 +0x5b
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).call(0xc0004f4d20, {0xc00066a68c, 0x8}, {0xc6d200, 0xc0005f82d0})
    github.com/Mrs4s/go-cqhttp/modules/api/api.go:219 +0x69e
github.com/Mrs4s/go-cqhttp/modules/api.(*Caller).Call(0xc0004f4d20, {0xc00066a68c, 0x8}, {0xc6d200, 0xc0005f82d0})
    github.com/Mrs4s/go-cqhttp/modules/api/caller.go:34 +0xaa
github.com/Mrs4s/go-cqhttp/server.(*wsConn).handleRequest(0xc0006aa1f8, 0xc00065e5a0, {0xc00066a680, 0x17f, 0x557})
    github.com/Mrs4s/go-cqhttp/server/websocket.go:421 +0x525
github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI.func2(0xc00038c3c0)
    github.com/Mrs4s/go-cqhttp/server/websocket.go:268 +0x95
created by github.com/Mrs4s/go-cqhttp/server.(*websocketClient).listenAPI
    github.com/Mrs4s/go-cqhttp/server/websocket.go:266 +0x1b2

[2022-02-11 06:54:34] [WARNING]: 监听反向WS Universal时出现错误: read tcp 127.0.0.1:60862->127.0.0.1:18088: use of closed network connection 
[2022-02-11 06:54:38] [WARNING]: 向反向WS Universal服务器推送 Event 时出现错误: write tcp 127.0.0.1:60862->127.0.0.1:18088: use of closed network connection 


### 补充说明(可选)

_No response_
wdvxdr1123 commented 2 years ago

可能数据库损坏,可以删除 data/image.db 文件

assassingyk commented 2 years ago

好的谢谢我试一下