You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Manjaro/Plasma克隆大型Git仓库时CPU核心逐个满载卡死问题求助

Manjaro/Plasma克隆大型Git仓库时CPU核心逐个满载卡死问题求助

Hey there, I feel your pain—troubleshooting VM issues while trying to get work done is the worst, especially when you’re not a Linux expert. Let’s break down what’s going on here and try to narrow down the root cause.

先梳理下你的问题时间线:

  • 旧版Manjaro 21.2.1(Kernel 5.15)运行正常,升级到22.1.3(Kernel 6.1)后出现异常
  • 首次安装用开源驱动:克隆大仓库时CPU核心逐个满载,系统逐渐卡死直至无法操作
  • 换闭源NVIDIA驱动后恢复正常,能顺利克隆仓库;但删除Baloo相关文件后,再次克隆仓库又触发了同样的CPU满载卡死问题

可能的排查方向和解决建议:

1. 先排查Git/仓库本身的问题

大型仓库克隆时,Git的后台进程(比如自动GC、仓库钩子脚本)或IO瓶颈可能导致异常资源占用,尤其是在VM环境下:

  • 尝试只下载仓库数据不检出文件:git clone --no-checkout <仓库地址>,如果不会触发CPU满载,那大概率是检出文件时触发了系统层面的资源占用(比如Baloo残留、文件索引服务)
  • 如果--no-checkout也卡死,试试浅克隆:git clone --depth 1 <仓库地址>,排除仓库过大导致的隐性过载问题(虽然你的内存剩余充足,但VM的虚拟磁盘IO性能可能是瓶颈)

2. 清理Baloo的残留影响

你用sudo find / -type f -name '*baloo*' -delete强制删除文件的方式比较暴力,可能残留了后台进程或配置文件导致系统异常:

  • 先检查Baloo相关进程是否还在运行:ps aux | grep baloo,如果有,用kill -9 <进程ID>彻底终止
  • 清理Baloo的配置和缓存目录:
    rm -rf ~/.local/share/baloo/
    rm -rf ~/.config/baloofilerc
    
  • 重启系统后再尝试克隆仓库,看是否还会触发CPU问题

3. 检查VM的硬件配置和虚拟化设置

作为Arch主机上的VM,虚拟化层面的配置可能影响性能稳定性:

  • 调整CPU核心分配:你给了20线程,但KVM/QEMU的CPU调度在某些场景下可能异常,试试暂时降到8核,看克隆时是否还会逐个核心满载
  • 优化VM磁盘IO:如果虚拟磁盘是qcow2格式,确认是否开启了cache=writeback或io=native,IO性能瓶颈可能导致CPU等待IO而持续满载
  • 检查显卡直通稳定性:如果你的NVIDIA显卡是直通给VM的,查看主机和VM的虚拟化日志,确认没有资源分配冲突

4. 排查Kernel和驱动的兼容性问题

从Kernel 5.15升级到6.1后,闭源NVIDIA驱动虽然安装成功,但可能存在隐性兼容性问题:

  • 临时切换回Kernel 5.15(通过Manjaro Settings Manager安装旧内核),再尝试克隆仓库,如果正常运行,那大概率是Kernel 6.1与你的VM/NVIDIA驱动组合存在兼容性问题
  • 查看NVIDIA驱动日志:dmesg | grep nvidia,排查是否有驱动崩溃、资源分配失败等异常信息

5. 实时监控进程,定位核心问题

下次克隆仓库时,在另一个终端实时监控CPU占用:

  • 用htop或top按CPU使用率排序,观察是哪个进程先开始占用CPU,然后导致核心逐个满载(是git本身?还是kwin、systemd这类系统进程?)
  • 用pidstat -u 1每秒刷新一次进程CPU占用,记录卡死时的进程列表,这能帮你精准定位问题

补充你的系统信息(方便其他开发者参考)

sudo inxi -Fazy

System:
Kernel: 6.1.30-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
root=UUID=74c20d02-d0eb-47b1-bdff-46aeca800c85 rw quiet splash
udev.log_priority=3
Desktop: KDE Plasma v: 5.27.4 tk: Qt v: 5.15.9 wm: kwin_x11 dm: SDDM
Distro: Manjaro Linux base: Arch Linux
Machine:
Type: Vm-other System: Dell product: XPS 8500 v: pc-q35-5.2 serial: N/A
Chassis: QEMU type: 1 v: pc-q35-5.2 serial: N/A
Mobo: N/A model: N/A serial: N/A UEFI: Dell v: Default System date: N/A
CPU:
Info: model: Intel Core i9-10900K bits: 64 type: MT MCP arch: Comet Lake
gen: core 10 level: v3 note: check built: 2020 process: Intel 14nm family: 6
model-id: 0xA5 (165) stepping: 5 microcode: 0xF6
Topology: cpus: 1x cores: 10 tpc: 2 threads: 20 smt: enabled cache:
L1: 1.2 MiB desc: d-20x32 KiB; i-20x32 KiB L2: 40 MiB desc: 10x4 MiB
L3: 16 MiB desc: 1x16 MiB
Speed (MHz): avg: 3696 min/max: N/A base/boost: 2000/2000 cores: 1: 3696
2: 3696 3: 3696 4: 3696 5: 3696 6: 3696 7: 3696 8: 3696 9: 3696 10: 3696
11: 3696 12: 3696 13: 3696 14: 3696 15: 3696 16: 3696 17: 3696 18: 3696
19: 3696 20: 3696 bogomips: 147896
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: mmio_stale_data status: Vulnerable: Clear CPU buffers attempted, no
microcode; SMT Host state unknown
Type: retbleed mitigation: Enhanced IBRS
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
sanitization
Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB
filling, PBRSB-eIBRS: SW sequence
Type: srbds status: Unknown: Dependent on hypervisor status
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA TU104 [GeForce RTX 2080 SUPER] vendor: ASUSTeK
driver: nvidia v: 530.41.03 alternate: nouveau,nvidia_drm non-free: 530.xx+
status: current (as of 2023-05) arch: Turing code: TUxxx
process: TSMC 12nm FF built: 2018-22 pcie: gen: 3 speed: 8 GT/s lanes: 16
bus-ID: 04:00.0 chip-ID: 10de:1e81 class-ID: 0300
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.1
compositor: kwin_x11 driver: X: loaded: nvidia gpu: nvidia display-ID: :0
screens: 1
Screen-1: 0 s-res: 3840x1080 s-dpi: 81 s-size: 1204x343mm (47.40x13.50")
s-diag: 1252mm (49.29") monitors: <missing: xrandr>
API: OpenGL v: 4.6.0 NVIDIA 530.41.03 renderer: NVIDIA GeForce RTX 2080
SUPER/PCIe/SSE2 direct-render: Yes
Audio:
Device-1: NVIDIA TU104 HD Audio vendor: ASUSTeK driver: snd_hda_intel
v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 bus-ID: 05:00.0
chip-ID: 10de:10f8 class-ID: 0403
API: ALSA v: k6.1.30-1-MANJARO status: kernel-api with: aoss
type: oss-emulator tools: alsactl,alsamixer,amixer
Server-1: JACK v: 1.9.22 status: off tools: N/A
Server-2: PipeWire v: 0.3.70 status: n/a (root, process) with: wireplumber
status: active tools: pw-cli,wpctl
Server-3: PulseAudio v: 16.1 status: active (root, process)
with: pulseaudio-alsa type: plugin tools: pacat,pactl
Network:
Device-1: Intel 82574L Gigabit Network driver: e1000e v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 01:00.0 chip-ID: 8086:10d3
class-ID: 0200
IF: enp1s0 state: up speed: 1000 Mbps duplex: full mac:
Drives:
Local Storage: total: 2.55 TiB used: 37.43 GiB (1.4%)
ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: Expansion size: 1.82 TiB
block-size: physical: 4096 B logical: 512 B type: USB rev: 2.1 spd: 480 Mb/s
lanes: 1 mode: 2.0 tech: N/A serial: fw-rev: 0712 scheme: GPT
SMART Message: A mandatory SMART command failed. Various possible causes.
ID-2: /dev/vda maj-min: 254:0 model: N/A size: 750 GiB block-size:
physical: 512 B logical: 512 B tech: N/A serial: N/A scheme: GPT
SMART Message: Unknown smartctl error. Unable to generate data.
Partition:
ID-1: / raw-size: 749.7 GiB size: 736.87 GiB (98.29%) used: 37.43 GiB (5.1%)
fs: ext4 block-size: 4096 B dev: /dev/vda2 maj-min: 254:2
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 288 KiB (0.1%) fs: vfat block-size: 512 B dev: /dev/vda1 maj-min: 254:1
Swap:
Alert: No swap data was found.
Sensors:
System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 36 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 328 Uptime: 10m wakeups: 0 Memory: available: 15.25 GiB
used: 1.54 GiB (10.1%) Init: systemd v: 252 default: graphical
tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7 Packages: pm: pacman
pkgs: 1126 libs: 323 tools: pamac pm: flatpak pkgs: 0 Shell: Zsh (sudo)
v: 5.9 default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.27

备注:内容来源于stack exchange,提问作者his dudeness

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 10:25:28