简体   繁体   English

CPU 100% 被 lockgit 使用

[英]CPU 100% used by lockgit

顶部显示 lockgit 使用 349.2% CPU

How should I investigate this situation?我应该如何调查这种情况?

I have not killed it because I don't know if there will be other problems.我没有杀它,因为不知道会不会有其他问题。

I restarted gitlab but it didn't work.我重新启动gitlab但它没有用。

$ kill 3725346

在此处输入图像描述

kill has no effect on it, it seems to restart automatically. kill 对它没有影响,它似乎自动重启。

try remove尝试删除

I want to find the lockgit folder location and delete it.我想找到lockgit文件夹位置并将其删除。

$ cd /proc/185258ll
$ ll

在此处输入图像描述

I can't find the folder我找不到文件夹

Use利用

$ kill 3725346

and if need be, kill -9 .如果需要, kill -9

Prior to that you might wish to investigate with ps lp 3725346 to learn about its parent, and sudo lsof -p 3725346 to see what files it has open.在此之前,您可能希望使用ps lp 3725346进行调查以了解其父级,并sudo lsof -p 3725346查看它打开了哪些文件。 The lsof utility can also help you find other processes which are holding open a file of interest. lsof实用程序还可以帮助您找到保持打开感兴趣文件的其他进程。

Certainly a resident set of > 2 GiB is impressive.当然,> 2 GiB 的常驻集令人印象深刻。 Note whether this, or a subsequently restarted git command, allocates that immediately or if the memory footprint slowly grows with time.请注意,此命令或随后重新启动的 git 命令是立即分配,还是 memory 占用空间随时间缓慢增长。

EDIT编辑

The pkg source code is at https://github.com/jswidler/lockgit . pkg 源代码位于https://github.com/jswidler/lockgit

Figure out how it is being invoked, both command line args and environment.弄清楚它是如何被调用的,包括命令行参数和环境。

Compile it with debug symbols.用调试符号编译它。 Invoke under gdb (or attach gdb to the running, spinning process).在 gdb 下调用(或attach gdb 附加到正在运行的、旋转的进程中)。 Set a breakpoint at main(), then single step through it until things fall apart, same as you'd debug any of your own programs that went astray.在 main() 处设置一个断点,然后单步执行它直到事情崩溃,就像您调试任何误入歧途的自己的程序一样。


In an extreme case, you could arrange for the problematic code to not run at all.在极端情况下,您可以安排有问题的代码根本不运行。 For example, chdir to its directory and then cp -p /usr/bin/true lockgit .例如,chdir 到它的目录,然后cp -p /usr/bin/true lockgit It will immediately succeed, with no effect.它会立即成功,没有任何效果。 Which is Bad if you needed it to properly manipulate some secrets, but Good if you just want to move on without the useless spinning process.如果您需要它来正确操纵一些秘密,这很糟糕,但如果您只想继续前进而不需要无用的旋转过程,那就太好了。

This might give you a better understanding of what's happening.这可能会让您更好地了解正在发生的事情。 If it doesn't, then bite the bullet and uninstall lockgit, stop using a program once you find you cannot make it run reliably in your environment.如果没有,那么咬紧牙关卸载 lockgit,一旦发现无法使其在您的环境中可靠运行,请停止使用该程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 大多数时间 Redshift CPU 利用率为 100% - Redshift CPU utilisation is 100 percent most of the time Kube.netes 在节点上达到 100% CPU,但在 pod 上没有 - Kubernetes hitting 100% CPU on node, but not on pods 0 字节的共享 0 字节 (100%) 在 Google Workspace 中使用 - 0 bytes of shared 0 bytes (100%) used in Google Workspace 像 Colab 和 Kaggle 一样,在 Google Cloud VM Notebooks 中制作简单的循环使用 100% 的 CPU - Make simple loop utilizes 100% of CPU in Google Cloud VM Notebooks just like on Colab and Kaggle 为什么 EC2 服务器上的多个 Ruby 进程会导致 100% 的 CPU 使用率? - Why are multiple Ruby processes on an EC2 server causing 100% CPU utilisation? JMeter:Perfmon 报告显示服务器 CPU 使用率为 100%,但在 AWS 仪表板上仅为 1.5% - JMeter: Perfmon report shows 100% usage of server's CPU but it was only 1.5% on AWS dashboard RDS实例CPU为99% - The RDS instance CPU is 99% 始终具有 0 个最小实例的 CPU - Always CPU with 0 minimum instances HPA 缩放,即使当前 CPU 低于目标 CPU - HPA Scaling even though Current CPU is below Target CPU 基于 CPU 利用率的节点自动缩放器 - Node autoscaler based on CPU utilisation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM