Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Christopher Widak August 31, 2020

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

0 votes
Ilkka Maasola August 31, 2020

Same problem here, v 7.5.0

Christopher Widak September 2, 2020

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
TAGS
AUG Leaders

Atlassian Community Events