ubuntu17.10 系统死机

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

ubuntu17.10 系统死机

#1

帖子 widon1104 » 2018-01-18 10:26

ubuntu17.10 系统死机,因为在公司使用ubuntu系统,我装的是17.10,几乎每天都会死机,系统启动10几分钟以后死机。
死机时候按什么键都没反应,鼠标也没反应,界面就卡死在gnome界面,界面上面没有任何输出,只有断电重启。
我试过换内核,换过最新的内核,还有比较老一点的内核4.4.111,都没用,还是会死机。
不知道遇到这种情况,我该怎么办啊。
上次由 widon1104 在 2018-02-13 21:19,总共编辑 1 次。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#2

帖子 poloshiao » 2018-01-18 11:40

界面就卡死在 gnome 界面
先試試
按下 alt + F2
輸入 r
按下 enter
看看 能否重啟 Gnome Shell
头像
百草谷居士
帖子: 3910
注册时间: 2006-02-10 16:36
系统: Mint21.1/Deepin20.8

Re: ubuntu17.10 系统死机

#3

帖子 百草谷居士 » 2018-01-18 15:51

你每天几点开机?能不能试试在10点以后开机?

可以考虑硬件问题,开机后固定时间发生故障?
甚至可以考虑电源问题,供电线路上有其他设备,在固定时间启动,造成干扰。

我遇到一次最神奇的问题,办公室内荧光灯闪了一下,办公室内的五六台电脑死机的死机,重启的重启。被荧光灯干扰的几率几乎没有,但是电源干扰的可能性非常大。
debian 12 / 深度系统 20.9 / Mint 21.3

为何热衷于搞发行版的多,搞应用程序开发的少?Linux最多余的就是各种发行版,最缺的就是应用程序,特别是行业应用程序。
funicorn
帖子: 1318
注册时间: 2005-09-13 4:56
系统: Ubuntu Jammy Jellyfi

Re: ubuntu17.10 系统死机

#4

帖子 funicorn » 2018-01-18 20:42

检查一下crontab
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#5

帖子 widon1104 » 2018-01-19 10:51

poloshiao 写了:
界面就卡死在 gnome 界面
先試試
按下 alt + F2
輸入 r
按下 enter
看看 能否重啟 Gnome Shell
今天10:45死机了,按alt+f2没反应,按ctrl+alt+f3也没反应
没办法又断电重启了
我的ubuntu17.10软件都保持最新的
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#6

帖子 widon1104 » 2018-01-19 10:56

funicorn 写了:检查一下crontab
没有开启crontab任务啊
funicorn
帖子: 1318
注册时间: 2005-09-13 4:56
系统: Ubuntu Jammy Jellyfi

Re: ubuntu17.10 系统死机

#7

帖子 funicorn » 2018-01-19 11:26

像你嘴这么硬手这么懒的人永远解决不了问题
widon1104 写了:
funicorn 写了:检查一下crontab
没有开启crontab任务啊
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#8

帖子 poloshiao » 2018-01-19 12:00

每天大约都在9:38分左右死机,系统启动10几分钟以后死机。
1. Ubuntu 提供 journalctl 指令 是很好用的查詢記錄工具
1-1. https://packages.ubuntu.com/artful/amd6 ... d/filelist
/bin/journalctl
1-2. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal

2. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
--flush
2-1. journalctl 預設只能查詢當次開機後的記錄
如果要查詢以前的記錄 需要更改設定 啟用 persistent storage
2-2. 方法 參見
https://gist.github.com/JPvRiel/b7c1858 ... 5b40836887
Create storage and enable storage location

代码: 全选

sudo mkdir -p /var/log/journal
sudo systemd-tmpfiles --create --prefix /var/log/journal
sudo systemctl restart systemd-journald
3. 當死機後 重新開機 使用 journalctl 指令 加上 -b 參數 可以查詢任意一次開機的紀錄
http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
-b [ID][±offset], --boot=[ID][±offset]
Show messages from a specific boot
例如 加上
--boot=-1
可以查詢 前一次(剛剛死機那一次)的記錄

4. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
-r, --reverse
加上 -r 參數 可以把時間順序記錄反向排列 即最後的排在第一行 方便你閱讀

5. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
-n, --lines=
例如
--lines=20
可以只印出 20 行記錄

6. 其它參數 請參閱
http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
OPTIONS

7. 你應該已經有相當的基礎 上述介紹 你應該就可以自己動手試試 查詢 err fail 等等 關鍵字 看看 引起死機的第一個關鍵原因

7-1. 也歡迎你把你認為可能有助於研判的關鍵行數內容 複製/貼上上來 :
打開 firefox
http://paste.ubuntu.com
輸入 firefox 網址欄
按一下 Enter
會出現 空白的 content 框
把 你要貼上本論壇的 全部內容 通通 複製/貼進 content 框裏
按下 paste
會回應 http://paste.ubuntu.com/xxxxxxx # xxxxxxx 是一組數字
http://paste.ubuntu.com/xxxxxxx 貼上來
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#9

帖子 widon1104 » 2018-01-22 11:44

poloshiao 写了:
每天大约都在9:38分左右死机,系统启动10几分钟以后死机。
1. Ubuntu 提供 journalctl 指令 是很好用的查詢記錄工具
1-1. https://packages.ubuntu.com/artful/amd6 ... d/filelist
/bin/journalctl
1-2. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal

2. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
--flush
2-1. journalctl 預設只能查詢當次開機後的記錄
如果要查詢以前的記錄 需要更改設定 啟用 persistent storage
2-2. 方法 參見
https://gist.github.com/JPvRiel/b7c1858 ... 5b40836887
Create storage and enable storage location

代码: 全选

sudo mkdir -p /var/log/journal
sudo systemd-tmpfiles --create --prefix /var/log/journal
sudo systemctl restart systemd-journald
3. 當死機後 重新開機 使用 journalctl 指令 加上 -b 參數 可以查詢任意一次開機的紀錄
http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
-b [ID][±offset], --boot=[ID][±offset]
Show messages from a specific boot
例如 加上
--boot=-1
可以查詢 前一次(剛剛死機那一次)的記錄

4. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
-r, --reverse
加上 -r 參數 可以把時間順序記錄反向排列 即最後的排在第一行 方便你閱讀

5. http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
-n, --lines=
例如
--lines=20
可以只印出 20 行記錄

6. 其它參數 請參閱
http://manpages.ubuntu.com/manpages/art ... ctl.1.html
journalctl - Query the systemd journal
OPTIONS

7. 你應該已經有相當的基礎 上述介紹 你應該就可以自己動手試試 查詢 err fail 等等 關鍵字 看看 引起死機的第一個關鍵原因

7-1. 也歡迎你把你認為可能有助於研判的關鍵行數內容 複製/貼上上來 :
打開 firefox
http://paste.ubuntu.com
輸入 firefox 網址欄
按一下 Enter
會出現 空白的 content 框
把 你要貼上本論壇的 全部內容 通通 複製/貼進 content 框裏
按下 paste
會回應 http://paste.ubuntu.com/xxxxxxx # xxxxxxx 是一組數字
http://paste.ubuntu.com/xxxxxxx 貼上來
今天11:30死机了,贴了一些journalctl记录的log,好像看不出什么来,死机时候只有一些firefox的错误输出,firefox不会导致死机吧?

1月 22 09:24:30 widon-desktop gnome-software[3670]: json_object_has_member: assertion 'member_name != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: g_strsplit: assertion 'string != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: g_strv_length: assertion 'str_array != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: json_object_has_member: assertion 'member_name != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: g_strsplit: assertion 'string != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: g_strv_length: assertion 'str_array != NULL' failed

1月 22 10:47:33 widon-desktop /usr/lib/gdm3/gdm-x-session[3282]: 资源暂时不可用: 资源暂时不可用
1月 22 10:47:33 widon-desktop /usr/lib/gdm3/gdm-x-session[3282]: 资源暂时不可用: 资源暂时不可用
1月 22 10:47:33 widon-desktop /usr/lib/gdm3/gdm-x-session[3282]: 权限不够: 权限不够
1月 22 10:47:33 widon-desktop /usr/lib/gdm3/gdm-x-session[3282]: 权限不够: 权限不够

https://paste.ubuntu.com/26435021/
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#10

帖子 poloshiao » 2018-01-22 12:36

