Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

发送图片失败,CPU占用100%并且卡死 #377

Closed
hikinsley opened this issue Jun 18, 2022 · 0 comments
Closed

发送图片失败,CPU占用100%并且卡死 #377

hikinsley opened this issue Jun 18, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@hikinsley
Copy link

hikinsley commented Jun 18, 2022

Node.js Version

v16.13.1

Package(oicq) Version

npm -v: 8.1.2

Login Protocol

iMac

Bug Description (最好截图说明,你的文字描述可能无法准确传达信息)

运行环境:
华数宽带,群晖Nas里的Docker,Centos8容器
部署的项目为Yunzai-Bot( https://github.com/Le-niao/Yunzai-Bot ),里面使用了oicq2.2.3版本

问题描述:
半个月前(2022年6月1日左右)部署了Yunzai-Bot,并且运行正常,直到几天前出现图片无法上传问题(其他信息可正常发出),经过初步排查,发现发送图片时,oicq代码如下位置发生死循环(只是自己debug发现):
image
根据日志文件(当时日志被我清掉了。。)发现最后一个日志输出是这里:
image

重装、重新部署等操作做完后,又发现给docker容器断网30秒(oicq检测断连的时间),再连接容器网络就可以发图了,对比改变的输出信息:
this.logger.debug(highway ip:${ip} port:${port});
发现,当port为80时,无法发出图片,当port为8080(或者443、14000等等其他端口)时,图片可以发送。
翻阅源码看有关oicq选择端口号的代码片段发现似乎与这里有关:
image
*不知道上图的ip和port从哪来,参考其他位置的代码发现似乎port有多个可选择,但代码只用了其中一个(似乎是腾讯返回)
image

个人猜测:
运营商有问题,因为更换为联通5G后发送图片信息就正常了,另外oicq有没有办法判断发送图片的地址是有效的,或者Yunzai-Bot配置上有疏漏,希望得到解答。

我的临时解决办法:
用sed在这里插入一个写死的port(用于代替自己识别到的80端口),目前运行正常。
image

其他:
我在oicq文档里写的这个群里,可以提供测试环境:
image
@47492249

只是一晚上分析了下,可能会有描述不清或有错误的地方。
谢谢大佬🙏。

takayama-lily added a commit that referenced this issue Jun 18, 2022
@takayama-lily takayama-lily added the bug Something isn't working label Jun 18, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants