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

CPU usage is high, located here. #183

Open
coolMre opened this issue Sep 18, 2023 · 14 comments
Open

CPU usage is high, located here. #183

coolMre opened this issue Sep 18, 2023 · 14 comments

Comments

@coolMre
Copy link
Contributor

coolMre commented Sep 18, 2023

https://github.com/ZLMediaKit/ZLToolKit/blob/28b7aea107089c17c6f10e8657d27a0815f85b25/src/Poller/EventPoller.cpp#L294C91-L294C91

This thread has been continuously occupying the cpu for more than 4 days

00000009`e427b520 00007ff6`9b63287c : 00000009`e3cb8dc8 00007ff6`00000001 00007ff6`9c248500 00000000`000000f8 : MediaServer!_InlineInterlockedAdd+0x17 [C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winnt.h @ 3049]
00000009`e427b530 00007ff6`9b6334ee : 00000009`e3cb8dc8 00000000`000000f8 00007ff6`9bcdae30 00000009`e23cdb60 : MediaServer!reflock_ref+0x1c [C:\Users\mre\Code\ZLMediaKit\3rdpart\wepoll\wepoll.c @ 1388]
00000009`e427b580 00007ff6`9b6317eb : 00007ff6`9c248500 00000000`000000f8 00000009`e427b660 00007ff6`9b5295d7 : MediaServer!ts_tree_find_and_ref+0x4e [C:\Users\mre\Code\ZLMediaKit\3rdpart\wepoll\wepoll.c @ 1775]
00000009`e427b5c0 00007ff6`9b5b204b : 00000000`000000f8 00000009`e427b6e0 cccccccc`00000400 00000009`0000053d : MediaServer!epoll_wait+0x5b [C:\Users\mre\Code\ZLMediaKit\3rdpart\wepoll\wepoll.c @ 563]
00000009`e427b610 00007ff6`9b59984a : 00000009`00000001 00000009`e427b6e0 00000009`00000400 00000000`0000053d : MediaServer!toolkit::epoll_wait+0x7b [C:\Users\mre\Code\ZLMediaKit\3rdpart\wepoll\sys\epoll.h @ 55]
00000009`e427b670 00007ff6`9b5a5735 : 00000009`e3cba550 00007ff6`9bd12101 00000009`e427f801 00007ff6`9bd37154 : MediaServer!toolkit::EventPoller::runLoop+0x1ea [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 306]
00000009`e427f8b0 00007ff6`9b5a24f5 : 00000009`e23dc440 00000009`e23dc438 00000009`e23dc431 00000009`e23dc430 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>+0x45 [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\type_traits @ 1573]
00000009`e427f8e0 00007ff6`9bcdaecc : 00000009`e23dc430 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!std::thread::_Invoke<std::tuple<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>,0,1,2,3>+0xb5 [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\thread @ 56]
00000009`e427f950 00007fff`439e13f2 : 00000009`e23cdb60 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!thread_start<unsigned int (__cdecl*)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
00000009`e427f9b0 00007fff`463754f4 : 00007fff`439e13d0 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000009`e427f9e0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34

https://github.com/ZLMediaKit/ZLToolKit/blob/28b7aea107089c17c6f10e8657d27a0815f85b25/src/Poller/EventPoller.cpp#L294C91-L294C91

该线程持续占用cpu 4天多

