设为首页收藏本站

ZMX - IT技术交流论坛 - 无限Perfect,追求梦想 - itzmx.com

 找回密码
 注册论坛

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

用百度帐号登录

只需两步,快速登录

搜索
查看: 42|回复: 0

Linux docker运行程序空载CPU吃满的原因wxWidgets程序框架

[复制链接]
 成长值: 333

签到天数: 4736 天

[LV.Master]伴坛终老

发表于 2024/12/20 22:30 | 显示全部楼层 |阅读模式 |Google Chrome 131.0.0.0|Windows 10
天涯海角搜一下: 百度 谷歌 360 搜狗 有道 雅虎 必应 即刻
Linux docker运行程序空载CPU吃满的原因wxWidgets程序框架

gdb分析线程情况
warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable.  Connect to gdbserver inside the container.
0x00007f8c6799d68e in ?? ()
Missing separate debuginfos, use: debuginfo-install glibc-2.17-326.el7_9.3.x86_64
(gdb) bt
#0  0x00007f8c6799d68e in ?? ()
#1  0x00007fff63852200 in ?? ()
#2  0x00000017638521f0 in ?? ()
#3  0x00007fff638523e0 in ?? ()
#4  0x0000000000000010 in ?? ()
#5  0x00007fff63852200 in ?? ()
#6  0x00005600d3a5fb3a in wxEpollDispatcher::DoPoll(epoll_event*, int, int) const ()
#7  0x00005600d3a6060e in wxEpollDispatcher::Dispatch(int) ()
#8  0x00005600d39e5858 in wxConsoleEventLoop::DispatchTimeout(unsigned long) ()
#9  0x00005600d39e5591 in wxConsoleEventLoop::Dispatch() ()
#10 0x00005600d39405f2 in wxEventLoopManual::ProcessEvents() ()
#11 0x00005600d39406a5 in wxEventLoopManual::DoRun() ()
#12 0x00005600d39403bd in wxEventLoopBase::Run() ()
#13 0x00005600d3918ced in wxAppConsoleBase::OnRun() ()
#14 0x00005600d397ab82 in wxEntry(int&, wchar_t**) ()
#15 0x00005600d327ff98 in main ()
(gdb) t 1
[Switching to thread 1 (process 8578)]
#0  0x00007f8c6799d68e in ?? ()
(gdb) bt
#0  0x00007f8c6799d68e in ?? ()
#1  0x00007fff63852200 in ?? ()
#2  0x00000017638521f0 in ?? ()
#3  0x00007fff638523e0 in ?? ()
#4  0x0000000000000010 in ?? ()
#5  0x00007fff63852200 in ?? ()
#6  0x00005600d3a5fb3a in wxEpollDispatcher::DoPoll(epoll_event*, int, int) const ()
#7  0x00005600d3a6060e in wxEpollDispatcher::Dispatch(int) ()
#8  0x00005600d39e5858 in wxConsoleEventLoop::DispatchTimeout(unsigned long) ()
#9  0x00005600d39e5591 in wxConsoleEventLoop::Dispatch() ()
#10 0x00005600d39405f2 in wxEventLoopManual::ProcessEvents() ()
#11 0x00005600d39406a5 in wxEventLoopManual::DoRun() ()
#12 0x00005600d39403bd in wxEventLoopBase::Run() ()
#13 0x00005600d3918ced in wxAppConsoleBase::OnRun() ()
#14 0x00005600d397ab82 in wxEntry(int&, wchar_t**) ()
#15 0x00005600d327ff98 in main ()

warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable.  Connect to gdbserver inside the container.
0x00007f8c6799d68e in ?? ()
Missing separate debuginfos, use: debuginfo-install glibc-2.17-326.el7_9.3.x86_64
(gdb) bt
#0  0x00007f8c6799d68e in ?? ()
#1  0x00062964bb0d0442 in ?? ()
#2  0x0000001705e15b00 in ?? ()
#3  0x00007fff6385250c in ?? ()
#4  0x0000000000000001 in ?? ()
#5  0x00005600d4637090 in wxTimerUnixModule::ms_classInfo ()
#6  0x00005600d3a5fb3a in wxEpollDispatcher::DoPoll(epoll_event*, int, int) const ()
#7  0x00005600d3a5fbc5 in wxEpollDispatcher::HasPending() const ()
#8  0x00005600d39e5690 in wxConsoleEventLoop::Pending() const ()
#9  0x00005600d3940657 in wxEventLoopManual::DoRun() ()
#10 0x00005600d39403bd in wxEventLoopBase::Run() ()
#11 0x00005600d3918ced in wxAppConsoleBase::OnRun() ()
#12 0x00005600d397ab82 in wxEntry(int&, wchar_t**) ()
#13 0x00005600d327ff98 in main ()
(gdb) t 1
[Switching to thread 1 (process 8578)]
#0  0x00007f8c6799d68e in ?? ()
(gdb) bt
#0  0x00007f8c6799d68e in ?? ()
#1  0x00062964bb0d0442 in ?? ()
#2  0x0000001705e15b00 in ?? ()
#3  0x00007fff6385250c in ?? ()
#4  0x0000000000000001 in ?? ()
#5  0x00005600d4637090 in wxTimerUnixModule::ms_classInfo ()
#6  0x00005600d3a5fb3a in wxEpollDispatcher::DoPoll(epoll_event*, int, int) const ()
#7  0x00005600d3a5fbc5 in wxEpollDispatcher::HasPending() const ()
#8  0x00005600d39e5690 in wxConsoleEventLoop::Pending() const ()
#9  0x00005600d3940657 in wxEventLoopManual::DoRun() ()
#10 0x00005600d39403bd in wxEventLoopBase::Run() ()
#11 0x00005600d3918ced in wxAppConsoleBase::OnRun() ()
#12 0x00005600d397ab82 in wxEntry(int&, wchar_t**) ()
#13 0x00005600d327ff98 in main ()
(gdb)


perf
Samples: 33K of event 'cycles', Event count (approx.): 5778034374                                                           
  Children      Self  Command    Shared Object        Symbol                                                               
