Error: MIDX does not contain the BTMP chunk

:hugs: Please help fill in this template with all the details to help others help you more efficiently. Use formatting blocks for code, config, logs and ensure to remove sensitive data.

Problem to solve

Describe your question in as much detail as possible:

Hello, I’ve upgraded my self-managed version of gitlab-ce to 16.9.1 on FreeBSD. The website is working good, but I’m getting these type of error when cloning some of the repository we host for our company:

  • What are you seeing, and how does that differ from what you expect to see?

UPDATE 20240311_01:

  • either SSH or HTTPS protocols
  • local git version : 2.44.0
$ git clone --bare git@gitlab.example.com:ourgroup/ourbigproject.git                                                                                                                                                                                                                             Cloning into bare repository 'ourbigproject.git'...
remote: error: MIDX does not contain the BTMP chunk
remote: warning: unable to load pack: 'pack-2157e175615ab995a499600661f0c129b596f819.idx', disabling pack-reuse
remote: Enumerating objects: 131684, done.
remote: Counting objects: 100% (131684/131684), done.
remote: Compressing objects: 100% (31797/31797), done.
remote: Total 131684 (delta 99210), reused 131575 (delta 99136), pack-reused 0 (from 0)
Receiving objects: 100% (131684/131684), 98.21 MiB | 30.51 MiB/s, done.
Resolving deltas: 100% (99210/99210), done.

Steps to reproduce

Which troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?

I haven’t got any steps to reproduce, I just know I’m getting this type of errors on most of our already existing projects.
I’ve tried to create a new project and to clone it, and the error doesn’t show on this new project.

I’ve also searched through google for this specific error message and I could not find anything relevent.

Configuration

Provide screenshots from the GitLab UI showing relevant configuration, if applicable.
On self-managed instances, add the relevant configuration settings or changes.

I don’t think I’ve set anything really special settings, it’s a pretty standard installation. I guess I can link here the link to the installation documentation I’ve used to install our gitlab-ce, although I can’t remember what was the 1st version installed, this install documentation resume it well:

Versions

Please select whether options apply, and add the version information.

Versions

# su -l git -c "cd /usr/local/www/gitlab-ce && rake gitlab:env:info RAILS_ENV=production"

System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   3.2.3
Gem Version:    3.4.20
Bundler Version:2.5.6
Rake Version:   13.1.0
Redis Version:  7.2.4
Sidekiq Version:7.1.6
Go Version:     go1.20.14 freebsd/amd64

GitLab information
Version:        16.9.1
Revision:       Unknown
Directory:      /usr/local/www/gitlab-ce
DB Adapter:     PostgreSQL
DB Version:     15.6
URL:            https://gitlab.example.com
HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git
SSH Clone URL:  git@gitlab.example.com:some-group/some-project.git
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version:        14.33.0
Repository storages:
- default:      unix:/usr/local/www/gitlab-ce/tmp/sockets/private/gitaly.socket
GitLab Shell path:              /usr/local/share/gitlab-shell

Gitaly
- default Address:      unix:/usr/local/www/gitlab-ce/tmp/sockets/private/gitaly.socket
- default Version:      16.9.1
- default Git Version:  2.44.0

UPDATE 20240311_01:

  • I’ve tried git fsck --no-dangling on Gitlab, locally, and on the host, but it doesn’t seem to show anything.
  • I’ve also tried cloning locally on the Gitlab host any project by their relative paths, and the error does not show, only when using either SSH or HTTPS protocols.

I got this error message when cloning, too
For me, running the “Housekeeping” of the project manually fixed it:

Housekeeping, to my knowledge, runs a git gc among other things.
git gc may re-pack packs more efficiently, basicly recreating them if needed, which can fix problems.

1 Like

Much obliged for help!