Repositories cannot be forked due to an I/O error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Repositories cannot be forked due to an I/O error

Environment

This issue occurred on Bitbucket Data Center 6.10.4, but other versions may also be affected.

Diagnosis

Attempts to fork a repository fail.

If Debug logging and profile logging are enabled, each failed attempt to fork a repository creates the following message in the application log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2021-01-22 13:38:32,014 DEBUG [http-nio-7990-exec-35751 url:/path/projects/PROJ/repos/repo url:/path/mvc/pr...PROJ/repos/repo username:user1] user1 *6EA8O0x818x16919960x7 1ck9ehg 10.68.206.3 "POST /projects/PROJ/repos/repo HTTP/1.1" c.a.s.i.r.DefaultRepositoryService Could not create repository ~USER1/repo com.atlassian.bitbucket.scm.CommandFailedException: PROJ/repo could not be forked to ~USER1/repo. at com.atlassian.stash.internal.scm.git.command.AbstractForkCommand.newCommandFailedException(AbstractForkCommand.java:97) at com.atlassian.stash.internal.scm.git.command.AbstractCreateCommand.configureRepository(AbstractCreateCommand.java:108) at com.atlassian.stash.internal.scm.git.command.AbstractForkCommand.configureRepository(AbstractForkCommand.java:57) ... at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.lang.Thread.run(Thread.java:748) ... 345 frames trimmed Caused by: java.io.IOException: Input/output error at sun.nio.ch.FileDispatcherImpl.lock0(Native Method) at sun.nio.ch.FileDispatcherImpl.lock(FileDispatcherImpl.java:90) at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1115) at java.nio.channels.FileChannel.tryLock(FileChannel.java:1155) at com.atlassian.stash.internal.scm.git.DefaultGitRepositoryLayout.withLock(DefaultGitRepositoryLayout.java:169) at com.atlassian.stash.internal.scm.git.DefaultGitRepositoryLayout.writeRepositoryConfig(DefaultGitRepositoryLayout.java:141) at com.atlassian.stash.internal.scm.git.command.AbstractCreateCommand.configureRepository(AbstractCreateCommand.java:106) ... 56 common frames omitted

and in the following lines in the profiler log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2021-01-22 13:38:32,058 | http-nio-7990-exec-35751 | *6EA8O0x818x16919960x7 | user1 | 1ck9ehg [12872.1ms] - "POST /projects/PROJ/repos/repo HTTP/1.1" [2.3ms] - ApplicationUser com.atlassian.bitbucket.user.UserService.getUserById(int) [12817.2ms] - Repository com.atlassian.bitbucket.repository.RepositoryService.fork(RepositoryForkRequest) [2.8ms] - InternalRepository com.atlassian.stash.internal.repository.RepositoryDao.getBySlug(String,String,String) [6.2ms] - Object com.atlassian.stash.internal.Dao.create(Object) [12799.4ms] - void com.atlassian.stash.internal.scm.InternalScmService.fork(Repository,ForkCommandParameters) [12735.3ms] - git: create repository(36303) [606.5ms] - /dcifent/GIT/bin/git clone --bare --shared --template=/dcifent/BITBUCKET_HOME/shared/config/git/templates /dcifent/BITBUCKET_HOME/shared/data/reposito... [12125.8ms] - git: configure fork 36303 [82.6ms] - /dcifent/GIT/bin/git remote rm origin [2.1ms] - PersonalProject com.atlassian.stash.internal.project.InternalProjectService.getPersonalProject() [1.5ms] - InternalPersonalProject com.atlassian.stash.internal.project.ProjectDao.getByOwner(int) [39.7ms] - Render soy: bitbucket.internal.page.repositoryFork.repositoryFork.forkRepo [9.5ms] [count: 3, avg: 3.2ms] - AvatarEnricher.enrich [8.5ms] - void com.atlassian.plugin.webresource.WebResourceManager.includeResources(Writer,UrlMode) [1.3ms] - UserSettings com.atlassian.sal.api.usersettings.UserSettingsService.getUserSettings(UserKey)

successful forks. There were successful attempts to fork repositories on the previous day.

Cause

The issue was caused by the NFS, which needed to be restarted.

Solution

Restarting the NFS has resolved the problem.

Updated on March 18, 2025

Still need help?

The Atlassian Community is here for you.