CI Jobs defining an environment cause Unicorn to crash when viewing job output

Summary

Attempting to load project_name/-/jobs/id.json asynchronously (as happens when visiting the page for a job) when that particular job includes an environment key in its .gitlab-ci.yml file causes a Unicorn worker to crash.

Steps to reproduce

  1. Create a project that includes a GitLab CI deployment that uses the environment key. (This is our example)

! Removing the environment block from the configuration stops this error from happening.

environment:
  name: review/$CI_COMMIT_REF_SLUG
  url: https://org1.$CI_COMMIT_REF_SLUG.review.patientpack.substrakthealth.com
  on_stop: stop_review
  1. Attempt to view this job in the UI GET /-/jobs/45352.

  2. Note in the web inspector that the call to GET /-/jobs/45352.json fails with a 502 error.

  3. Note that in the unicorn logs, the following appears:

unicorn worker[2] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru: relocation error: /lib/x86_64-linux-gnu/libnss_dns.so.2: symbol __resolv_context_get, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
E, [2019-10-02T14:17:37.201529 #7438] ERROR -- : reaped #<Process::Status: pid 25299 exit 127> worker=2

What is the current bug behavior?

It is impossible to trigger the job or see its output if it was triggered.

What is the expected correct behavior?

The output should appear as normal once the job was triggered manually.

Relevant logs and/or screenshots

(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise.)

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)

Results of GitLab application Check

Expand for output related to the GitLab application check

System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknown

GitLab information Version: 12.3.3-ee Revision: 47e969b011f Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://git.substrakthealth.com HTTP Clone URL: https://git.substrakthealth.com/some-group/some-project.git SSH Clone URL: git@git.substrakthealth.com:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: saml

GitLab Shell Version: 10.0.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Assignee Loading
Time tracking Loading