Bitbucket Server git bare repositories contains many core files
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
Sometimes you might notice some big core.<random-number> files inside some repositories in your Bitbucket server. This will cause the size increase of the repositories in the server side.
Environment
Bitbucket Server Version 6.10+, hosted in a Linux environment.
Diagnosis
You can see files like core.19627,core.14915 etc., if you could run the below command in the repository location. The numbers in the filename may differ.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ls -altrh /data/bitbucket/shared-home/data/repositories/3838
total 3.7G
drwxr-x--- 4 bitbucket bitbucket 4.0K May 22 2018 hooks
-rw-r----- 1 bitbucket bitbucket 23 May 22 2018 HEAD
-rw-r----- 1 bitbucket bitbucket 548 May 22 2018 config
-rw-r----- 1 bitbucket bitbucket 280 May 22 2018 repository-config
drwxr-x--- 3 bitbucket bitbucket 4.0K May 22 2018 logs
drwxr-x--- 3 bitbucket bitbucket 4.0K May 22 2018 stash-refs
drwxr-x--- 6 bitbucket bitbucket 4.0K May 22 2018 refs
-rw-r----- 1 bitbucket bitbucket 72 Sep 18 2018 gc.log
drwxr-x--- 2 bitbucket bitbucket 4.0K Sep 18 2018 info
-rw------- 1 bitbucket bitbucket 269M Feb 19 2020 core.19627
-rw------- 1 bitbucket bitbucket 301M Feb 3 2021 core.14915
-rw------- 1 bitbucket bitbucket 1.3G Aug 11 2021 core.24155
-rw------- 1 bitbucket bitbucket 1.2G Sep 1 2021 core.10588
-rw------- 1 bitbucket bitbucket 1.1G Jan 11 11:50 core.347
-rw-r----- 1 bitbucket bitbucket 86K Mar 14 13:02 packed-refs
drwxr-x--- 9 bitbucket bitbucket 4.0K Mar 14 13:02 .
drwx------ 13109 bitbucket bitbucket 992K Mar 14 13:12 ..
drwxr-x--- 260 bitbucket bitbucket 20K Mar 14 13:38 objects
drwxr-xr-x 2 bitbucket bitbucket 4.0K Mar 14 13:39 app-info
Cause
These are linux core files. To confirm run the following command on the host system:
1
sysctl kernel/core_pattern
The probable reason for the generation of these files would be some failed git clone processes.
Solution
We would suggest you to check with your linux system administrator to see why Linux is writing these core files. From the Bitbucket side there is no code part that writes Linux core files.
Since these are linux core files, they can be safely removed. But to be on a safer side, please make sure you have a backup of the filesystem before deleting these files.
You may be able to resolve this issue by putting a path in core_pattern like below. But it would be good if your admin can confirm that.
1
kernel.core_pattern = |/usr/share/apport/apport %p %s %c %d %P %E
Was this helpful?