如何修复Git中的“index-pack died of signal 15”错误?

huangapple go评论46阅读模式
英文:

How to fix 'index-pack died of signal 15' error in Git?

问题

起初我们以为 Git 的浅克隆会解决这个问题。然而,我们仍然遇到了这个问题。它是间歇性的,也会发生在没有分支和标签的存储库上。在 Jenkins 构建期间通过 Git 拉取时注意到的错误。在 Git 的跟踪或 Git 调试中没有看到明显的问题。

有解决这个问题的想法吗?

22:41:16 stdout:
22:41:16 stderr: remote: 正在枚举对象: 781,948,完成。
22:41:16 remote: 计算对象: 0%(1/8,931)
远程: 计算对象: 1%(90/8,931)
远程: 计算对象: 2%(179/8,931)
远程: 计算对象: 3%(268/8,931)
远程: 计算对象: 4%(358/8,931)
远程: 计算对象: 5%(447/8,931)
远程: 计算对象: 96%(8,574/8,931)
远程: 计算对象: 97%(8,664/8,931)
远程: 计算对象: 98%(8,753/8,931)
远程: 计算对象: 99%(8,842/8,931)
远程: 计算对象: 100%(8,931/8,931)
远程: 计算对象: 100%(8,931/8,931),完成。
22:41:16 remote: 正在压缩对象: 0%(1/2,514)
远程: 正在压缩对象: 1%(26/2,514)
远程: 正在压缩对象: 2%(51/2,514)
远程: 正在压缩对象: 3%(76/2,514)
远程: 正在压缩对象: 4%(101/2,514)
远程: 正在压缩对象: 5%(126/2,514)
远程: 正在压缩对象: 6%(151/2,514)
远程: 正在压缩对象: 7%(176/2,514)
远程: 正在压缩对象: 8%(202/2,514)
远程: 正在压缩对象: 9%(227/2,514)
远程: 正在压缩对象: 10%(252/2,514)
远程: 正在压缩对象: 11%(277/2,514)
远程: 正在压缩对象: 12%(302/2,514)
远程: 正在压缩对象: 13%(327/2,514)
远程: 正在压缩对象: 14%(352/2,514)
远程: 正在压缩对象: 15%(378/2,514)
远程: 正在压缩对象: 71%(1,785/2,514)
远程: 正在压缩对象: 72%(1,811/2,514)
远程: 正在压缩对象: 73%(1,836/2,514)
远程: 正在压缩对象: 74%(1,861/2,514)
远程: 正在压缩对象: 75%(1,886/2,514)
远程: 正在压缩对象: 76%(1,911/2,514)
远程: 正在压缩对象: 77%(1,936/2,514)
远程: 正在压缩对象: 78%(1,961/2,514)
远程: 正在压缩对象: 79%(1,987/2,514)
远程: 正在压缩对象: 97%(2,439/2,514)
远程: 正在压缩对象: 98%(2,464/2,514)
远程: 正在压缩对象: 99%(2,489/2,514)
远程: 正在压缩对象: 100%(2,514/2,514)
远程: 正在压缩对象: 100%(2,514/2,514),完成。
22:41:16 正在接收对象: 0%(1/781,948)
接收对象: 0%(1,290/781,948),164.01 KiB | 157.00 KiB/s
接收对象: 0%(2,623/781,948),332.01 KiB | 161.00 KiB/s
接收对象: 0%(3,914/781,948),420.01 KiB | 161.00 KiB/s
接收对象: 68%(533,555/781,948),101.66 MiB | 146.00 KiB/s
错误: index-pack 因信号 15 而终止
22:41:16 致命错误: index-pack 失败
22:41:16 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2734)
22:41:16 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2111)
22:41:16 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:87)
22:41:16 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:623)
22:41:16 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:852)

英文:

At first we thought git shallow will resolve this. However we still see the problem. Its intermittent and occurs for repos without branch and tags too. Errors noticed on Jenkins build during git fetch. Don't see anything obvious in git trace or git debug.

