[英]CPU 100% used by lockgit
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.