[Bug 278106] www/gitlab-ce: puma fails to start when jail host restarts

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 01 Apr 2024 16:55:07 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278106

            Bug ID: 278106
           Summary: www/gitlab-ce: puma fails to start when jail host
                    restarts
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: mfechner@FreeBSD.org
          Reporter: johannes.kunde@gmail.com
          Assignee: mfechner@FreeBSD.org
             Flags: maintainer-feedback?(mfechner@FreeBSD.org)

I've a long lasting issue with my GitLab instance, which is installed isolated
in a Jail. It fails to start every time the host system is restarted as a
whole. Precisely, the web server puma fails to start in this case. This is what
a 'service gitlab status' looks like:

---
The GitLab web server is not running.
The GitLab Sidekiq job dispatcher with pid 20581 is running.
The GitLab Workhorse with pid 20572 is running.
Gitaly with pid 20571 is running.
---

I found no helpful output in the logs, so I tried to intercept the start-up
with truss(1). In /usr/local/www/gitlab-ce/bin/web I changed the 'spawn_puma'
function as follows:

---
spawn_puma()
{
  exec bundle exec truss -o /var/log/puma/truss.out puma --config
"${puma_config}" --environment "$RAILS_ENV" "$@"
}
---


The output shows that writing to the socket
"/usr/local/www/gitlab-ce/tmp/sockets/gitlab.socket" fails with "ERR#32 'Broken
pipe'". Detailed output below:

---
2669761
fstatat(AT_FDCWD,"/usr/local/www/gitlab-ce/tmp/sockets/gitlab.socket",0x820315b80,AT_SYMLINK_NOFOLLOW)
ERR#2 'No such file or directory'
2669762 sigprocmask(SIG_BLOCK,0x0,{ })                   = 0 (0x0)
2669763
fstatat(AT_FDCWD,"/usr/local/www/gitlab-ce/tmp/sockets/gitlab.socket",0x820315c90,0x0)
ERR#2 'No such file or directory'
2669764 umask(0x0)                                       = 18 (0x12)
2669765 sigprocmask(SIG_BLOCK,0x0,{ })                   = 0 (0x0)
2669766
fstatat(AT_FDCWD,"/usr/local/www/gitlab-ce/tmp/sockets/gitlab.socket",0x820315c90,0x0)
ERR#2 'No such file or directory'
2669767 socket(PF_LOCAL,SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK,0) = 7 (0x7)
2669768 fcntl(7,F_GETFD,)                                = 1 (0x1)
2669769 bind(7,{ AF_UNIX "/usr/local/www/gitlab-ce/tmp/sockets/gitlab.socket"
},106) = 0 (0x0)
2669770 listen(7,128)                                    = 0 (0x0)
2669771 listen(7,1024)                                   = 0 (0x0)
2669772 umask(0x12)                                      = 0 (0x0)
2669773 getpid()                                         = 20808 (0x5148)
2669774 getpid()                                         = 20808 (0x5148)
2669775 sigprocmask(SIG_BLOCK,0x0,{ })                   = 0 (0x0)
2669776 ppoll({ 1/POLLOUT },1,{ 1.000000000 },0x0)       = 1 (0x1)
2669777 sigprocmask(SIG_BLOCK,0x0,{ })                   = 0 (0x0)
2669778 write(1,"{"timestamp":"2024-04-01T16:23:2"...,138) ERR#32 'Broken pipe'
2669779 SIGNAL 13 (SIGPIPE) code=SI_KERNEL
2669780 sigprocmask(SIG_SETMASK,{ SIGPIPE },0x0)         = 0 (0x0)
2669781 sigreturn(0x820315140)                           EJUSTRETURN
2669782 getpid()                                         = 20808 (0x5148)
2669783 getpid()                                         = 20808 (0x5148)
2669784 sigprocmask(SIG_BLOCK,0x0,{ })                   = 0 (0x0)
2669785 ppoll({ 1/POLLOUT },1,{ 1.000000000 },0x0)       = 1 (0x1)
2669786 sigprocmask(SIG_BLOCK,0x0,{ })                   = 0 (0x0)
2669787 write(1,"{"timestamp":"2024-04-01T16:23:2"...,256) ERR#32 'Broken pipe'
---


I don't know what the best approach would be to get rid of this.
I'm happy to provide further input if required.

-- 
You are receiving this mail because:
You are the assignee for the bug.