Any ideas on how to resolve this?

22:41:16  stdout: 
22:41:16  stderr: remote: Enumerating objects: 781948, done.        
22:41:16  remote: Counting objects:   0% (1/8931)        
remote: Counting objects:   1% (90/8931)        
remote: Counting objects:   2% (179/8931)        
remote: Counting objects:   3% (268/8931)        
remote: Counting objects:   4% (358/8931)        
remote: Counting objects:   5% (447/8931)        
remote: Counting objects:  96% (8574/8931)        
remote: Counting objects:  97% (8664/8931)        
remote: Counting objects:  98% (8753/8931)        
remote: Counting objects:  99% (8842/8931)        
remote: Counting objects: 100% (8931/8931)        
remote: Counting objects: 100% (8931/8931), done.        
22:41:16  remote: Compressing objects:   0% (1/2514)        
remote: Compressing objects:   1% (26/2514)        
remote: Compressing objects:   2% (51/2514)        
remote: Compressing objects:   3% (76/2514)        
remote: Compressing objects:   4% (101/2514)        
remote: Compressing objects:   5% (126/2514)        
remote: Compressing objects:   6% (151/2514)        
remote: Compressing objects:   7% (176/2514)        
remote: Compressing objects:   8% (202/2514)        
remote: Compressing objects:   9% (227/2514)        
remote: Compressing objects:  10% (252/2514)        
remote: Compressing objects:  11% (277/2514)        
remote: Compressing objects:  12% (302/2514)        
remote: Compressing objects:  13% (327/2514)        
remote: Compressing objects:  14% (352/2514)        
remote: Compressing objects:  15% (378/2514)        
remote: Compressing objects:  71% (1785/2514)        
remote: Compressing objects:  72% (1811/2514)        
remote: Compressing objects:  73% (1836/2514)        
remote: Compressing objects:  74% (1861/2514)        
remote: Compressing objects:  75% (1886/2514)        
remote: Compressing objects:  76% (1911/2514)        
remote: Compressing objects:  77% (1936/2514)        
remote: Compressing objects:  78% (1961/2514)        
remote: Compressing objects:  79% (1987/2514)            
remote: Compressing objects:  97% (2439/2514)        
remote: Compressing objects:  98% (2464/2514)        
remote: Compressing objects:  99% (2489/2514)        
remote: Compressing objects: 100% (2514/2514)        
remote: Compressing objects: 100% (2514/2514), done.        
22:41:16  Receiving objects:   0% (1/781948)   
Receiving objects:   0% (1290/781948), 164.01 KiB | 157.00 KiB/s   
Receiving objects:   0% (2623/781948), 332.01 KiB | 161.00 KiB/s   
Receiving objects:   0% (3914/781948), 420.01 KiB | 161.00 KiB/s   
Receiving objects:  68% (533555/781948), 101.66 MiB | 146.00 KiB/s   
error: index-pack died of signal 15
22:41:16  fatal: index-pack failed
22:41:16  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2734)
22:41:16  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2111)
22:41:16  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:87)
22:41:16  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:623)
22:41:16  	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:852)
22:41:16  	at 

答案1

得分: 2

Signal 15 是 SIGTERM。有些东西要求你的进程优雅地退出(与更严厉的 SIGKILL (9) 相反)。

你需要弄清楚这个信号来自哪里。也许你已经根据你系统的知识有了猜测,如果是这样,你可以通过附加 strace 到嫌疑进程来确认。否则,https://stackoverflow.com/a/62434615/4811803 可能会帮助你找到罪魁祸首。

英文:

Signal 15 is SIGTERM. Something is asking your process to exit gracefully (as opposed to SIGKILL (9), which is more drastic).

You need to figure out where that signal comes from. Maybe you already have a guess based on knowledge of your system, in which case you could confirm by attaching strace to the suspect. Otherwise, https://stackoverflow.com/a/62434615/4811803 may help you find the culprit.

huangapple
  • 本文由 发表于 2023年5月30日 12:36:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76361653.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定