Ubuntu 18.04.1 LTS 在一分钟内可以生成超过 200GB 的系统日志文件,该文件会填满系统分区,导致无法启动系统。几周内已经发生过第二次。最终结果:
tail syslog
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347543:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347550:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347557:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347564:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347571:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347579:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347586:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347593:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
Dec 18 23:43:05 apollo update-notifier.desktop[3315]: [20034:20034:0100/000000.347600:ERROR:zygote_linux.cc(247)] Error reading message from browser: Socket operation on non-socket (88)
我不明白这是什么意思,也找不到这个确切的错误
编辑1:
Top:
top
top - 17:28:47 up 6:36, 1 user, load average: 1,58, 3,35, 2,30
Tasks: 317 total, 1 running, 246 sleeping, 0 stopped, 1 zombie
%Cpu(s): 0,6 us, 0,3 sy, 0,0 ni, 99,0 id, 0,0 wa, 0,0 hi, 0,0 si, 0,0 st
KiB Mem : 16365888 total, 8670196 free, 2479024 used, 5216668 buff/cache
KiB Swap: 19999740 total, 19999740 free, 0 used. 13513508 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10893 art 20 0 1090796 312396 105196 S 4,0 1,9 0:20.10 chrome
2276 art 9 -11 1960216 12644 9096 S 2,3 0,1 2:42.12 pulseaudio
2583 art 20 0 1601656 253688 137168 S 1,0 1,6 9:13.19 chrome
6220 art 20 0 507104 168432 107560 S 1,0 1,0 1:37.60 steam
2245 art 20 0 4455520 257596 96820 S 0,3 1,6 6:03.80 gnome-shell
6330 art 20 0 1095892 120104 98220 S 0,3 0,7 0:03.59 steamwebhelper
11213 art 20 0 52568 4308 3604 R 0,3 0,0 0:00.20 top
1 root 20 0 225984 9716 6668 S 0,0 0,1 0:09.03 systemd
2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd
4 root 0 -20 0 0 0 I 0,0 0,0 0:00.00 kworker/0:0H
6 root 0 -20 0 0 0 I 0,0 0,0 0:00.00 mm_percpu_wq
7 root 20 0 0 0 0 S 0,0 0,0 0:00.08 ksoftirqd/0
8 root 20 0 0 0 0 I 0,0 0,0 0:08.14 rcu_sched
9 root 20 0 0 0 0 I 0,0 0,0 0:00.00 rcu_bh
10 root rt 0 0 0 0 S 0,0 0,0 0:00.00 migration/0
11 root rt 0 0 0 0 S 0,0 0,0 0:00.02 watchdog/0
12 root 20 0 0 0 0 S 0,0 0,0 0:00.00 cpuhp/0
13 root 20 0 0 0 0 S 0,0 0,0 0:00.00 cpuhp/1
14 root rt 0 0 0 0 S 0,0 0,0 0:00.02 watchdog/1
15 root rt 0 0 0 0 S 0,0 0,0 0:00.00 migration/1
16 root 20 0 0 0 0 S 0,0 0,0 0:00.06 ksoftirqd/1
18 root 0 -20 0 0 0 I 0,0 0,0 0:00.00 kworker/1:0H
19 root 20 0 0 0 0 S 0,0 0,0 0:00.00 cpuhp/2
20 root rt 0 0 0 0 S 0,0 0,0 0:00.02 watchdog/2
21 root rt 0 0 0 0 S 0,0 0,0 0:00.00 migration/2
22 root 20 0 0 0 0 S 0,0 0,0 0:00.03 ksoftirqd/2
24 root 0 -20 0 0 0 I 0,0 0,0 0:00.00 kworker/2:0H
25 root 20 0 0 0 0 S 0,0 0,0 0:00.00 cpuhp/3
26 root rt 0 0 0 0 S 0,0 0,0 0:00.03 watchdog/3
我使用 Chrome 版本 71.0.3578.98(官方版本)(64 位)
我有 10 个 Chrome 扩展程序,但没有一个叫做 zygote
“软件已更新”- Ubuntu 软件
我认为我没有任何 Gnome 扩展,不知道如何检查
gnome-shell --version
GNOME Shell 3.28.3
Chrome 活跃扩展程序:
- delugesiphon 0.72.5
- Google Docs Offline 1.7
- IP Address and Domain Information 4.0.1.0
- Nano Adblocker 1.0.0.83 - just installed, should not have caused issue
- Nano Defender 15.0.0.81 - just installed
- Tampermonkey 4.7.54 - just installed
- User-Agent Switcher for Google Chrome 1.9.3
- Docs 0.10
- Sheets 1.2
- Slides 0.10
答案1
来自评论...
看起来 Chrome 或者您安装的某个扩展程序导致了您的系统日志文件疯狂。
任何一个:
暂时禁用所有 Chrome 扩展程序,看看问题是否仍然存在。
暂时用 Firefox 运行,看看问题是否仍然出现。
答案2
这解决了它
ps ax | grep zygote
62183 tty2 S+ 0:00 /opt/brave.com/brave/brave --type=zygote
62185 tty2 S+ 0:00 /opt/brave.com/brave/brave --type=zygote
62781 pts/9 S+ 0:00 grep --color=auto zygote
kill 62183
答案3
这在 Ubuntu 22.04 中仍可能触发,因此更新答案以反映此问题的现代示例。例如,您可能会在日志中看到这一点,/var/log/syslog 以大约 20 兆/秒的速度填满:
$ tail /var/log/syslog
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036685:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036692:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036699:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036706:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036713:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036720:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036727:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036734:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036740:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
Jun 20 15:40:21 d11 update-notifier-crash[286845]: [286845:286845:0100/000000.036747:ERROR:zygote_linux.cc(242)] Error reading message from browser: Socket operation on non-socket (88)
要重新控制该系统,我们首先需要清理 /var/log/syslog。最简单的方法是用空字符串重写它以将其清除:
$ echo '' | sudo tee /var/log/syslog
然后,您可以使用监视命令来观察 /var/log/syslog 是否已填满(您可以按 Ctrl-C 退出):
$ watch 'du -sh /var/log/syslog'
Every 2.0s: du -sh /var/log/syslog d11: Tue Jun 20 15:52:47 2023
40M /var/log/syslog
实际情况是,根据 Google 的说法,zygote 会“监听来自主进程的生成请求,并作为响应自行分叉。通常使用它们是因为在执行一些昂贵的设置后分叉进程可以节省时间并共享额外的内存页面。”
Zygote 在多个系统中使用,通过运行以下命令您可以看到:
$ ps aux | grep zygote
user 286844 0.0 0.0 2888 968 ? Ss Jun19 0:00 sh -c /opt/google/chrome/chrome --type=zygote --crashpad-handler-pid=286060 --enable-crash-reporter=, --change-stack-guard-on-fork=enable
user 286845 99.0 0.0 33863804 27772 ? R Jun19 1078:27 /opt/google/chrome/chrome --type=zygote --crashpad-handler-pid=286060 --enable-crash-reporter=, --change-stack-guard-on-fork=enable
user 343871 0.0 0.0 236772 49764 ? S 01:03 0:00 /home/user/.local/share/Steam/ubuntu12_64/steamwebhelper --type=zygote --no-zygote-sandbox --disable-seccomp-filter-sandbox --log-file=/home/user/.local/share/Steam/logs/cef_log.txt --product-version=Valve Steam Client --lang=en_US.UTF-8 --buildid=1686880776 --steamid=0
user 343872 0.0 0.0 236772 49748 ? S 01:03 0:00 /home/user/.local/share/Steam/ubuntu12_64/steamwebhelper --type=zygote --disable-seccomp-filter-sandbox --log-file=/home/user/.local/share/Steam/logs/cef_log.txt --product-version=Valve Steam Client --lang=en_US.UTF-8 --buildid=1686880776 --steamid=0
user 343874 0.0 0.0 236772 13836 ? S 01:03 0:00 /home/user/.local/share/Steam/ubuntu12_64/steamwebhelper --type=zygote --disable-seccomp-filter-sandbox --log-file=/home/user/.local/share/Steam/logs/cef_log.txt --product-version=Valve Steam Client --lang=en_US.UTF-8 --buildid=1686880776 --steamid=0
user 505906 0.0 0.0 17868 2416 pts/1 S+ 15:42 0:00 grep --color=auto zygote
为了解决这个问题,我发现退出有问题的应用程序是不够的。要解决这个问题,只需找到进程号(输出中进程用户名后面的列ps aux
),然后将其终止,或者killall chrome
如果你够勇敢的话,只需这样做:
$ sudo killall chrome
随着有问题的进程被终止,你的系统日志应该会恢复到正常大小(每次几kb)。
问题解决后,您可以检查您的 chrome 插件,看看是否有东西再次触发此问题。对我来说,这不是插件问题,一旦有问题的进程被清除,它就不会再回来了!