+   85.76%     0.00%  bitcometd  [unknown]            [k] 0x0000000000000017
+   84.70%     0.00%  bitcometd  libc-2.31.so         [.] 0x00007f8c6799d68e
+   70.81%     0.15%  bitcometd  [kernel.kallsyms]    [k] tracesys
+   66.68%     0.36%  bitcometd  [kernel.kallsyms]    [k] syscall_trace_enter
+   65.62%     0.56%  bitcometd  [kernel.kallsyms]    [k] __secure_computing
+   64.84%     0.55%  bitcometd  [kernel.kallsyms]    [k] __seccomp_filter
+   58.51%    57.81%  bitcometd  [kernel.kallsyms]    [k] sk_run_filter
+    8.17%     0.00%  bitcometd  [unknown]            [.] 0000000000000000
+    6.36%     6.36%  bitcometd  [kernel.kallsyms]    [k] retint_userspace_restore_args
+    5.27%     0.00%  bitcometd  [unknown]            [.] 0x000001e805480789
+    5.27%     0.00%  bitcometd  bitcometd            [.] 0x00005600d3905240
+    4.88%     4.88%  bitcometd  [kernel.kallsyms]    [k] __x86_indirect_thunk_r8
+    3.67%     3.67%  bitcometd  [kernel.kallsyms]    [k] system_call_after_swapgs
+    2.43%     0.40%  bitcometd  [kernel.kallsyms]    [k] sys_epoll_wait
+    2.29%     2.29%  bitcometd  libc-2.31.so         [.] 0x000000000011f68e
+    1.94%     0.02%  bitcometd  [kernel.kallsyms]    [k] int_check_syscall_exit_work
+    1.94%     0.22%  bitcometd  [kernel.kallsyms]    [k] syscall_trace_leave
+    1.71%     0.00%  bitcometd  [unknown]            [.] 0xfbbdcf7705e15b00
+    1.66%     1.64%  bitcometd  [vdso]               [.] __vdso_gettimeofday
+    1.36%     0.76%  bitcometd  [kernel.kallsyms]    [k] __audit_syscall_exit
+    1.31%     0.00%  bitcometd  [unknown]            [.] 0x0000000000000001
+    1.24%     0.21%  bitcometd  [kernel.kallsyms]    [k] ep_poll
+    1.21%     0.00%  bitcometd  [unknown]            [.] 0xcde907894810c083
+    1.21%     0.00%  bitcometd  bitcometd            [.] 0x00005600d39e6280
+    1.15%     0.00%  bitcometd  bitcometd            [.] 0x00005600d39b597e
+    1.12%     1.12%  bitcometd  [kernel.kallsyms]    [k] seccomp_bpf_load
+    1.08%     0.02%  bitcometd  [kernel.kallsyms]    [k] apic_timer_interrupt
+    1.04%     0.01%  bitcometd  [kernel.kallsyms]    [k] smp_apic_timer_interrupt
+    1.03%     0.94%  bitcometd  [kernel.kallsyms]    [k] __audit_syscall_entry
+    0.97%     0.01%  bitcometd  [kernel.kallsyms]    [k] do_softirq
+    0.96%     0.00%  bitcometd  [kernel.kallsyms]    [k] call_softirq
+    0.87%     0.02%  bitcometd  [kernel.kallsyms]    [k] irq_exit
+    0.86%     0.01%  bitcometd  [kernel.kallsyms]    [k] __do_softirq
+    0.76%     0.00%  bitcometd  bitcometd            [.] 0x00005600d39e3019
+    0.74%     0.74%  bitcometd  bitcometd            [.] 0x0000000000989019
+    0.69%     0.00%  bitcometd  [unknown]            [.] 0x4800217f8010c083
+    0.69%     0.00%  bitcometd  bitcometd            [.] 0x00005600d39f0620
+    0.69%     0.00%  bitcometd  [unknown]            [.] 0x00005600d5ef78a0
+    0.66%     0.02%  bitcometd  [kernel.kallsyms]    [k] net_rx_action
+    0.64%     0.00%  bitcometd  [unknown]            [.] 0x0000004d0000002d
+    0.57%     0.56%  bitcometd  [kernel.kallsyms]    [k] _raw_spin_lock_irqsave
+    0.54%     0.54%  bitcometd  [kernel.kallsyms]    [k] fget_light
+    0.54%     0.00%  bitcometd  bitcometd            [.] 0x00005600d391349c
+    0.52%     0.01%  bitcometd  [kernel.kallsyms]    [k] virtnet_poll
     0.49%     0.00%  bitcometd  [kernel.kallsyms]    [k] __netif_receive_skb
     0.48%     0.04%  bitcometd  [kernel.kallsyms]    [k] __netif_receive_skb_core
     0.47%     0.00%  bitcometd  [unknown]            [.] 0x0000441f0f000000
     0.47%     0.01%  bitcometd  [kernel.kallsyms]    [k] local_apic_timer_interrupt
     0.47%     0.00%  bitcometd  [kernel.kallsyms]    [k] netif_receive_skb_internal


得知原因
是wxWidgets 在Linux下控制台程序框架的问题

欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册论坛 新浪微博账号登陆用百度帐号登录

本版积分规则

手机版|Archiver|Mail me|网站地图|IT技术交流论坛 ( 闽ICP备13013206号-7 )

GMT+8, 2024/12/22 11:47 , Processed in 0.152169 second(s), 20 queries , MemCache On.

Powered by itzmx! X3.4

© 2011- sakura

快速回复 返回顶部 返回列表