firefox不会导致死机吧?
1. 以下都是 Ubuntu 17.10 Firefox 導致死機的 Bug Reports 案例
1-1. https://bugs.launchpad.net/ubuntu-mate/+bug/1726616
Firefox crashes repeatedly after system update
1-2. https://bugs.launchpad.net/ubuntu/+sour ... ug/1732954
Firefox crashes on launch
1月 22 09:24:30 widon-desktop gnome-software[3670]: json_object_has_member: assertion 'member_name != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: g_strsplit: assertion 'string != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: g_strv_length: assertion 'str_array != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: json_object_has_member: assertion 'member_name != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: g_strsplit: assertion 'string != NULL' failed
1月 22 09:24:30 widon-desktop gnome-software[3670]: g_strv_length: assertion 'str_array != NULL' failed
2. 舉例
2-1. https://github.com/EionRobb/pidgin-open ... -188643199
The 'error' occurs when we're requesting the member of a JSON object but it doesn't exist which happens in sometimes
2-2. https://bugs.launchpad.net/ubuntu/+sour ... ug/1732357
g_strsplit: assertion 'string != NULL' failed
2-3. https://bugzilla.redhat.com/show_bug.cgi?id=1442812
Gnome updater (gnome-software) fails to update the system
2-4. 其它 網路上還有許多類似案例 搜尋看看
1月 22 10:47:33 widon-desktop /usr/lib/gdm3/gdm-x-session[3282]: 资源暂时不可用: 资源暂时不可用
1月 22 10:47:33 widon-desktop /usr/lib/gdm3/gdm-x-session[3282]: 资源暂时不可用: 资源暂时不可用
3. 舉例
3-1. https://bugs.launchpad.net/ubuntu/+sour ... ug/1726425
gdm in Ubuntu 17.10 makes my system unbootable
3-2. https://devtalk.nvidia.com/default/topi ... r-upgrade/
X.org crashes on Ubuntu 17.10 with driver nvidia-384 after upgrade
1月 22 10:47:33 widon-desktop /usr/lib/gdm3/gdm-x-session[3282]: 权限不够: 权限不够
1月 22 10:47:33 widon-desktop /usr/lib/gdm3/gdm-x-session[3282]: 权限不够: 权限不够
4. 舉例
4-1. https://bugs.launchpad.net/ubuntu/+sour ... ug/1580605
gnome-shell crashes often
https://paste.ubuntu.com/26435021/
第 83 行
1月 22 11:29:25 widon-desktop nautilus[9994]: Called "net usershare info" but it failed: Failed to execute child process “net” (No such file or directory)
5. 舉例
5-1. https://bugs.launchpad.net/ubuntu-gnome/+bug/1652282
Xwayland not using XAUTHORITY, prevents root applications from connecting
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#11

帖子 widon1104 » 2018-01-22 12:51

poloshiao 写了:
firefox不会导致死机吧?
1. 以下都是 Ubuntu 17.10 Firefox 導致死機的 Bug Reports 案例
1-1. https://bugs.launchpad.net/ubuntu-mate/+bug/1726616
Firefox crashes repeatedly after system update
1-2. https://bugs.launchpad.net/ubuntu/+sour ... ug/1732954
Firefox crashes on launch
这2个bug都是firefox crash,不是system halt吧。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu17.10 系统死机

#12

帖子 poloshiao » 2018-01-22 13:15

这2个bug都是firefox crash,不是system halt吧。
firefox crash 有些案例 重啟 firefox 即可 有些案例 需要重新開機
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#13

帖子 widon1104 » 2018-01-22 15:13

我感觉journalctl并没有记录到真正死机的原因啊
头像
maplebeats
帖子: 378
注册时间: 2011-02-16 1:17

Re: ubuntu17.10 系统死机

#14

帖子 maplebeats » 2018-01-22 16:55

看看有没有coredump的日志,有可能是内核崩溃呢
My blog : OOXX
头像
widon1104
帖子: 839
注册时间: 2008-07-17 10:55

Re: ubuntu17.10 系统死机

#15

帖子 widon1104 » 2018-01-22 18:01

maplebeats 写了:看看有没有coredump的日志,有可能是内核崩溃呢
内核崩溃的日志记录在哪里啊?
回复