500 Error when viewing MR that has LFS image with comments.
Summary
When a comment is added within a MR in the diff view on a image stored in LFS, GitLab will show 500 error screen when viewing the MR in the future.
Steps to reproduce
- Configure git repo with LFS enabled.
- Checkout a new branch.
- Add a image to the branch, track with LFS.
- Commit & Push the branch to the remote.
- Create a MR from the branch.
- View the MR, select the "Changes" tab.
- Add a comment to the image being uploaded.
- Save the comment.
- Refresh the page. <<< 500 Error.
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(I was unable to reproduce using a example project on GitLab.com. I think this is because I'm on free tier on GL.com. We are using Enterprise Edition, self hosted, and can reproduce in our environment.)
What is the current bug behavior?
When you try to view the MR, the page fails to load, and shows a 500 error status. (Internal error)
What is the expected correct behavior?
The MR can be viewed without seeing the error page.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 14.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.17.1 Sidekiq Version:5.1.3 Go Version: unknown
GitLab information Version: 11.0.3-ee Revision: f25aa33 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.6 URL: https://gitlab.eturi.com HTTP Clone URL: https://gitlab.eturi.com/some-group/some-project.git SSH Clone URL: git@gitlab.eturi.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: google_oauth2
GitLab Shell Version: 7.1.4 Repository storage paths:
- default: /gitlab-data/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
Checking GitLab Shell ...
GitLab Shell version >= 7.1.4 ? ... OK (7.1.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 3/2 ... ok 3/3 ... ok 5/4 ... ok 5/5 ... ok 3/6 ... ok 3/7 ... ok 3/8 ... ok 4/9 ... ok 8/10 ... ok 3/13 ... ok 8/14 ... ok 8/15 ... ok 8/16 ... ok 6/17 ... ok 9/18 ... ok 8/19 ... ok 10/20 ... ok 10/21 ... ok 10/22 ... ok 10/23 ... ok 10/24 ... ok 10/25 ... ok 10/26 ... ok 10/27 ... ok 10/28 ... ok 10/29 ... ok 10/30 ... ok 10/31 ... ok 10/32 ... ok 10/33 ... ok 10/34 ... ok 10/35 ... ok 10/36 ... ok 10/37 ... ok 10/38 ... ok 10/39 ... ok 10/40 ... ok 10/41 ... ok 10/42 ... ok 10/43 ... ok 10/44 ... ok 10/45 ... ok 10/46 ... ok 10/47 ... ok 10/48 ... ok 10/49 ... ok 10/50 ... ok 2/51 ... ok 9/52 ... ok 9/53 ... ok 56/54 ... ok 9/55 ... ok 9/56 ... ok 9/57 ... ok 9/58 ... ok 9/59 ... ok 9/60 ... ok 9/61 ... ok 29/62 ... ok 29/63 ... ok 56/64 ... ok 10/65 ... ok 29/66 ... ok 29/67 ... ok 9/68 ... ok 4/69 ... ok 10/70 ... ok 29/71 ... ok 29/72 ... ok 10/73 ... ok 29/74 ... ok 10/75 ... ok 10/76 ... ok 9/77 ... ok 9/78 ... ok 10/79 ... ok 4/80 ... ok 10/81 ... ok 10/82 ... ok 10/83 ... ok 9/84 ... ok 10/85 ... ok 9/87 ... ok 4/88 ... ok 55/89 ... ok 9/90 ... ok 6/91 ... ok 6/92 ... ok 6/93 ... ok 6/95 ... ok 38/96 ... ok 10/98 ... ok 38/99 ... ok 38/100 ... ok 38/101 ... ok 6/102 ... ok 6/103 ... ok 4/104 ... ok 41/105 ... ok 41/106 ... ok 44/107 ... ok 56/108 ... ok 13/109 ... ok 8/110 ... ok 5/112 ... ok 10/113 ... ok 2/114 ... ok 8/116 ... ok 38/117 ... ok 55/118 ... ok 55/119 ... ok 56/120 ... ok 29/121 ... ok 4/123 ... ok 11/124 ... ok 11/125 ... ok 38/126 ... repository is empty 9/127 ... ok 3/128 ... ok 5/130 ... ok 5/131 ... ok 65/132 ... ok 65/133 ... ok 65/134 ... ok 4/135 ... ok 5/136 ... ok 65/137 ... ok 3/138 ... ok 8/139 ... ok 4/140 ... ok 3/142 ... ok 9/143 ... ok 9/144 ... ok 8/145 ... ok 11/146 ... ok 5/147 ... ok 56/149 ... ok 9/150 ... ok 56/154 ... ok 3/155 ... ok 70/156 ... ok 85/157 ... ok 76/158 ... ok 2/159 ... ok 11/161 ... ok 9/162 ... ok 38/163 ... ok 5/164 ... ok 65/165 ... ok 41/166 ... ok 3/167 ... ok 8/168 ... ok 8/169 ... ok 73/170 ... ok 11/171 ... ok 8/172 ... ok 8/173 ... ok 9/174 ... ok 38/179 ... ok 3/180 ... ok 11/181 ... repository is empty 73/182 ... ok 8/183 ... ok 5/184 ... ok 85/185 ... ok 62/186 ... ok 11/187 ... ok 11/188 ... ok 3/189 ... ok 8/190 ... ok 73/191 ... ok 11/192 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /gitlab-data/home/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml 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? ... 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 3/2 ... yes 3/3 ... yes 5/4 ... yes 5/5 ... yes 3/6 ... yes 3/7 ... yes 3/8 ... yes 4/9 ... yes 8/10 ... yes 3/13 ... yes 8/14 ... yes 8/15 ... yes 8/16 ... yes 6/17 ... yes 9/18 ... yes 8/19 ... yes 10/20 ... yes 10/21 ... yes 10/22 ... yes 10/23 ... yes 10/24 ... yes 10/25 ... yes 10/26 ... yes 10/27 ... yes 10/28 ... yes 10/29 ... yes 10/30 ... yes 10/31 ... yes 10/32 ... yes 10/33 ... yes 10/34 ... yes 10/35 ... yes 10/36 ... yes 10/37 ... yes 10/38 ... yes 10/39 ... yes 10/40 ... yes 10/41 ... yes 10/42 ... yes 10/43 ... yes 10/44 ... yes 10/45 ... yes 10/46 ... yes 10/47 ... yes 10/48 ... yes 10/49 ... yes 10/50 ... yes 2/51 ... yes 9/52 ... yes 9/53 ... yes 56/54 ... yes 9/55 ... yes 9/56 ... yes 9/57 ... yes 9/58 ... yes 9/59 ... yes 9/60 ... yes 9/61 ... yes 29/62 ... yes 29/63 ... yes 56/64 ... yes 10/65 ... yes 29/66 ... yes 29/67 ... yes 9/68 ... yes 4/69 ... yes 10/70 ... yes 29/71 ... yes 29/72 ... yes 10/73 ... yes 29/74 ... yes 10/75 ... yes 10/76 ... yes 9/77 ... yes 9/78 ... yes 10/79 ... yes 4/80 ... yes 10/81 ... yes 10/82 ... yes 10/83 ... yes 9/84 ... yes 10/85 ... yes 9/87 ... yes 4/88 ... yes 55/89 ... yes 9/90 ... yes 6/91 ... yes 6/92 ... yes 6/93 ... yes 6/95 ... yes 38/96 ... yes 10/98 ... yes 38/99 ... yes 38/100 ... yes 38/101 ... yes 6/102 ... yes 6/103 ... yes 4/104 ... yes 41/105 ... yes 41/106 ... yes 44/107 ... yes 56/108 ... yes 13/109 ... yes 8/110 ... yes 5/112 ... yes 10/113 ... yes 2/114 ... yes 8/116 ... yes 38/117 ... yes 55/118 ... yes 55/119 ... yes 56/120 ... yes 29/121 ... yes 4/123 ... yes 11/124 ... yes 11/125 ... yes 38/126 ... yes 9/127 ... yes 3/128 ... yes 5/130 ... yes 5/131 ... yes 65/132 ... yes 65/133 ... yes 65/134 ... yes 4/135 ... yes 5/136 ... yes 65/137 ... yes 3/138 ... yes 8/139 ... yes 4/140 ... yes 3/142 ... yes 9/143 ... yes 9/144 ... yes 8/145 ... yes 11/146 ... yes 5/147 ... yes 56/149 ... yes 9/150 ... yes 56/154 ... yes 3/155 ... yes 70/156 ... yes 85/157 ... yes 76/158 ... yes 2/159 ... yes 11/161 ... yes 9/162 ... yes 38/163 ... yes 5/164 ... yes 65/165 ... yes 41/166 ... yes 3/167 ... yes 8/168 ... yes 8/169 ... yes 73/170 ... yes 11/171 ... yes 8/172 ... yes 8/173 ... yes 9/174 ... yes 38/179 ... yes 3/180 ... yes 11/181 ... yes 73/182 ... yes 8/183 ... yes 5/184 ... yes 85/185 ... yes 62/186 ... yes 11/187 ... yes 11/188 ... yes 3/189 ... yes 8/190 ... yes 73/191 ... yes 11/192 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 22 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished
~bug merge requests