Search code examples
dockergitlabbufferoverflowupgrade

GitLab in docker: *** buffer overflow detected ***: terminated xargs: tail: terminated by signal 6


I have problem when upgrading from 13.8.8 to 13.9.7 (ce version in docker), logs are crashing like that:

...
...
==> /var/log/gitlab/gitlab-rails/api_json.log.1-2022030300.backup <==

==> /var/log/gitlab/gitlab-rails/exceptions_json.log.1-2022042000.backup <==

==> /var/log/gitlab/gitlab-rails/exceptions_json.log.1-2021110700.backup <==
    
==> /var/log/gitlab/gitlab-rails/production_json.log.1-2021121100.backup <==
*** buffer overflow detected ***: terminated
xargs: tail: terminated by signal 6

Then I successively upgraded to 15.0.2-ce but the problem with the logs persisted. I followed the upgrade plan, waited for the end of all migrations, did a gitlab-ctl reconfigure, but unfortunately nothing helped.

gitlab-ctl status
run: gitaly: (pid 11302) 411s; run: log: (pid 321) 2106s
run: gitlab-kas: (pid 11324) 411s; run: log: (pid 523) 2094s
run: gitlab-workhorse: (pid 11355) 411s; run: log: (pid 907) 2048s
run: logrotate: (pid 11381) 410s; run: log: (pid 273) 2119s
run: nginx: (pid 11387) 410s; run: log: (pid 994) 2042s
run: postgresql: (pid 11421) 409s; run: log: (pid 372) 2101s
run: puma: (pid 11434) 408s; run: log: (pid 781) 2060s
run: redis: (pid 11441) 408s; run: log: (pid 290) 2113s
run: sidekiq: (pid 11526) 403s; run: log: (pid 824) 2054s
run: sshd: (pid 11532) 403s; run: log: (pid 30) 2132s

Solution

  • Okay, that works for me:

    docker exec -it gitlab bash -c "rm -r /var/log/gitlab/*"
    

    and then restart gitlab container