zielu / GitToolBox

GitToolBox IntelliJ plugin
GNU General Public License v3.0
607 stars 76 forks source link

[BUG] Lots of zombie "git.exe" processes spawned #561

Open gengengengengen opened 4 months ago

gengengengengen commented 4 months ago

Describe the bug This plugin(maybe) spawns looooots of "git.exe" processes, NOT shown in taskmanager but in RamMap.exe. The number of spawned processes is keep increasing, and the page-table RAM will increasing too without any ram release. Every git.exe processes only uses 28k Page Table space but the whole page table space can reach GigaBytes on my machine)

To Reproduce Steps to reproduce the behavior:

  1. Launch Idea with the GitToolbox enabled
  2. Open a complex project with around 10-15 different private evironment Git repositories
  3. When checking in RamMap.exe after hours later, the Processes list show a large amount of git.exe and the PageTable type Ram could increasing to 5 ~ 6 GigaBytes.

Workaround

  1. Restart machine and only open the Idea, auto fetch failed and the git.exe processes start to spawned in minutes.

  2. Switch on the VPN for the private git repo environment make the auto fetch working, but git.exe still spawned.

  3. Disabled the auto fetch, but git.exe still spawned.

  4. Searching for solutions and find this issue https://github.com/zielu/GitToolBox/issues/404

  5. Try disable the plugin soon...

Expected behavior No more zombie "git.exe" processes spawned. Maybe the cause is not the GitToolBox but still want to find some help.

Plugin version 500.2.10+233

IDE version IntelliJ IDEA 2024.1.1 (Ultimate Edition) Build #IU-241.15989.150, built on April 29, 2024 Licensed to 【BEEP】 Subscription is active until October 14, 2024. Runtime version: 17.0.10+1-b1207.14 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0 GC: G1 Young Generation, G1 Old Generation Memory: 2048M Cores: 16 Registry: ide.balloon.shadow.size=0 ide.new.editor.tabs.vertical.borders=true ide.animate.toolwindows=true ide.experimental.ui=true ide.editor.tab.selection.animation=true Non-Bundled Plugins: com.jlh.plugin.idea.mybatis.generator (2.13) io.zhile.research.ide-eval-resetter (2.1.13) org.example.BetterIntelliJ (1.16) cn.wuzhizhan.plugin.mybatis (2020.12.18) izhangzhihao.rainbow.brackets (2024.2.3-241) com.chrisrm.idea.MaterialThemeUI (9.2.1) JProfiler (19.9.3) zielu.gittoolbox (500.2.10+233) Kotlin: 241.15989.150-IJ

Screenshots image

zielu commented 4 months ago

Hi, is it possibile to check in rammap what is the command line of the zombies ? It might give some clue what is the cause.

zielu commented 4 months ago

Same happens without my plugin, it is enough to have a project with many repos and run "Update Project" action. Zombies die when IDE is exited

zielu commented 4 months ago

Looks ile somebody already reported this: https://youtrack.jetbrains.com/issue/IDEA-356749/Zombie-processes-after-some-uptime

gengengengengen commented 4 months ago

Looks ile somebody already reported this: https://youtrack.jetbrains.com/issue/IDEA-356749/Zombie-processes-after-some-uptime

Sorry for disturbing you. This problem is not so clear but I am sure the cause is not the GitToolBox plugin.

Recent days I used the Process Explorer for some clue, and found not only git.exe, but also runerw.exe、conhost.exe、jcmd.exe spawned by different Tools, IDE and extentions on VsCode(Java Extention Pack)、Github desktop ... The command lines of these processses are not GitToolBox related(when I disabled this plugin).

Maybe some other GIT related or IDE related programs or sys services blocked the relsease of the died processes and keep the zombies leaved in the memory. I will find more information about this.

Thank you very much.

gengengengengen commented 4 months ago

Some progress. Refer (and thanks) to this post https://superuser.com/questions/1838566/how-to-identify-a-driver-causing-every-exited-process-to-become-a-zombie-pollut I used DDU uninstall the AMD(My device is a laptop with AMD 8845H GPU) display drivers in Windows safe mode and reinstalled the driver package (latest AMD all-in-one driver package) with "driver only" options. The spawn of zombie processes did slow down. After one day uptime, zombie processes decreased from 2 ~ 300k to 20k. The PageTable usage decreased from 4 ~ 6 GB to 1.2GB. Although the issue have not completely resolved but at least my PC no longer gets slow during one ~ two day uptime.