00000009`e427b520 00007ff6`9b63287c : 00000009`e3cb8dc8 00007ff6`00000001 00007ff6`9c248500 00000000`000000f8 : MediaServer!_InlineInterlockedAdd+0x17 [C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\winnt.h @ 3049]
00000009`e427b530 00007ff6`9b6334ee : 00000009`e3cb8dc8 00000000`000000f8 00007ff6`9bcdae30 00000009`e23cdb60 : MediaServer!reflock_ref+0x1c [C:\Users\mre\Code\ZLMediaKit\3rdpart\wepoll\wepoll.c @ 1388]
00000009`e427b580 00007ff6`9b6317eb : 00007ff6`9c248500 00000000`000000f8 00000009`e427b660 00007ff6`9b5295d7 : MediaServer!ts_tree_find_and_ref+0x4e [C:\Users\mre\Code\ZLMediaKit\3rdpart\wepoll\wepoll.c @ 1775]
00000009`e427b5c0 00007ff6`9b5b204b : 00000000`000000f8 00000009`e427b6e0 cccccccc`00000400 00000009`0000053d : MediaServer!epoll_wait+0x5b [C:\Users\mre\Code\ZLMediaKit\3rdpart\wepoll\wepoll.c @ 563]
00000009`e427b610 00007ff6`9b59984a : 00000009`00000001 00000009`e427b6e0 00000009`00000400 00000000`0000053d : MediaServer!toolkit::epoll_wait+0x7b [C:\Users\mre\Code\ZLMediaKit\3rdpart\wepoll\sys\epoll.h @ 55]
00000009`e427b670 00007ff6`9b5a5735 : 00000009`e3cba550 00007ff6`9bd12101 00000009`e427f801 00007ff6`9bd37154 : MediaServer!toolkit::EventPoller::runLoop+0x1ea [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 306]
00000009`e427f8b0 00007ff6`9b5a24f5 : 00000009`e23dc440 00000009`e23dc438 00000009`e23dc431 00000009`e23dc430 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>+0x45 [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\type_traits @ 1573]
00000009`e427f8e0 00007ff6`9bcdaecc : 00000009`e23dc430 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!std::thread::_Invoke<std::tuple<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>,0,1,2,3>+0xb5 [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\thread @ 56]
00000009`e427f950 00007fff`439e13f2 : 00000009`e23cdb60 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!thread_start<unsigned int (__cdecl*)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
00000009`e427f9b0 00007fff`463754f4 : 00007fff`439e13d0 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000009`e427f9e0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

xia-chu commented Sep 18, 2023

This is epoll sleeping. This doesn't count as CPU usage.

Windows uses the wepoll project to implement poll. The underlying implementation uses IOCP.

这是epoll在休眠啊 这个谈不上占用cpu
Windows上用的wepoll项目实现的poll 这个底层用的iocp

TRANS_BY_GITHUB_AI_ASSISTANT

@coolMre
Copy link
Contributor Author

coolMre commented Sep 18, 2023

这是epoll在休眠啊 这个谈不上占用cpu Windows上用的wepoll项目实现的poll 这个底层用的iocp

Is it normal for the server CPU usage to be around 30% even without any video streams being loaded?

这是epoll在休眠啊 这个谈不上占用cpu Windows上用的wepoll项目实现的poll 这个底层用的iocp

没负载任何视频流的情况下,服务器CPU占用一直在30左右也是正常吗?

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

xia-chu commented Sep 18, 2023

这是epoll在休眠啊 这个谈不上占用cpu Windows上用的wepoll项目实现的poll 这个底层用的iocp

没负载任何视频流的情况下,服务器CPU占用一直在30左右也是正常吗?

Not normal. In theory, wepoll should not cause the CPU to idle.
You can first disable the wepoll feature, cmake -DENABLE_WEPOLL=off

这是epoll在休眠啊 这个谈不上占用cpu Windows上用的wepoll项目实现的poll 这个底层用的iocp

没负载任何视频流的情况下,服务器CPU占用一直在30左右也是正常吗?

不正常。 按道理wepoll不会导致cpu空转。
你可以先关闭wepoll的特性,cmake -DENABLE_WEPOLL=off

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

xia-chu commented Sep 18, 2023

zlm enables wepoll by default on Windows. If it's not enabled, it uses the select scheme.

zlm在Windows上默认开启wepoll 不开启的话 用的select方案

TRANS_BY_GITHUB_AI_ASSISTANT

@coolMre
Copy link
Contributor Author

coolMre commented Sep 18, 2023

这是epoll在休眠啊 这个谈不上占用cpu Windows上用的wepoll项目实现的poll 这个底层用的iocp

没负载任何视频流的情况下,服务器CPU占用一直在30左右也是正常吗?

不正常。 按道理wepoll不会导致cpu空转。 你可以先关闭wepoll的特性,cmake -DENABLE_WEPOLL=off

Okay, I'll close wepoll first and try again. If there are any problems, I'll come back and give feedback.

这是epoll在休眠啊 这个谈不上占用cpu Windows上用的wepoll项目实现的poll 这个底层用的iocp

