Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,294,828
Community Members
 
Community Events
165
Community Groups

Any progress on this limitation: An error occurred whilst tearing down directories.

This really prevents regular use. We need to restart the runner to get the build to work again.

1 answer

0 votes
lliang2 Atlassian Team Jan 19, 2022

Hey @Bob Swift _Appfire_ ,

Do you mind to share what error you got?

In our latest version, we should fix the child process issue, so our teardown logic should kill any child process created by it so runner should be able to clean up its directories without any issue.

The only case we can think of is build script create a directory that runner don't have permission to remove. And in this case, it require restart for runner.

Cheers

Leo Liang

I think it is the same as before. Running 279. I also having the problem of a build step completing successfully but not ending. I don't think there is anything in the log except perhaps a 2hr timeout message if I don't stop the process manually.

[2022-01-20 08:12:53,603] Updating step progress to PARSING_TEST_RESULTS.
[2022-01-20 08:12:53,791] Test report processing complete.
[2022-01-20 08:12:53,791] Updating step progress to COMPLETING_LOGS.
[2022-01-20 08:12:53,947] Shutting down log uploader.
[2022-01-20 08:12:53,947] Tearing down directories.
[2022-01-20 08:12:53,947] An error occurred whilst tearing down directories.
java.nio.file.FileSystemException: C:\runners\appfire.windows10-1\atlassian-bitbucket-pipelines-runner\bin\..\temp\4ff6e3dc-9e84-5724-b381-672cd7c61c02\1642694842088\build\build\build.properties: The process cannot access the file because it is being used by another process.

at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
at java.base/sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:274)
at java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
at java.base/java.nio.file.Files.delete(Files.java:1142)
at com.atlassian.pipelines.runner.core.directory.windows.WindowsDirectory$1.visitFile(WindowsDirectory.java:81)
at com.atlassian.pipelines.runner.core.directory.windows.WindowsDirectory$1.visitFile(WindowsDirectory.java:73)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2725)
at java.base/java.nio.file.Files.walkFileTree(Files.java:2797)
at com.atlassian.pipelines.runner.core.directory.windows.WindowsDirectory.delete(WindowsDirectory.java:73)
at com.atlassian.pipelines.runner.core.runtime.TemporaryDirectoryStepRuntimeImpl.teardownDirectories(TemporaryDirectoryStepRuntimeImpl.java:61)
at io.reactivex.internal.operators.completable.CompletableFromAction.subscribeActual(CompletableFromAction.java:35)
at io.reactivex.Completable.subscribe(Completable.java:2309)
at io.reactivex.internal.operators.completable.CompletablePeek.subscribeActual(CompletablePeek.java:51)
at io.reactivex.Completable.subscribe(Completable.java:2309)
at io.reactivex.internal.operators.completable.CompletablePeek.subscribeActual(CompletablePeek.java:51)
at io.reactivex.Completable.subscribe(Completable.java:2309)
at io.reactivex.internal.operators.completable.CompletableOnErrorComplete.subscribeActual(CompletableOnErrorComplete.java:35)
at io.reactivex.Completable.subscribe(Completable.java:2309)
at io.reactivex.internal.operators.completable.CompletableMerge$CompletableMergeSubscriber.onNext(CompletableMerge.java:99)
at io.reactivex.internal.operators.completable.CompletableMerge$CompletableMergeSubscriber.onNext(CompletableMerge.java:44)
at io.reactivex.internal.operators.flowable.FlowableFromIterable$IteratorSubscription.slowPath(FlowableFromIterable.java:236)
at io.reactivex.internal.operators.flowable.FlowableFromIterable$BaseRangeSubscription.request(FlowableFromIterable.java:124)
at io.reactivex.internal.operators.completable.CompletableMerge$CompletableMergeSubscriber.innerComplete(CompletableMerge.java:176)
at io.reactivex.internal.operators.completable.CompletableMerge$CompletableMergeSubscriber$MergeInnerObserver.onComplete(CompletableMerge.java:198)
at io.reactivex.internal.operators.completable.CompletableOnErrorComplete$OnError.onComplete(CompletableOnErrorComplete.java:48)
at io.reactivex.internal.operators.completable.CompletableAndThenCompletable$NextObserver.onComplete(CompletableAndThenCompletable.java:99)
at io.reactivex.internal.operators.completable.CompletableFromRunnable.subscribeActual(CompletableFromRunnable.java:47)
at io.reactivex.Completable.subscribe(Completable.java:2309)
at io.reactivex.internal.operators.completable.CompletableAndThenCompletable$SourceObserver.onComplete(CompletableAndThenCompletable.java:67)
at io.reactivex.internal.operators.completable.CompletableAndThenCompletable$NextObserver.onComplete(CompletableAndThenCompletable.java:99)
at io.reactivex.internal.operators.completable.CompletablePeek$CompletableObserverImplementation.onComplete(CompletablePeek.java:115)
at io.reactivex.internal.operators.completable.CompletablePeek$CompletableObserverImplementation.onComplete(CompletablePeek.java:115)
at io.reactivex.internal.operators.completable.CompletableMergeIterable$MergeCom


 
lliang2 Atlassian Team Jan 20, 2022

Yeah, this error is because there is a process created by previous step and doesn't get killed properly. Maybe there is an edge case here that we didn't cover.

 

@Bob Swift _Appfire_ do you mind to briefly describe what was the logic for previous step? 

Or you can submit a support case in here:
https://getsupport.atlassian.com/projects/BBS/welcome-guide
And let our support team know you are from window runner EAP. That way, our dev team can get permission to view your repo and hopefully can figure out what is going on.

Cheer

Leo Liang

It is failing or hanging on the first step. For the failing, it is failing before the first step with the error message and nothing log in the pipeline. I am thinking it is something to do with some previous run. I will consider doing the support report but concerned about security. Is it possible for you to have more extensive logging on the cleanup process (pre/post) like what file is the attempt being tried on? That might give us more of a clue.
Oh, the file name is in the error message in pipelines, but not in the runner log. Let me do some more experimenting.

I opened this support case as requested: BBS-179455

@lliang2 could you connect me up with a Bitbucket product manager to have a general discussion about requirements related to our migration from Bamboo and Azure/AWS (windows/mac) to pipelines?

lliang2 Atlassian Team Jan 27, 2022

Hey @Bob Swift _Appfire_ 

Thanks for submitting the support case, I will check it with our team.

In the meantime, I will let our PM know for sure. Will keep you updated.

Cheers

Leo Liang

Hi @Bob Swift _Appfire_,

Thanks for trying out the Windows self-hosted runner. Please use this link to book a meeting where we can discuss your requirements. Looking forward to the meeting.

Meeting link: https://calendly.com/justints/bitbucket-cloud-user-interview?month=2022-01

 

Thanks,

Justin Thomas

Product Manager, Bitbucket

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you