在映射的网络驱动器上签出代码时,如何解决git fsync错误

时间:2018-06-29 01:55:22

标签: git jenkins mapped-drive fsync

我有一个Jenkins作业,可以将git代码签出到映射的网络文件共享中,以便多个执行者可以并行处理和测试代码。我估计大约90%的时间里所有事情都是美好的并且可以正常工作,然后似乎无所不在。

ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Command ""C:\Program Files\Git\bin\git.exe" fetch --tags --progress https://bitbucket.org/somecompany/some.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: remote: Counting objects: 104850, done.        
remote: Compressing objects:   0% (1/24671)           
remote: Compressing objects:   1% (247/24671)           
remote: Compressing objects:   2% (494/24671)           
remote: Compressing objects:   3% (741/24671)           
...        
remote: Compressing objects:  97% (23931/24671)           
remote: Compressing objects:  98% (24178/24671)           
remote: Compressing objects:  99% (24425/24671)           
remote: Compressing objects: 100% (24671/24671)           
remote: Compressing objects: 100% (24671/24671), done.        
Receiving objects:   0% (1/104850)   
Receiving objects:   1% (1049/104850), 244.01 KiB | 464.00 KiB/s   
Receiving objects:   1% (1427/104850), 244.01 KiB | 464.00 KiB/s   
Receiving objects:   2% (2097/104850), 440.01 KiB | 285.00 KiB/s   
Receiving objects:   2% (2456/104850), 440.01 KiB | 285.00 KiB/s   
Receiving objects:   3% (3146/104850), 648.01 KiB | 252.00 KiB/s   
Receiving objects:   3% (3483/104850), 648.01 KiB | 252.00 KiB/s   
...
Receiving objects:  97% (101705/104850), 11.32 MiB | 1.78 MiB/s   
Receiving objects:  98% (102753/104850), 11.32 MiB | 1.78 MiB/s   
Receiving objects:  98% (103514/104850), 11.96 MiB | 1.91 MiB/s   
Receiving objects:  99% (103802/104850), 12.05 MiB | 1.82 MiB/s   
Receiving objects:  99% (104664/104850), 12.05 MiB | 1.82 MiB/s   
remote: Total 104850 (delta 78967), reused 104782 (delta 78936)        
Receiving objects: 100% (104850/104850), 12.05 MiB | 1.82 MiB/s   
Receiving objects: 100% (104850/104850), 12.40 MiB | 1.05 MiB/s, done.
Resolving deltas:   0% (0/78967)   
Resolving deltas:   1% (804/78967)   
Resolving deltas:   1% (1193/78967)   
Resolving deltas:   2% (1581/78967)   
Resolving deltas:   2% (2191/78967)   
Resolving deltas:   3% (2428/78967)   
Resolving deltas:   3% (3006/78967)   
...
Resolving deltas:  97% (76616/78967)   
Resolving deltas:  97% (77322/78967)   
Resolving deltas:  98% (77400/78967)   
Resolving deltas:  99% (78188/78967)   
Resolving deltas:  99% (78328/78967)   
Resolving deltas: 100% (78967/78967)   
Resolving deltas: 100% (78967/78967), done.
fatal: fsync error on '.git/objects/pack/tmp_idx_nU1ucb': Bad file descriptor
fatal: index-pack failed

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2002)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1721)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:405)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:614)
    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
    at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
    at hudson.remoting.UserRequest.perform(UserRequest.java:210)
    at hudson.remoting.UserRequest.perform(UserRequest.java:53)
    at hudson.remoting.Request$2.run(Request.java:358)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at hudson.remoting.Engine$1$1.run(Engine.java:94)
    at java.lang.Thread.run(Unknown Source)
    Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from mcusdev31.mainman.dcs/172.21.10.11:50789
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
        at hudson.remoting.UserResponse.retrieve(UserRequest.java:389)
        at hudson.remoting.Channel.call(Channel.java:955)
        at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
        at sun.reflect.GeneratedMethodAccessor868.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
        at com.sun.proxy.$Proxy120.execute(Unknown Source)
        at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)
        at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
        at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
        at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
        at hudson.security.ACL.impersonate(ACL.java:290)
        at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        ... 1 more

我不知道是什么突然导致了它或它来自哪里。 Here指出:

  

正确的解决方案是不要将Git存储库存储在网络驱动器上。 (我并不是想打招呼。这显然不是受支持的方案。)

但这是真的吗? 有没有办法解决?除了偶尔出现打h之外,这似乎还算不错,但我希望产生一个更具确定性的构建系统,该系统能够并行运行代码测试任务,而不必不断检出或移动我们的整个存储库。有人知道我的问题可能是什么,还是找到了更一致的方法呢?

0 个答案:

没有答案