![Snap VSCode 设备上没有剩余空间](https://linux22.com/image/1177132/Snap%20VSCode%20%E8%AE%BE%E5%A4%87%E4%B8%8A%E6%B2%A1%E6%9C%89%E5%89%A9%E4%BD%99%E7%A9%BA%E9%97%B4.png)
我安装 snapcraft 的 VSCode 已经很久了。
它之前也出现过类似的崩溃,但我通过以下设置成功修复了这个问题:
sudo sysctl fs.inotify.max_user_watches=524288
但是现在它崩溃得更严重了。当我尝试使用code --verbose
以下命令启动 vscode 时,我得到了以下结果:
amir@amir-pc:~$ code --verbose
(process:20078): Gtk-WARNING **: 15:08:48.237: Locale not supported by C library.
Using the fallback 'C' locale.
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
[20104:1010/150848.496732:ERROR:gl_context_glx.cc(227)] Couldn't make context current with X drawable.
[20104:1010/150848.496791:ERROR:gpu_info_collector.cc(68)] gl::GLContext::MakeCurrent() failed
[20104:1010/150848.496808:ERROR:gpu_info_collector.cc(185)] Could not create context for info collection.
[20104:1010/150848.496824:ERROR:gpu_init.cc(64)] gpu::CollectGraphicsInfo failed.
[20104:1010/150848.499694:WARNING:x11_util.cc(1430)] X error received: serial 199, error_code 2 (BadValue (integer parameter out of range for operation)), request_code 155, minor_code 24 (X_GLXCreateNewContext)
[20104:1010/150848.500364:WARNING:x11_util.cc(1430)] X error received: serial 200, error_code 170 (GLXBadContext), request_code 155, minor_code 5 (X_GLXMakeCurrent)
[20104:1010/150848.501840:WARNING:x11_util.cc(1430)] X error received: serial 200, error_code 170 (GLXBadContext), request_code 155, minor_code 26 (X_GLXMakeContextCurrent)
[20104:1010/150848.501987:ERROR:viz_main_impl.cc(170)] Exiting GPU process due to errors during initialization
[20104:1010/150848.503057:WARNING:x11_util.cc(1430)] X error received: serial 201, error_code 170 (GLXBadContext), request_code 155, minor_code 4 (X_GLXDestroyContext)
[20078:1010/150848.507698:WARNING:gpu_process_host.cc(1193)] The GPU process has crashed 1 time(s)
[main 2020-10-10T11:38:48.537Z] Error: listen ENOSPC: no space left on device /run/user/1000/snap.code/vscode-6ecfff7c-1.40.2-main.sock
at Server.setupListenHandle [as _listen2] (net.js:1209:19)
at listenInCluster (net.js:1274:12)
at Server.listen (net.js:1373:5)
at /snap/code/21/usr/share/code/resources/app/out/vs/code/electron-main/main.js:194:613
at new Promise (<anonymous>)
at Object.t.serve (/snap/code/21/usr/share/code/resources/app/out/vs/code/electron-main/main.js:194:550)
at Object.doStartup (/snap/code/21/usr/share/code/resources/app/out/vs/code/electron-main/main.js:544:732)
at /snap/code/21/usr/share/code/resources/app/out/vs/code/electron-main/main.js:543:220
at h.invokeFunction (/snap/code/21/usr/share/code/resources/app/out/vs/code/electron-main/main.js:255:601)
at Object.startup (/snap/code/21/usr/share/code/resources/app/out/vs/code/electron-main/main.js:543:56)
[main 2020-10-10T11:38:48.540Z] Lifecycle#kill()
起初我以为清除内容/run/user/1000/
后一切就好了。但这样做之后cd /run/user/1000/ ; rm -rf *
(这有点危险),操作系统的窗口管理器(它的 Ubuntu 伙伴lightdm
)实际上崩溃了。我设法通过重新启动其服务将其启动并使其再次运行,但 VSCode 的问题仍然存在。我再次收到相同的错误。
这是我的系统上的输出df -h
:
amir@amir-pc:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 5.8G 0 5.8G 0% /dev
tmpfs 1.2G 2.1M 1.2G 1% /run
/dev/sda1 73G 45G 25G 65% /
tmpfs 5.8G 109M 5.7G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 5.8G 0 5.8G 0% /sys/fs/cgroup
/dev/loop0 8.0M 8.0M 0 100% /snap/pulsemixer/23
/dev/loop1 256K 256K 0 100% /snap/gtk2-common-themes/5
/dev/loop2 154M 154M 0 100% /snap/chromium/958
/dev/loop3 150M 150M 0 100% /snap/gnome-3-28-1804/71
/dev/loop5 92M 92M 0 100% /snap/core/8592
/dev/loop7 88M 88M 0 100% /snap/go/4520
/dev/loop6 173M 173M 0 100% /snap/skype/100
/dev/loop8 34M 34M 0 100% /snap/pypy3/50
/dev/loop4 153M 153M 0 100% /snap/chromium/1026
/dev/loop9 32M 32M 0 100% /snap/pypy/30
/dev/loop10 90M 90M 0 100% /snap/core/8039
/dev/loop11 15M 15M 0 100% /snap/remmina/3223
/dev/loop12 72M 72M 0 100% /snap/software-boutique/31
/dev/loop16 128K 128K 0 100% /snap/software-boutique/39
/dev/loop14 203M 203M 0 100% /snap/vlc/1049
/dev/loop17 55M 55M 0 100% /snap/core18/1265
/dev/loop15 175M 175M 0 100% /snap/inkscape/5874
/dev/loop13 203M 203M 0 100% /snap/vlc/1397
/dev/loop19 34M 34M 0 100% /snap/pypy/40
/dev/loop18 16M 16M 0 100% /snap/ubuntu-mate-welcome/420
/dev/loop20 55M 55M 0 100% /snap/core18/1668
/dev/loop21 8.0M 8.0M 0 100% /snap/pulsemixer/250
/dev/loop22 32M 32M 0 100% /snap/pypy3/37
/dev/loop23 15M 15M 0 100% /snap/remmina/3810
/dev/loop24 256K 256K 0 100% /snap/gtk2-common-themes/9
/dev/loop25 137M 137M 0 100% /snap/code/21
/dev/loop26 45M 45M 0 100% /snap/gtk-common-themes/1353
/dev/loop28 16M 16M 0 100% /snap/ubuntu-mate-welcome/411
/dev/loop27 220M 220M 0 100% /snap/gimp/189
/dev/loop29 45M 45M 0 100% /snap/gtk-common-themes/1440
/dev/loop30 175M 175M 0 100% /snap/inkscape/4693
/dev/sda3 608G 557G 21G 97% /mnt/9c710070-854e-463f-80bf-b291852869ba
tmpfs 1.2G 76K 1.2G 1% /run/user/1000
基本上,我的电脑已经运行了将近 28 天。我的意思是,我只是暂停并恢复了它(由于某些硬件问题,当它关闭时需要花费一些力气才能启动它,它无法重新启动,所以我现在暂停并恢复了很长时间)。
我知道这听起来可能很有趣,但目前我没有动力去修复任何东西。
这 28 天不间断使用内存是否会导致此问题?是否会导致创建如此多的垃圾文件并最终导致其他进程在硬盘/内存上没有空间?
我的计算机内存几乎已释放:
我无法断定 RAM 上没有剩余空间。
我知道如何抑制这个问题。通过重启我的笔记本电脑。
但这不是解决问题的方法。而是抑制。
有人知道如何解决这个问题吗?
Chromium(Snap Chromium)可以运行,Telegram 可以运行,Libreoffice 可以工作。但 VSCode 和 Mate 桌面应用程序崩溃了。
谢谢您的帮助。
我使用的是 Ubuntu Mate 18.04。
答案1
实际上,我的笔记本电脑的显卡出现了问题,因此无法启动。
我将其送去修复,现在它好了。