Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why does System hold onto the .lock files in BitBucketHome when the service is restarted?

This BitBucket Server installation is on Windows Server 2016 and is running version 7.4.1 (previously 6.6.1 with the same issue). The problem is that the System process is holding onto the .lock files in BitBucketHome and BitBucketHome\shared and the lock is not released when the BitBucket service is restarted from the Services window. This causes BitBucket Server to encounter a fatal error upon starting since it cannot create those .lock files and obtain an exclusive lock on those directories. This causes BitBucket Server to think that another instance of BitBucket is running and maintaining that lock.

The worst part is that nothing I do will release the lock on these files and allow me to delete them so that BitBucket Server could start successfully. The only solution is to reboot which is not ideal since this is running on a server with multiple other applications on it.

To delete these files I've tried using LockHunter to unlock and delete to no avail. However it does allow me to queue the files for deletion on the next reboot which may be a necessary step.

I've used Process Explorer to try and delete the file handle that System is holding onto but each file says invalid handle when attempting to delete. I get the same error using the CLI commands with handle.exe from MS Sysinternals.

Has anyone encountered this issue and been able to resolve it? Is there a graceful way to stop the BitBucket server that will successfully remove the .lock files and prevent this from happening? 

1 answer

Same problem here, v 7.5.0

Also had this issue on the version we were on before 6.6.1 but I can't recall which version that was.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

266 views 2 10
Read article

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