ZLMediaKit / ZLToolKit

一个基于C++11的轻量级网络框架,基于线程池技术可以实现大并发网络IO
MIT License
1.98k stars 588 forks source link

Testing found that Tcpserver crashes during operation. #197

Closed weibw-720 closed 11 months ago

weibw-720 commented 11 months ago

The following is the gdb stack information running in ubuntu 20.04 微信截图_20231222223249

以下是在ubuntu 20.04中运行的gdb堆栈信息 微信截图_20231222223249

TRANS_BY_GITHUB_AI_ASSISTANT

xia-chu commented 11 months ago

What version of ZLToolKit is this? Is this a bug in your secondary development?

ZLToolKit什么版本?你二开的bug吧?

TRANS_BY_GITHUB_AI_ASSISTANT

weibw-720 commented 11 months ago

In addition, I found that there was an error during compilation using the MINGW compiler under Windows. After resolving the error, running a test echo tcp_server showed that the CPU usage was very high, reaching over 20%. My test environment CPU is i7-12700. Everything is normal with the MSVC compiler.

另外我发现在windows下用MINGW编译器有个地方编译报错,解决了报错后,跑个测试回显tcp_server对cpu的使用都很高能达到20%以上,我的测试环境CPU是i7-12700。MSVC编译器的一切正常

TRANS_BY_GITHUB_AI_ASSISTANT

weibw-720 commented 11 months ago

微信图片_20231227144559

I pulled the latest master code, no extra branches opened.

微信图片_20231227144559

我这是拉取的最新的master代码,没有多开

TRANS_BY_GITHUB_AI_ASSISTANT

xia-chu commented 11 months ago

You need to call send in the poller thread, otherwise there will be thread safety issues.

你要再poller线程调用send 否则有线程安全问题

TRANS_BY_GITHUB_AI_ASSISTANT

weibw-720 commented 11 months ago

微信截图 I encountered this problem too. I saw someone else encountered the same problem in a previously closed issue.

微信截图 这个问题,我也遇到了,我看之前已关闭的issue中有一个人也遇到了同样问题

TRANS_BY_GITHUB_AI_ASSISTANT

weibw-720 commented 11 months ago

微信图片_20231229160754

微信图片_20231229160754

TRANS_BY_GITHUB_AI_ASSISTANT

xia-chu commented 11 months ago

This bug needs to be located by yourself. Bugs from secondary development all need to be located by yourself.

这个bug要自己定位 二次开发的bug 都需要自己定位

TRANS_BY_GITHUB_AI_ASSISTANT