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

[Bug]: 开启数小时后,刷新 token 出现错误: This mutex is not locked server #2347

Closed
4 tasks done
ghost opened this issue Aug 2, 2023 · 7 comments
Closed
4 tasks done
Labels
bug? The issue author think this is a bug

Comments

@ghost
Copy link

ghost commented Aug 2, 2023

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

  • 我已经仔细阅读上述教程和 "提问前需知"
  • 我已经使用 dev分支版本 测试过,问题依旧存在。
  • 我已经在 Issue Tracker 中找过我要提出的问题,没有找到相同问题的ISSUE。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。(这些问题应当在 Discussion 板块提出。)

go-cqhttp 版本

dev

运行环境

Linux

运行架构

AMD64

连接方式

WebSocket (反向)

使用协议

6 | aPad

重现步骤

不确定是哪里的问题。
docker里运行最新的go-cqhttp-dev和qsign-1.1.7,连接同一网络。
运行几个小时之后,go-cqhttp开始在刷新token时出现如下警告:

[2023-08-03 01:31:27] [INFO]: 正在刷新 token
[2023-08-03 01:31:32] [WARNING]: 刷新 token 出现错误: This mutex is not locked server: http:https://qsign:8080
[2023-08-03 02:11:27] [INFO]: 正在刷新 token
[2023-08-03 02:11:32] [WARNING]: 刷新 token 出现错误: This mutex is not locked server: http:https://qsign:8080

此时仍然可以接收和发送消息,但是再过几个小时可能就不行了。

qsign默认配置无修改,日志没有错误信息。
go-cqhttp部分配置如下:
sign-server: 'http:https://qsign:8080'
sign-server-bearer: '-'
is-below-110: false
key: '114514'
auto-register: true
auto-refresh-token: true
refresh-interval: 40

期望的结果是什么?

刷新token成功

实际的结果是什么?

刷新token失败

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

No response

日志记录(可选)

No response

补充说明(可选)

No response

@ghost ghost added the bug? The issue author think this is a bug label Aug 2, 2023
@fumiama
Copy link
Collaborator

fumiama commented Aug 3, 2023

怀疑是qsign server的报错,请更新最新dev版本看看新的log打印以确定。

@1umine
Copy link
Contributor

1umine commented Aug 3, 2023

应该是有callback没提交上,token没法正常刷新,qsign 可能会返回 This mutex is not locked server,或者短时间内多次刷新了token也会出这个。建议提供更多可能相关的日志,以及使用的gocq的来源(直接链接最好,方便找到相应代码)

@ghost
Copy link
Author

ghost commented Aug 3, 2023

感谢大大们回复,gocq版本是actions docker最新的3b99a82
token是每40分钟刷新一次,应该没短时间多次刷新。
开启debug日志后如下,还是没有什么有用的信息,大概可能是qsign的问题,这里就先关掉issue了。
QQ截图20230804055133

@ghost ghost closed this as completed Aug 3, 2023
@fumiama
Copy link
Collaborator

fumiama commented Aug 4, 2023

感谢大大们回复,gocq版本是actions docker最新的3b99a82 token是每40分钟刷新一次,应该没短时间多次刷新。 开启debug日志后如下,还是没有什么有用的信息,大概可能是qsign的问题,这里就先关掉issue了。 QQ截图20230804055133

最新的日志主要就是为了确定 This mutex is not locked 是 qsign 的报错消息,现在已经可以确定确实如此。那么就有可能是这个原因了

应该是有callback没提交上,token没法正常刷新,qsign 可能会返回 This mutex is not locked server,或者短时间内多次刷新了token也会出这个。建议提供更多可能相关的日志,以及使用的gocq的来源(直接链接最好,方便找到相应代码)

@fumiama
Copy link
Collaborator

fumiama commented Aug 4, 2023

试试最新dev.

fumiama added a commit that referenced this issue Aug 4, 2023
@zzz6839
Copy link

zzz6839 commented Aug 5, 2023

最新的dev没有修复This mutex is not locked的问题。

(base) z@JOJO:~$ docker image inspect d0507a32e7eeffe1dd9f2c91b14720cfb0526b2352ea852c4544d67aa0812ffc
[
    {
        "Id": "sha256:d0507a32e7eeffe1dd9f2c91b14720cfb0526b2352ea852c4544d67aa0812ffc",
        "RepoTags": [
            "ghcr.io/mrs4s/go-cqhttp:dev"
        ],
        "RepoDigests": [
            "ghcr.io/mrs4s/go-cqhttp@sha256:39afa55975458c95047ffe99bf7fb86577060ec5b6ee47e0121dbd779a5318fb"
2023-08-06 00:03:58 [2023-08-06 00:03:58] [INFO]: 收到服务器地址更新通知, 将在下一次重连时应用.  
2023-08-06 00:06:54 [2023-08-06 00:06:54] [INFO]: 正在刷新 token 
2023-08-06 00:06:59 [2023-08-06 00:06:59] [WARNING]: 刷新 token 出现错误: code=1, msg: This mutex is not locked. server: http:https://192.168.1.154:6753 
2023-08-06 00:33:19 [2023-08-06 00:33:19] [INFO]: 收到好友 A( ) 的消息: 后台管理 (-
2023-08-06 00:33:20 [2023-08-06 00:33:20] [INFO]: 发送好友 ()  的消息: [{"type":  ... (-
2023-08-06 00:46:54 [2023-08-06 00:46:54] [INFO]: 正在刷新 token 
2023-08-06 00:46:59 [2023-08-06 00:46:59] [WARNING]: 刷新 token 出现错误: code=1, msg: This mutex is not locked. server: http:https://192.168.1.154:6753 
2023-08-06 01:26:54 [2023-08-06 01:26:54] [INFO]: 正在刷新 token 
2023-08-06 01:26:59 [2023-08-06 01:26:59] [WARNING]: 刷新 token 出现错误: code=1, msg: This mutex is not locked. server: http:https://192.168.1.154:6753

@1umine
Copy link
Contributor

1umine commented Aug 5, 2023

最新的dev没有修复This mutex is not locked的问题。

(base) z@JOJO:~$ docker image inspect d0507a32e7eeffe1dd9f2c91b14720cfb0526b2352ea852c4544d67aa0812ffc
[
    {
        "Id": "sha256:d0507a32e7eeffe1dd9f2c91b14720cfb0526b2352ea852c4544d67aa0812ffc",
        "RepoTags": [
            "ghcr.io/mrs4s/go-cqhttp:dev"
        ],
        "RepoDigests": [
            "ghcr.io/mrs4s/go-cqhttp@sha256:39afa55975458c95047ffe99bf7fb86577060ec5b6ee47e0121dbd779a5318fb"
2023-08-06 00:03:58 [2023-08-06 00:03:58] [INFO]: 收到服务器地址更新通知, 将在下一次重连时应用.  
2023-08-06 00:06:54 [2023-08-06 00:06:54] [INFO]: 正在刷新 token 
2023-08-06 00:06:59 [2023-08-06 00:06:59] [WARNING]: 刷新 token 出现错误: code=1, msg: This mutex is not locked. server: http:https://192.168.1.154:6753 
2023-08-06 00:33:19 [2023-08-06 00:33:19] [INFO]: 收到好友 A( ) 的消息: 后台管理 (-
2023-08-06 00:33:20 [2023-08-06 00:33:20] [INFO]: 发送好友 ()  的消息: [{"type":  ... (-
2023-08-06 00:46:54 [2023-08-06 00:46:54] [INFO]: 正在刷新 token 
2023-08-06 00:46:59 [2023-08-06 00:46:59] [WARNING]: 刷新 token 出现错误: code=1, msg: This mutex is not locked. server: http:https://192.168.1.154:6753 
2023-08-06 01:26:54 [2023-08-06 01:26:54] [INFO]: 正在刷新 token 
2023-08-06 01:26:59 [2023-08-06 01:26:59] [WARNING]: 刷新 token 出现错误: code=1, msg: This mutex is not locked. server: http:https://192.168.1.154:6753

感觉是qsign的问题,可能还能追到unibdg上(

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? The issue author think this is a bug
Projects
None yet
Development

No branches or pull requests

3 participants