深度系统监视器启动不了
Tofloor
poster avatar
186******39
deepin
2018-07-06 17:27
Author
本帖最后由 l0rraine 于 2018-7-6 09:28 编辑
  1. $ deepin-system-monitor
  2. load translate "/usr/share/dtkwidget/translations/dtkwidget2_zh_CN"
  3. load translate "/usr/share/deepin-system-monitor/translations/deepin-system-monitor_zh_CN"
  4. No PPP or Ethernet link: 12
  5. Ethernet link detected
Copy the Code
然后就卡死不动

我的网络环境
  1. [connection]
  2. id=local
  3. uuid=6df806b8-d402-4d4c-abf4-ae578efd39f0
  4. type=ethernet
  5. permissions=
  6. timestamp=1523167491

  7. [ethernet]
  8. mac-address=B0:83:FE:5D:E7:65
  9. mac-address-blacklist=

  10. [ipv4]
  11. address1=192.168.111.184/25,192.168.111.215
  12. address2=10.67.40.184/25,10.67.40.215
  13. dns=8.8.8.8;
  14. dns-search=
  15. method=manual
  16. route1=10.0.0.0/8,10.67.40.253
  17. route2=192.100.0.0/16,10.67.40.253
  18. route3=192.168.111.0/24,10.67.40.253

  19. [ipv6]
  20. addr-gen-mode=stable-privacy
  21. dns-search=
  22. method=auto
Copy the Code



Reply Favorite View the author
All Replies
avatar
186******39
deepin
2018-07-06 17:44
#1
刚刚发现,一个cpu占用100%了,就是deepin-system-monitor
Reply View the author
avatar
WENWEN
deepin
2018-07-06 17:51
#2
https://bbs.deepin.org/post/166037
刚刚发现,一个cpu占用100%了,就是deepin-system-monitor

dtk动了什么操作吗?自己编译了什么  之前有没有出现 还是操作了什么出现的
Reply View the author
avatar
186******39
deepin
2018-07-06 19:17
#3
小白用户,基本就是下载商店应用,不懂dtk

我觉得从网络配置方面看吧,我这网络配置,在控制面板里面的网络里也没法配置
Reply View the author
avatar
duanyao
deepin
2018-07-07 00:18
#4
用 gdb 调试一下(这属于人力 profile):

执行:
sudo apt install deepin-system-monitor-dbgsym
gdb deepin-system-monitor

这就进入了调试模式,输出:

GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from deepin-system-monitor...Reading symbols from /usr/lib/debug/.build-id/36/c92a2df10b29323b1bd5b7141b78b132f54313.debug...done.
done.
(gdb)

输入 'run' 回车,开始运行 deepin-system-monitor:

Starting program: /usr/bin/deepin-system-monitor

如果再次出现了 CPU 占用 100% ,在 gdb 里面按 ctrl+C 使其暂停,然后输入 ‘backtrace’,得到类似这样的调用栈:

#0  0x00007f2cebe7363d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f2ce92b0a56 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f2ce92b0b5c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f2ced11dc3f in QEventDispatcherGlib::processEvents(QFlagsrocessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f2ced0c953a in QEventLoop::exec(QFlagsrocessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f2ced0d15ed in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x0000563abeb692d5 in main(int, char**) (argc=, argv=) at src/main.cpp:78

把这段复制保存到一个文本文件里。再输入 'run' 恢复执行,几秒后重复 ctrl+C - backtrace - run 的循环,看看调用栈有什么规律吗?把 backtrace 的结果贴出来看看。
Reply View the author
avatar
186******39
deepin
2018-07-10 16:39
#5
不好意思,这几天有事没来。日志在此
  1. (gdb) run
  2. Starting program: /usr/bin/deepin-system-monitor
  3. [Thread debugging using libthread_db enabled]
  4. Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
  5. [New Thread 0x7f63553da700 (LWP 7161)]
  6. [New Thread 0x7f634e885700 (LWP 7163)]
  7. [New Thread 0x7f6346bbd700 (LWP 7164)]
  8. [New Thread 0x7f63463bc700 (LWP 7165)]
  9. [New Thread 0x7f6345bbb700 (LWP 7166)]
  10. [New Thread 0x7f6344fa7700 (LWP 7167)]
  11. [New Thread 0x7f6337fff700 (LWP 7168)]
  12. load translate "/usr/share/dtkwidget/translations/dtkwidget2_zh_CN"
  13. load translate "/usr/share/deepin-system-monitor/translations/deepin-system-monitor_zh_CN"
  14. [New Thread 0x7f63377fe700 (LWP 7169)]
  15. ERROR: opening handler for device teredo: 不允许的操作
  16. ERROR: opening handler for device enp2s0: 不允许的操作
  17. [Thread 0x7f63377fe700 (LWP 7169) exited]
  18. [Thread 0x7f6345bbb700 (LWP 7166) exited]
Copy the Code


第一次backtrace
  1. ^C
  2. Thread 1 "deepin-system-m" received signal SIGINT, Interrupt.
  3. 0x00007f6365841fba in __GI___libc_malloc (bytes=30) at malloc.c:2926
  4. 2926    malloc.c: 没有那个文件或目录.
  5. (gdb) backtrace
  6. #0  0x00007f6365841fba in __GI___libc_malloc (bytes=30) at malloc.c:2926
  7. #1  0x00007f636693c035 in QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags) ()
  8.     at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  9. #2  0x00007f63669c2703 in QString::QString(int, Qt::Initialization) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  10. #3  0x00007f636699b537 in QLocalePrivate::languageToCode(QLocale::Language) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  11. #4  0x00007f636699e48a in QLocale::name() const () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  12. #5  0x000055d71cfc5744 in Utils::getDisplayNameFromName(QString, std::__cxx11::basic_string, std::allocator >, bool) (procName=..., desktopFile="/usr/share/applications/remmina.desktop", displayProcessName=displayProcessName@entry=true) at src/utils.cpp:326
  13. #6  0x000055d71cfe285d in StatusMonitor::updateStatus() (this=0x55d71eb7a4c0) at src/status_monitor.cpp:284
  14. #7  0x000055d71d001561 in MainWindow::MainWindow(Dtk::Widget::DMainWindow*) (this=0x7ffd2a132b30, parent=) at src/main_window.cpp:113
  15. #8  0x000055d71cfbb200 in main(int, char**) (argc=, argv=) at src/main.cpp:69
