500 error when trying to compare certain branches, view certain merge request diffs, view certain repository folders
Summary
A 500 error page is displayed for a couple of our projects when you attempt the following:
- when trying to compare certain branches,
- when viewing certain merge request diffs,
- when viewing certain repository folders in the Web UI
This error is occuring following out upgrade from 9.1.X to 9.2.6, (upgrade also included the postgres upgrade).
Steps to reproduce
(How one can reproduce the issue - this is very important)
-
https://gitlab.domain.local/GROUP/PROJECT/compare?from=develop&to=99-re-factor-logging Within project > Repository > compare > select an affected branch and 'develop' > compare = 500 error page note that the reverse compare displays "There isn't anything to compare. You'll need to use different branch names to get a valid comparison."
-
Project > Merge Requests > Select Merge Request > Changes = "An Error Occurred when fetching this tab"
-
Project > Repository > Files > Select affected branch > Browse to folder = 500 error page
Example Project
None
What is the current bug behavior?
Error 500 page, or "an error occurred when fetching this tab" message is displayed when navigating to certain areas iin the Web UI. Not all projects are affected with this behaviour following the upgrade.
What is the expected correct behavior?
correct information displayed (1,2), showing code differences or folder contents (3)
Relevant logs and/or screenshots
/var/log/gitlab/gitlab-rails/production.log
Completed 500 Internal Server Error in 1972ms (ActiveRecord: 809.3ms)
ActionView::Template::Error (No route matches {:action=>"show", :controller=>"projects", :from=>"develop", :id=>"Reventon-Common.git ", :namespace_id=>"GROUP", :project_id=>"PROJECT", :to=>"99-re-factor-logging"} missing required keys: [:id]):
4: = icon('archive fw')
5:
6: %strong.file-title-name
7: = submodule_link(blob, diff_commit.id, project.repository)
8:
9: = copy_file_path_button(blob.path)
10: - else
app/helpers/submodule_helper.rb:75:in `relative_self_links'
app/helpers/submodule_helper.rb:19:in `submodule_links'
app/helpers/diff_helper.rb:91:in `submodule_link'
app/views/projects/diffs/_file_header.html.haml:7:in `_app_views_projects_diffs__file_header_html_haml__1236157510945098686_70010418626200'
app/views/projects/diffs/_file.html.haml:5:in `_app_views_projects_diffs__file_html_haml___3094794307207441638_70010523526980'
app/views/projects/diffs/_diffs.html.haml:33:in `block in _app_views_projects_diffs__diffs_html_haml__3829939683585932644_70010522882740'
lib/gitlab/git/diff_collection.rb:29:in `each'
lib/gitlab/git/diff_collection.rb:29:in `each'
app/views/projects/diffs/_diffs.html.haml:26:in `each_with_index'
app/views/projects/diffs/_diffs.html.haml:26:in `_app_views_projects_diffs__diffs_html_haml__3829939683585932644_70010522882740'
app/views/projects/compare/show.html.haml:11:in `_app_views_projects_compare_show_html_haml___764286148690271898_70010417888800'
app/controllers/application_controller.rb:281:in `set_locale'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/request_context.rb:18:in `call'
/var/log/gitlab/gitlab-workhorse/current
2017-06-26_21:40:23.39618 2017/06/27 09:40:23 ErrorPage: serving predefined error page: 500 2017-06-26_21:40:23.39642 gitlab.trunet.local @ - - [2017-06-27 09:40:21.541717227 +1200 NZST] "GET /PROJECT/PROJECT/compare/develop...99-re-factor-logging HTTP/1.1" 500 2911 "https://gitlab.domain.local/GROUP/PROJECT/compare?from=develop&to=99-re-factor-logging" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0" 1.854580
Output of checks
This bug happens on our internal gitlab omnibus installation
Results of GitLab environment info
Expand for output related to GitLab environment info
gitlab-rake gitlab:env:infoSystem information System: OracleServer 6.9 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.11.1 Sidekiq Version:5.0.0
GitLab information Version: 9.2.6 Revision: 332a71d Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://gitlab.domain.local HTTP Clone URL: https://gitlab.domain.local/some-group/some-project.git SSH Clone URL: git@gitlab.trunet.local:some-group/some-project.git Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 5.0.4 Repository storage paths:
- default: /u01/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab Shell ...
GitLab Shell version >= 5.0.4 ? ... OK (5.0.4) 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: ... 3/1 ... ok 4/2 ... ok 37/3 ... ok 6/4 ... ok 9/5 ... ok 9/6 ... ok 9/7 ... ok 9/8 ... ok 9/9 ... ok 9/10 ... ok 9/11 ... ok 9/12 ... ok 9/13 ... ok 9/14 ... ok 9/15 ... ok 9/16 ... ok 5/17 ... ok 5/18 ... ok 5/19 ... ok 5/20 ... ok 5/21 ... ok 5/22 ... ok 3/23 ... repository is empty 3/24 ... repository is empty 20/25 ... ok 20/26 ... ok 20/27 ... ok 20/28 ... ok 20/29 ... ok 20/30 ... ok 37/31 ... ok 37/32 ... ok 20/33 ... ok 20/34 ... ok 20/35 ... ok 20/36 ... repository is empty 20/37 ... ok 20/38 ... ok 20/39 ... ok 20/40 ... ok 20/41 ... ok 20/42 ... ok 20/43 ... ok 20/44 ... ok 20/45 ... ok 20/46 ... ok 20/47 ... ok 20/48 ... ok 20/49 ... ok 20/50 ... ok 20/51 ... ok 20/52 ... ok 20/53 ... ok 20/54 ... ok 20/55 ... ok 20/56 ... ok 20/57 ... repository is empty 28/58 ... ok 28/59 ... ok 28/60 ... ok 28/61 ... ok 28/62 ... ok 30/64 ... ok 30/65 ... ok 30/66 ... ok 30/67 ... ok 30/68 ... ok 30/69 ... ok 30/70 ... ok 30/71 ... ok 30/72 ... ok 30/73 ... ok 30/74 ... ok 30/75 ... ok 5/76 ... ok 30/77 ... ok 30/78 ... ok 30/79 ... ok 30/80 ... ok 30/81 ... ok 30/82 ... ok 5/83 ... ok 5/84 ... ok 4/85 ... ok 5/86 ... ok 5/87 ... ok 37/88 ... ok 5/89 ... ok 37/90 ... ok 5/91 ... ok 5/92 ... ok 9/94 ... ok 39/95 ... ok 41/98 ... ok 8/99 ... ok 8/100 ... ok 8/101 ... ok 8/102 ... ok 8/103 ... ok 8/104 ... ok 8/105 ... ok 8/106 ... ok 8/107 ... ok 3/108 ... ok 30/110 ... ok 31/112 ... ok 5/113 ... ok 20/114 ... ok 32/115 ... ok 32/116 ... ok 32/117 ... repository is empty 32/118 ... ok 32/119 ... ok 32/120 ... ok 32/121 ... ok 32/122 ... ok 32/123 ... ok 39/124 ... repository is empty 8/125 ... ok 9/126 ... ok 28/127 ... repository is empty 9/128 ... ok 9/129 ... ok 9/130 ... ok 9/131 ... repository is empty 8/133 ... ok 8/134 ... ok 8/135 ... ok 8/136 ... ok 8/137 ... ok 8/138 ... ok 8/139 ... ok 8/140 ... ok 30/141 ... ok 30/142 ... ok 30/143 ... ok 30/144 ... ok 30/145 ... ok 30/146 ... ok 30/147 ... ok 30/149 ... ok 30/150 ... ok 32/151 ... ok 30/152 ... ok 53/153 ... repository is empty 53/155 ... ok 55/156 ... ok 55/157 ... repository is empty 5/158 ... ok 31/159 ... ok 11/160 ... ok 44/161 ... repository is empty 20/162 ... ok 3/163 ... ok 19/164 ... ok 9/165 ... ok 9/166 ... ok 9/167 ... ok 9/168 ... ok 32/169 ... ok 32/170 ... repository is empty 3/171 ... repository is empty 17/172 ... ok 32/173 ... ok 14/174 ... repository is empty 14/175 ... repository is empty 30/176 ... ok 9/177 ... ok 9/178 ... ok 55/179 ... ok 32/180 ... ok 55/181 ... ok 53/182 ... ok 30/183 ... ok 30/184 ... ok 30/185 ... ok 14/186 ... repository is empty 30/187 ... ok 30/188 ... repository is empty 30/189 ... repository is empty 44/190 ... repository is empty 9/192 ... ok 37/193 ... ok 20/194 ... repository is empty 20/195 ... ok 30/196 ... ok 65/197 ... ok 55/198 ... ok 67/199 ... ok 67/200 ... ok 67/201 ... ok 67/202 ... ok 51/203 ... ok 20/204 ... ok 32/205 ... ok 32/206 ... ok 32/207 ... ok 51/208 ... ok 68/209 ... ok 20/210 ... ok 20/211 ... repository is empty 51/212 ... ok 30/213 ... repository is empty 30/214 ... ok 51/215 ... ok 65/216 ... ok 30/217 ... ok 30/218 ... ok 4/219 ... repository is empty 40/220 ... ok 40/221 ... ok 3/222 ... repository is empty 32/223 ... ok 55/224 ... ok 55/225 ... repository is empty 75/226 ... repository is empty 76/227 ... ok 76/228 ... ok 9/230 ... ok 30/231 ... ok 30/232 ... ok 30/233 ... ok 30/234 ... ok 30/235 ... ok 30/236 ... ok 65/237 ... ok 30/238 ... ok 74/240 ... repository is empty 6/241 ... ok 82/244 ... ok 82/245 ... ok 82/246 ... ok 82/247 ... 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 ...
Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results)
<REDACTED>
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config outdated? ... no Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory setup correctly? ... yes 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: ... 3/1 ... yes 4/2 ... yes 37/3 ... yes 6/4 ... yes 9/5 ... yes 9/6 ... yes 9/7 ... yes 9/8 ... yes 9/9 ... yes 9/10 ... yes 9/11 ... yes 9/12 ... yes 9/13 ... yes 9/14 ... yes 9/15 ... yes 9/16 ... yes 5/17 ... yes 5/18 ... yes 5/19 ... yes 5/20 ... yes 5/21 ... yes 5/22 ... yes 3/23 ... yes 3/24 ... yes 20/25 ... yes 20/26 ... yes 20/27 ... yes 20/28 ... yes 20/29 ... yes 20/30 ... yes 37/31 ... yes 37/32 ... yes 20/33 ... yes 20/34 ... yes 20/35 ... yes 20/36 ... yes 20/37 ... yes 20/38 ... yes 20/39 ... yes 20/40 ... yes 20/41 ... yes 20/42 ... yes 20/43 ... yes 20/44 ... yes 20/45 ... yes 20/46 ... yes 20/47 ... yes 20/48 ... yes 20/49 ... yes 20/50 ... yes 20/51 ... yes 20/52 ... yes 20/53 ... yes 20/54 ... yes 20/55 ... yes 20/56 ... yes 20/57 ... yes 28/58 ... yes 28/59 ... yes 28/60 ... yes 28/61 ... yes 28/62 ... yes 30/64 ... yes 30/65 ... yes 30/66 ... yes 30/67 ... yes 30/68 ... yes 30/69 ... yes 30/70 ... yes 30/71 ... yes 30/72 ... yes 30/73 ... yes 30/74 ... yes 30/75 ... yes 5/76 ... yes 30/77 ... yes 30/78 ... yes 30/79 ... yes 30/80 ... yes 30/81 ... yes 30/82 ... yes 5/83 ... yes 5/84 ... yes 4/85 ... yes 5/86 ... yes 5/87 ... yes 37/88 ... yes 5/89 ... yes 37/90 ... yes 5/91 ... yes 5/92 ... yes 9/94 ... yes 39/95 ... yes 41/98 ... yes 8/99 ... yes 8/100 ... yes 8/101 ... yes 8/102 ... yes 8/103 ... yes 8/104 ... yes 8/105 ... yes 8/106 ... yes 8/107 ... yes 3/108 ... yes 30/110 ... yes 31/112 ... yes 5/113 ... yes 20/114 ... yes 32/115 ... yes 32/116 ... yes 32/117 ... yes 32/118 ... yes 32/119 ... yes 32/120 ... yes 32/121 ... yes 32/122 ... yes 32/123 ... yes 39/124 ... yes 8/125 ... yes 9/126 ... yes 28/127 ... yes 9/128 ... yes 9/129 ... yes 9/130 ... yes 9/131 ... yes 8/133 ... yes 8/134 ... yes 8/135 ... yes 8/136 ... yes 8/137 ... yes 8/138 ... yes 8/139 ... yes 8/140 ... yes 30/141 ... yes 30/142 ... yes 30/143 ... yes 30/144 ... yes 30/145 ... yes 30/146 ... yes 30/147 ... yes 30/149 ... yes 30/150 ... yes 32/151 ... yes 30/152 ... yes 53/153 ... yes 53/155 ... yes 55/156 ... yes 55/157 ... yes 5/158 ... yes 31/159 ... yes 11/160 ... yes 44/161 ... yes 20/162 ... yes 3/163 ... yes 19/164 ... yes 9/165 ... yes 9/166 ... yes 9/167 ... yes 9/168 ... yes 32/169 ... yes 32/170 ... yes 3/171 ... yes 17/172 ... yes 32/173 ... yes 14/174 ... yes 14/175 ... yes 30/176 ... yes 9/177 ... yes 9/178 ... yes 55/179 ... yes 32/180 ... yes 55/181 ... yes 53/182 ... yes 30/183 ... yes 30/184 ... yes 30/185 ... yes 14/186 ... yes 30/187 ... yes 30/188 ... yes 30/189 ... yes 44/190 ... yes 9/192 ... yes 37/193 ... yes 20/194 ... yes 20/195 ... yes 30/196 ... yes 65/197 ... yes 55/198 ... yes 67/199 ... yes 67/200 ... yes 67/201 ... yes 67/202 ... yes 51/203 ... yes 20/204 ... yes 32/205 ... yes 32/206 ... yes 32/207 ... yes 51/208 ... yes 68/209 ... yes 20/210 ... yes 20/211 ... yes 51/212 ... yes 30/213 ... yes 30/214 ... yes 51/215 ... yes 65/216 ... yes 30/217 ... yes 30/218 ... yes 4/219 ... yes 40/220 ... yes 40/221 ... yes 3/222 ... yes 32/223 ... yes 55/224 ... yes 55/225 ... yes 75/226 ... yes 76/227 ... yes 76/228 ... yes 9/230 ... yes 30/231 ... yes 30/232 ... yes 30/233 ... yes 30/234 ... yes 30/235 ... yes 30/236 ... yes 65/237 ... yes 30/238 ... yes 74/240 ... yes 6/241 ... yes 82/244 ... yes 82/245 ... yes 82/246 ... yes 82/247 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.1.0 ? ... yes (2.3.3) Your git bin path is "/opt/gitlab/embedded/bin/git" Git version >= 2.7.3 ? ... yes (2.11.1) Active users: 40
Checking GitLab ... Finished