没负载任何视频流的情况下,服务器CPU占用一直在30左右也是正常吗?

不正常。 按道理wepoll不会导致cpu空转。 你可以先关闭wepoll的特性,cmake -DENABLE_WEPOLL=off

好的,我先关闭wepoll试试,后面有问题再来反馈

TRANS_BY_GITHUB_AI_ASSISTANT

@coolMre
Copy link
Contributor Author

coolMre commented Sep 21, 2023

00000018`3200f218 00007ff7`c1a1f33d : 00000018`337b1b90 00000018`337b1b90 00000000`00000000 00000018`00000001 : MediaServer!header_from_block+0xa [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 172]
00000018`3200f220 00007ff7`c1a23595 : 00000018`337b1b90 00000018`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!free_dbg_nolock+0x14d [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 907]
00000018`3200f290 00007ff7`c1937e68 : 00000018`337b1b90 cccccccc`ffffffff cccccccc`cccccccc cccccccc`cccccccc : MediaServer!_free_dbg+0x55 [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 1030]
00000018`3200f2d0 00007ff7`c1934708 : 00000018`337b1b90 cccccccc`cccccccc cccccccc`cccccccc cccccccc`cccccccc : MediaServer!operator delete+0x18 [d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\heap\delete_scalar.cpp @ 38]
00000018`3200f300 00007ff7`c102275c : 00000018`337b1b90 00000000`00000020 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!operator delete+0x18 [d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\heap\delete_scalar_size.cpp @ 32]
00000018`3200f330 00007ff7`c11f976b : 00000018`337b1b90 00000000`00000020 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!std::_Deallocate<16,0>+0x4c [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xmemory @ 221]
00000018`3200f360 00007ff7`c11e5826 : 00000018`3200f538 00000018`337b1b90 00000000`00000001 cccccccc`cccccccc : MediaServer+0x25976b [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xmemory @ 697]
00000018`3200f390 00007ff7`c11e5b00 : 00000018`3200f538 00000018`337b1b90 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x245826 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 312]
00000018`3200f3c0 00007ff7`c11e5580 : 00000018`3200f538 00000018`337b1b90 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x245b00 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 318]
00000018`3200f3f0 00007ff7`c11f95ad : 00000018`3200f538 00000018`2feebb40 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x245580 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 330]
00000018`3200f430 00007ff7`c11ddc8f : 00000018`3200f538 00000018`3200f628 00000018`3200f4f8 00000018`3200f518 : MediaServer+0x2595ad [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 1430]
00000018`3200f470 00007ff7`c11e92c9 : 00000018`3185fee0 cccccccc`cccccc01 cccccccc`cccccc01 cccccccc`cccccccc : MediaServer+0x23dc8f [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 392]
00000018`3200f6b0 00007ff7`c11e60d3 : 00000018`2feeba30 00000018`2feeba28 00000018`2feeba21 00000018`2feeba20 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>+0x59 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000018`3200f6e0 00007ff7`c1a41d9c : 00000018`2feeba20 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer+0x2460d3 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\thread @ 44]
00000018`3200f750 00007fff`439e13f2 : 00000018`31857ba0 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!thread_start<unsigned int (__cdecl*)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
00000018`3200f7b0 00007fff`463754f4 : 00007fff`439e13d0 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000018`3200f7e0 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34

Closing wepoll still results in high CPU usage.