Copy the Code
第二次backtrace
  1. ^C
  2. Thread 1 "deepin-system-m" received signal SIGINT, Interrupt.
  3. 0x00005587e6406f32 in QString::~QString (this=0x7fff7b5c99b8, __in_chrg=) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1065
  4. 1065        /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h: 没有那个文件或目录.
  5. (gdb) backgrace
  6. Undefined command: "backgrace".  Try "help".
  7. (gdb) backtrace
  8. #0  0x00005587e6406f32 in QString::~QString() (this=0x7fff7b5c99b8, __in_chrg=) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstring.h:1065
  9. #1  0x00005587e640d888 in Utils::getDisplayNameFromName(QString, std::__cxx11::basic_string, std::allocator >, bool) (procName=..., desktopFile=..., displayProcessName=) at src/utils.cpp:341
  10. #2  0x00005587e642a85d in StatusMonitor::updateStatus() (this=0x5587e6c39c50) at src/status_monitor.cpp:284
  11. #3  0x00005587e6449561 in MainWindow::MainWindow(Dtk::Widget::DMainWindow*) (this=0x7fff7b5ca4b0, parent=) at src/main_window.cpp:113
  12. #4  0x00005587e6403200 in main(int, char**) (argc=, argv=) at src/main.cpp:69
Copy the Code
第三次backtrace
  1. Thread 1 "deepin-system-m" received signal SIGINT, Interrupt.
  2. 0x00007fec7d76cf4c in __GI___libc_malloc (bytes=30) at malloc.c:2939
  3. 2939        malloc.c: 没有那个文件或目录.
  4. (gdb) backtrace
  5. #0  0x00007fec7d76cf4c in __GI___libc_malloc (bytes=30) at malloc.c:2939
  6. #1  0x00007fec7e867035 in QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags) ()
  7.     at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  8. #2  0x00007fec7e8ed703 in QString::QString(int, Qt::Initialization) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  9. #3  0x00007fec7e8c6537 in QLocalePrivate::languageToCode(QLocale::Language) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  10. #4  0x00007fec7e8c948a in QLocale::name() const () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
  11. #5  0x000056074417b744 in Utils::getDisplayNameFromName(QString, std::__cxx11::basic_string, std::allocator >, bool) (procName=..., desktopFile=..., displayProcessName=) at src/utils.cpp:326
  12. #6  0x000056074419885d in StatusMonitor::updateStatus() (this=0x56074537c4d0) at src/status_monitor.cpp:284
  13. #7  0x00005607441b7561 in MainWindow::MainWindow(Dtk::Widget::DMainWindow*) (this=0x7ffd446e0c00, parent=) at src/main_window.cpp:113
  14. #8  0x0000560744171200 in main(int, char**) (argc=, argv=) at src/main.cpp:69
Copy the Code


Reply View the author
avatar
duanyao
deepin
2018-07-10 18:20
#6
  1. #6  0x000056074419885d in StatusMonitor::updateStatus() (this=0x56074537c4d0) at src/status_monitor.cpp:284
  2. #7
  3.   0x00005607441b7561 in
  4. MainWindow::MainWindow(Dtk::Widget::DMainWindow*) (this=0x7ffd446e0c00,
  5. parent=) at src/main_window.cpp:113
  6. #8  0x0000560744171200 in main(int, char**) (argc=, argv=) at src/main.cpp:69
Copy the Code

这个共同的调用栈是在程序的初始化阶段,仅执行一次。看起来应该是 StatusMonitor::updateStatus() 执行得非常慢,而不是真的卡住。
至于具体原因还无法确定,可能是进程数太多(会多到这个程度吗?用 sudo ps -aux | wc -l 统计一下),也可能是 Qt 有 bug(装过非deepin提供的Qt吗?),或者就是深度监视器自己的bug。

这个问题应该是与特定的环境有关(安装了什么程序,运行了什么程序),从外部还真不太好定位。楼主懂C/C++编程吗?如果懂可以下载源码来进一步调试:https://github.com/manateelazycat/deepin-system-monitor/

另一条途径是做减法,关掉系统里可以关掉的程序(尤其是自行安装的),看是哪个程序触发的。你可以先 sudo ps -aux 显示一下现在的所有进程。


Reply View the author
avatar
186******39
deepin
2018-07-11 22:47
#7
这个问题,咳咳,就让它随缘吧

为什么不是这里出的错?

  1. ERROR: opening handler for device teredo: 不允许的操作
  2. ERROR: opening handler for device enp2s0: 不允许的操作
Copy the Code


我觉得是无法读取网络的问题

我也不是啥专业的测试人员,自己能用就忍了吧,工作比较忙。
而且有个啥bug的不是很正常嘛,有人这么劝过我,Linux能用就行了,别瞎折腾。我觉得挺对的,毕竟是工作机。
Reply View the author
avatar
186******39
deepin
2018-07-11 22:50
#8
再一个,现在的deepin我是比较满意的,内存方面控制的很好,些许问题,只要不在我眼前我就当不存在好了……
毕竟我刚刚官网升级都失败了,只能重装……再折腾崩系统,又是好几天,心累
Reply View the author