Large push is duplicated every 16 minute in activity stream in what seems to be an infinite loop
Summary
When pushing a very large amount of commit (ex: pushing master linux kernel branch) on a gitlab repository:
- A new duplicated push message in the activity stream appears every 16 minutes in what seems to be an infinite loop
- on the server a sidekiq process eats continuously 100% of CPU (but RAM and disk I/O are OK)
- due to this bug the activity is unusable because it gets continuously polluted by these duplicated messages
Steps to reproduce
Initialy the bug was found on a gitlab-ee 9.3.0
instance (gitlab EE starter customer)
To clear any configuration dependency I've successfully reproduced the bug on a fresh gitlab-ce 9.4.0
instance: (that's why I report this bug in gitlab CE)
- I've created a debian jessie amd64 lxc instance on an amd64 debian jessie server
- I've installed omnibus gitlab-ce-9.4.0 on it with default configuration
To trigger the bug on this instance just push a big repo on an empty project:
- create an empty project (ex: 'root/linux')
- on a client machine clone the linux kernel master branch (ex:
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
) - push the master branch on the gitlab instance: (ex:
git push git@gitlab.exemple.com:root/linux.git master
)
UPDATE: I've successfully reproduced this bug on gitlab.com here: https://gitlab.com/steissier/linux-test/activity
What is the current bug behavior?
Push messages in the activity stream are continuously duplicated every 16 minutes, making the activity stream totally unusable due to this garbage activity
Relevant logs and/or screenshots
Screenshot of the bug bad behavior:
Sidekiq stalled process in htop:
Results of GitLab environment info
nothing relevant...
# gitlab-rake gitlab:env:info
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Redis Version: 3.2.5
Git Version: 2.13.0
Sidekiq Version:5.0.0
Go Version: unknown
GitLab information
Version: 9.4.0
Revision: 9bbe2ac
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://10.32.92.27
HTTP Clone URL: http://10.32.92.27/some-group/some-project.git
SSH Clone URL: git@10.32.92.27:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 5.3.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
nothing relevant...
# gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...
GitLab Shell version >= 5.3.1 ? ... OK (5.3.1)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:root, or git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
1/1 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet)
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Projects have namespace: ...
1/1 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.3.3)
Git version >= 2.7.3 ? ... yes (2.13.0)
Active users: ... 1
Checking GitLab ... Finished