000000183200f218 00007ff7c1a1f33d : 00000018337b1b90 00000018337b1b90 0000000000000000 0000001800000001 : MediaServer!header_from_block+0xa [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 172]
000000183200f220 00007ff7c1a23595 : 00000018337b1b90 0000001800000001 cccccccccccccccc cccccccccccccccc : MediaServer!free_dbg_nolock+0x14d [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 907]
000000183200f290 00007ff7c1937e68 : 00000018337b1b90 ccccccccffffffff cccccccccccccccc cccccccccccccccc : MediaServer!_free_dbg+0x55 [minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp @ 1030]
000000183200f2d0 00007ff7c1934708 : 00000018337b1b90 cccccccccccccccc cccccccccccccccc cccccccccccccccc : MediaServer!operator delete+0x18 [d:\agent_work\63\s\src\vctools\crt\vcstartup\src\heap\delete_scalar.cpp @ 38]
000000183200f300 00007ff7c102275c : 00000018337b1b90 0000000000000020 cccccccccccccccc cccccccccccccccc : MediaServer!operator delete+0x18 [d:\agent_work\63\s\src\vctools\crt\vcstartup\src\heap\delete_scalar_size.cpp @ 32]
000000183200f330 00007ff7c11f976b : 00000018337b1b90 0000000000000020 cccccccccccccccc cccccccccccccccc : MediaServer!std::_Deallocate<16,0>+0x4c [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xmemory @ 221]
000000183200f360 00007ff7c11e5826 : 000000183200f538 00000018337b1b90 0000000000000001 cccccccccccccccc : MediaServer+0x25976b [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\xmemory @ 697]
000000183200f390 00007ff7c11e5b00 : 000000183200f538 00000018337b1b90 cccccccccccccccc cccccccccccccccc : MediaServer+0x245826 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 312]
000000183200f3c0 00007ff7c11e5580 : 000000183200f538 00000018337b1b90 cccccccccccccccc cccccccccccccccc : MediaServer+0x245b00 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 318]
000000183200f3f0 00007ff7c11f95ad : 000000183200f538 000000182feebb40 cccccccccccccccc cccccccccccccccc : MediaServer+0x245580 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 330]
000000183200f430 00007ff7c11ddc8f : 000000183200f538 000000183200f628 000000183200f4f8 000000183200f518 : MediaServer+0x2595ad [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\list @ 1430]
000000183200f470 00007ff7c11e92c9 : 000000183185fee0 cccccccccccccc01 cccccccccccccc01 cccccccccccccccc : MediaServer+0x23dc8f [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 392]
000000183200f6b0 00007ff7c11e60d3 : 000000182feeba30 000000182feeba28 000000182feeba21 000000182feeba20 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller ,bool,bool>+0x59 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
000000183200f6e0 00007ff7c1a41d9c : 000000182feeba20 0000000000000000 0000000000000000 0000000000000000 : MediaServer+0x2460d3 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\thread @ 44]
000000183200f750 00007fff439e13f2 : 0000001831857ba0 0000000000000000 0000000000000000 0000000000000000 : MediaServer!thread_start<unsigned int (__cdecl
)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
000000183200f7b0 00007fff463754f4 : 00007fff439e13d0 0000000000000000 0000000000000000 0000000000000000 : kernel32!BaseThreadInitThunk+0x22
000000183200f7e0 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 0000000000000000 : ntdll!RtlUserThreadStart+0x34


关闭wepoll还是会出现CPU过高的问题。

`TRANS_BY_GITHUB_AI_ASSISTANT`

@xia-chu
Copy link
Member

xia-chu commented Sep 21, 2023

This is caused by the execution of the timer task. Did you set up a lot of timers?

这是执行定时器任务导致的 你是不是搞了很多定时器?

TRANS_BY_GITHUB_AI_ASSISTANT

@coolMre
Copy link
Contributor Author

coolMre commented Sep 21, 2023

这是执行定时器任务导致的 你是不是搞了很多定时器?
The server logs show a lot of warnings, but I don't know why the timer is generated.
2023-09-21 15:54:58.718 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 15:55:28.719 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 15:55:58.720 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 8ms, thread may be overloaded
2023-09-21 15:57:58.723 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 15:58:28.725 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 16:01:28.728 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 16:01:58.729 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 8ms, thread may be overloaded

这是执行定时器任务导致的 你是不是搞了很多定时器?
服务器日志里面显示非常多告警,但是我并不清楚定时器产生的原因
2023-09-21 15:54:58.718 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 15:55:28.719 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 15:55:58.720 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 8ms, thread may be overloaded
2023-09-21 15:57:58.723 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 15:58:28.725 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 16:01:28.728 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 6ms, thread may be overloaded
2023-09-21 16:01:58.729 W [MediaServer.exe] [19460-21000] EventPoller.cpp:201 as
ync_l | take time: 8ms, thread may be overloaded

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

xia-chu commented Sep 21, 2023

Have you done any secondary development?

