19.04 随机冻结,不确定要检查哪些日志

19.04 随机冻结,不确定要检查哪些日志

我已经搜索了 Askubuntu 以及其他网站,并没有发现任何实质性的内容,所以我希望它不是太多的重复。

无论如何,我最近遇到了随机冻结 - 系统完全锁定,我的键盘和鼠标没有响应,PC 也从活动网络客户端中消失(通过从另一台 PC 使用 nmap 扫描我的网络),所以我认为它完全死机了,而不仅仅是丢失了输入。最近升级到 19.04 后,这种情况开始发生。

我无法确定问题所在,唯一的共同点似乎是 Chrome。然而,即便如此,变化范围也很大,因为我可以做任何事情,从观看 YouTube 到阅读 Latex 格式提示,所以负载从高到低都有。我关闭了 GPU 加速和其他实验性功能,所以我不认为是这个原因 - 此外,在 19.04 之前我从未遇到过这样的问题。

冻结之前,/var/log/syslog 中出现以下内容:

Sep 25 12:31:08 meeshbox systemd[1]: Started Run anacron jobs.
Sep 25 12:31:08 meeshbox anacron[11822]: Anacron 2.3 started on 2019-09-25
Sep 25 12:31:08 meeshbox anacron[11822]: Normal exit (0 jobs run)
Sep 25 12:31:08 meeshbox systemd[1]: anacron.service: Succeeded.
Sep 25 12:31:32 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3802c74 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 214748364
7; this doesn't make much sense.
Sep 25 12:31:32 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3802c74 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 214748364
7; this doesn't make much sense.
Sep 25 12:36:28 meeshbox org.gnome.Shell.desktop[1329]: [1:1:0925/123628.789445:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a respo
nse.
Sep 25 12:36:28 meeshbox org.gnome.Shell.desktop[1329]: [1:1:0925/123628.791155:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a respo
nse.
Sep 25 12:36:45 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x38039d7 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 214748364
7; this doesn't make much sense.
Sep 25 12:36:45 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x38039d7 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 214748364
7; this doesn't make much sense.
Sep 25 12:38:08 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803b5a sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 214748364
7; this doesn't make much sense.
Sep 25 12:38:08 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803b5a sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:26 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803bc3 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:26 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803bc3 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:40 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803c21 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:40 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803c21 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:41 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803c35 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:41 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803c35 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:42 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803c49 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:42 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803c49 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:51 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803ca1 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:38:51 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803ca1 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:39:02 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803d01 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:39:02 meeshbox org.gnome.Shell.desktop[1329]: Window manager warning: Window 0x3803d01 sets an MWM hint indicating it isn't resizable, but sets min size 1 x 1 and max size 2147483647 x 2147483647; this doesn't make much sense.
Sep 25 12:40:09 meeshbox smartd[910]: Device: /dev/sdb [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 68 to 67
Sep 25 12:40:09 meeshbox smartd[910]: Device: /dev/sdb [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 32 to 33
Sep 25 12:41:14 meeshbox systemd-resolved[803]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.

kern.log 中没有任何有趣的东西。18.04 从未遇到过此问题。这种情况并不常见,但一旦发生就会非常恼人 - 例如现在,我丢失了我正在编写的相当大一部分代码,因为我太愚蠢了,没有保存它。例如,在玩游戏时,即使在后台有其他东西的情况下,这种情况也从未发生过。我无法真正准确地指出它。然而,在搜索上周发生冻结时的日志时,我发现了如下几行:

[1:1:0925/123628.789445:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.

通常在冻结之前不久出现 - 但不是冻结之前立即出现,更像是 3-4 分钟。

还有哪些相关日志需要检查?

答案1

启用 systemd 多启动消息日志

最好的解决方案是启用多重启动信息记录然后显示上次启动的最后一条消息:

$ journalctl -xe -b-1

Nov 11 23:12:07 alien systemd[1]: Reached target Shutdown.
-- Subject: Unit shutdown.target has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit shutdown.target has finished starting up.
-- 
-- The start-up result is done.
Nov 11 23:12:07 alien systemd[1]: dev-disk-by\x2dpartlabel-Basic\x5cx20data\x5cx20partition
Nov 11 23:13:37 alien systemd[1]: dev-disk-by\x2duuid-b4512bc6\x2d0ec8\x2d4b17\x2d9edd\x2d8
Nov 11 23:13:37 alien systemd[1]: Deactivated swap /dev/disk/by-uuid/b4512bc6-0ec8-4b17-9ed
-- Subject: Unit dev-disk-by\x2duuid-b4512bc6\x2d0ec8\x2d4b17\x2d9edd\x2d88db0f031332.swap 
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit dev-disk-by\x2duuid-b4512bc6\x2d0ec8\x2d4b17\x2d9edd\x2d88db0f031332.swap has finis
Nov 11 23:13:37 alien systemd[1]: dev-disk-by\x2duuid-b4512bc6\x2d0ec8\x2d4b17\x2d9edd\x2d8

在您的情况下,消息不会显示正常关机,而是显示系统崩溃前最后记录的消息。


分析迄今为止发现的消息

第一条错误消息在此处解决:

解决方案是使用:

看来我的系统中还保留着旧的配置,导致两个服务之间发生冲突:resolvconfsystemd-resolved

符号链接/etc/resolv.conf 指向 ../run/resolvconf/resolv.conf

将其更改为指向/run/systemd/resolve/resolv.conf由 systemd 管理的位置,就为我修复了这个问题。

第二条错误消息由 nvidia 生成:

发布的答案仅对软件开发人员有用,对最终用户没有帮助。对于运行 Chrome 的最终用户,还有其他解决方案:

答案2

系统死机非常难以诊断,尤其是当系统日志中没有任何显示时。您可以按照其他答案中的建议检查 journalctl,但我猜它不会显示任何更多信息。

如果您能够找到一种可靠地触发冻结的方法,那么dmesg --follow --human在窗口中运行可能会显示一些有用的信息。但是,大多数情况下,冻结发生得非常突然,实际上什么都没有记录下来。而且很多时候,这些“随机冻结”很难缩小到任何特定的原因。

系统冻结可能是由硬件本身的问题(例如内存损坏、电源过载等)、BIOS 缺陷或内核或其硬件驱动程序(特别是 GPU 驱动程序)中的错误引起的。有时最省时的做法是先尝试升级/降级内核,然后查看是否有可用的 BIOS 更新,如果有,则更新它,然后进行一些硬件诊断和/或更换。

GPU 锁定是一种常见的系统冻结类型。对于 Intel 显卡,有一些工具可以在冻结后从显卡本身获取转储(请参阅 intel-gpu-tools 文档),但获取足够有用的信息可能时好时坏。通常最好的情况是不断更新您的 BIOS、内核和/或硬件,直到问题消失。

答案3

我的 AMD Ryzen 3800 + Ubuntu 18.04 + Gigabyte B450 每隔几分钟就会崩溃,非常烦人。

似乎已经奏效的方法是调整一些 BIOS 设置。

在高级 CPU 设置下: - SMT -> 禁用 - 电源空闲控制 -> 典型电流空闲 - 全局 C 状态控制 -> 禁用

相关内容