你有做二次开发吗

TRANS_BY_GITHUB_AI_ASSISTANT

@coolMre
Copy link
Contributor Author

coolMre commented Sep 21, 2023

你有做二次开发吗

No

你有做二次开发吗

没有

TRANS_BY_GITHUB_AI_ASSISTANT

@xia-chu
Copy link
Member

xia-chu commented Sep 21, 2023

@baiyfcu Have you encountered this situation?

@baiyfcu 你有遇到这个情况吗

TRANS_BY_GITHUB_AI_ASSISTANT

@coolMre
Copy link
Contributor Author

coolMre commented Nov 2, 2023

CPU usage 50%

00000004`28efec78 00007ffc`c94b9823 : 00007ff6`1c401d00 00007ff6`1c44297d 00000004`29c33730 00007ff6`1c3e1601 : ntdll!ZwDeviceIoControlFile+0xa
00000004`28efec80 00007ffc`c94c1656 : 00000000`00000364 00000004`291b4fa0 00000000`00000364 00000004`28efeef4 : mswsock!WSPRecv+0x2ef
00000004`28efed80 00007ffc`cc9544fd : 00000000`00000364 00000004`26f4d270 00000004`299c3790 00000004`28efeef4 : mswsock!WSPRecvFrom+0x5bb
*** WARNING: Unable to verify checksum for MediaServer.exe
00000004`28efee90 00007ff6`1bbd75c8 : 00007ff6`1c401d00 00000004`28849e90 cccccccc`cccccccc cccccccc`00000000 : ws2_32!recvfrom+0xcd
00000004`28efef30 00007ff6`1bbebf16 : 00000004`28890db0 00000004`00000364 cccccccc`00000000 00000004`29dd29f8 : MediaServer+0x2775c8 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Network\Socket.cpp @ 269]
00000004`28eff240 00007ff6`1bbe40b4 : 00000004`29dd29e0 cccccccc`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x28bf16 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Network\Socket.cpp @ 247]
00000004`28eff310 00007ff6`1bbdf812 : 00000004`29dd29e0 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!std::invoke<<lambda_5a1320b3a72159d00c193c6ce321b356> &,int>+0x34 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000004`28eff340 00007ff6`1bbefa0e : 00000004`29dd29e0 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x27f812 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 745]
00000004`28eff370 00007ff6`1bbb185e : 00000004`29dd29d8 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x28fa0e [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 948]
00000004`28eff3a0 00007ff6`1bbb129c : 00000004`29dd29d8 cccccccc`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x25185e [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 996]
00000004`28eff3e0 00007ff6`1bba8baf : 00000004`28eff6d8 00000004`2990f490 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x25129c [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 386]
00000004`28eff480 00007ff6`1bb9dc82 : 00000004`28eff5e8 00000004`28eff6d8 00000004`28eff5a8 00000004`28eff5c8 : MediaServer+0x248baf [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Util\List.h @ 203]
00000004`28eff520 00007ff6`1bba92c9 : 00000004`28846cb0 cccccccc`cccccc01 cccccccc`cccccc01 cccccccc`cccccccc : MediaServer+0x23dc82 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 391]
00000004`28eff760 00007ff6`1bba60d3 : 00000004`26f49910 00000004`26f49908 00000004`26f49901 00000004`26f49900 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>+0x59 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000004`28eff790 00007ff6`1c401d9c : 00000004`26f49900 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer+0x2460d3 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\thread @ 44]
00000004`28eff800 00007ffc`cc8013f2 : 00000004`28849e90 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!thread_start<unsigned int (__cdecl*)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
00000004`28eff860 00007ffc`ccb654f4 : 00007ffc`cc8013d0 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000004`28eff890 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34

CPU占用50%

00000004`28efec78 00007ffc`c94b9823 : 00007ff6`1c401d00 00007ff6`1c44297d 00000004`29c33730 00007ff6`1c3e1601 : ntdll!ZwDeviceIoControlFile+0xa
00000004`28efec80 00007ffc`c94c1656 : 00000000`00000364 00000004`291b4fa0 00000000`00000364 00000004`28efeef4 : mswsock!WSPRecv+0x2ef
00000004`28efed80 00007ffc`cc9544fd : 00000000`00000364 00000004`26f4d270 00000004`299c3790 00000004`28efeef4 : mswsock!WSPRecvFrom+0x5bb
*** WARNING: Unable to verify checksum for MediaServer.exe
00000004`28efee90 00007ff6`1bbd75c8 : 00007ff6`1c401d00 00000004`28849e90 cccccccc`cccccccc cccccccc`00000000 : ws2_32!recvfrom+0xcd
00000004`28efef30 00007ff6`1bbebf16 : 00000004`28890db0 00000004`00000364 cccccccc`00000000 00000004`29dd29f8 : MediaServer+0x2775c8 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Network\Socket.cpp @ 269]
00000004`28eff240 00007ff6`1bbe40b4 : 00000004`29dd29e0 cccccccc`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x28bf16 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Network\Socket.cpp @ 247]
00000004`28eff310 00007ff6`1bbdf812 : 00000004`29dd29e0 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer!std::invoke<<lambda_5a1320b3a72159d00c193c6ce321b356> &,int>+0x34 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000004`28eff340 00007ff6`1bbefa0e : 00000004`29dd29e0 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x27f812 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 745]
00000004`28eff370 00007ff6`1bbb185e : 00000004`29dd29d8 00000004`28eff3e8 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x28fa0e [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 948]
00000004`28eff3a0 00007ff6`1bbb129c : 00000004`29dd29d8 cccccccc`00000001 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x25185e [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\functional @ 996]
00000004`28eff3e0 00007ff6`1bba8baf : 00000004`28eff6d8 00000004`2990f490 cccccccc`cccccccc cccccccc`cccccccc : MediaServer+0x25129c [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 386]
00000004`28eff480 00007ff6`1bb9dc82 : 00000004`28eff5e8 00000004`28eff6d8 00000004`28eff5a8 00000004`28eff5c8 : MediaServer+0x248baf [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Util\List.h @ 203]
00000004`28eff520 00007ff6`1bba92c9 : 00000004`28846cb0 cccccccc`cccccc01 cccccccc`cccccc01 cccccccc`cccccccc : MediaServer+0x23dc82 [C:\Users\mre\Code\ZLMediaKit\3rdpart\ZLToolKit\src\Poller\EventPoller.cpp @ 391]
00000004`28eff760 00007ff6`1bba60d3 : 00000004`26f49910 00000004`26f49908 00000004`26f49901 00000004`26f49900 : MediaServer!std::invoke<void (__cdecl toolkit::EventPoller::*)(bool,bool),toolkit::EventPoller *,bool,bool>+0x59 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\type_traits @ 1614]
00000004`28eff790 00007ff6`1c401d9c : 00000004`26f49900 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer+0x2460d3 [C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\thread @ 44]
00000004`28eff800 00007ffc`cc8013f2 : 00000004`28849e90 00000000`00000000 00000000`00000000 00000000`00000000 : MediaServer!thread_start<unsigned int (__cdecl*)(void *),1>+0x9c [minkernel\crts\ucrt\src\appcrt\startup\thread.cpp @ 97]
00000004`28eff860 00007ffc`ccb654f4 : 00007ffc`cc8013d0 00000000`00000000 00000000`00000000 00000000`00000000 : kernel32!BaseThreadInitThunk+0x22
00000004`28eff890 00000000`00000000 : 00000000`00000000 00000000`00000000 00000000`00000000 00000000`00000000 : ntdll!RtlUserThreadStart+0x34


`TRANS_BY_GITHUB_AI_ASSISTANT`

@xia-chu
Copy link
Member

xia-chu commented Nov 2, 2023

CPU占用50%

Is there a lot of network data being received?

CPU占用50%

有大量的网络数据接收?

TRANS_BY_GITHUB_AI_ASSISTANT

@coolMre
Copy link
Contributor Author

coolMre commented Nov 2, 2023

CPU占用50%

有大量的网络数据接收?

No

CPU占用50%

有大量的网络数据接收?

没有

TRANS_BY_GITHUB_AI_ASSISTANT

@alexliyu7352 alexliyu7352 changed the title CPU占用很高,定位到这里 CPU usage is high, located here. Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants