Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #4088

Closed
Open
Created May 27, 2013 by Administrator@rootOwner

500 Error when create merge-request on 5.2

Created by: obe1line

Summary

Creating a merge-request causes a 500 error, and the diff tab shows no content.

Steps to reproduce

After upgrading from 5.1 to 5.2, create a merge-request with a large number of files.

Expected behaviour

Merge request is created and the diff tab shows the files changed.

Observed behaviour

Displays a 500 "Internal Server Error". Change the browser URL to go back to the main gitlab page (or close and reopen the main page). The merge request has been created and is listed, but clicking on the diff tab shows blank content (related to #4033 (closed) ?), and a refresh of the page shows the 500 error again.

Relevant Logs

Started GET "/project/project-v1/merge_requests/23/diffs?_=1369638391696" for  at 2013-05-27 17:06:16 +1000
Processing by MergeRequestsController#diffs as JS
  Parameters: {"_"=>"1369638391696", "project_id"=>"project/project-v1", "id"=>"23"}
Completed 500 Internal Server Error in 130ms

NoMethodError (undefined method `map' for nil:NilClass):
  app/models/merge_request.rb:228:in `load_diffs'
  app/models/merge_request.rb:110:in `diffs'
  app/controllers/merge_requests_controller.rb:33:in `diffs'

Looking at the merge-requests table in the production database shows a 9 byte entry (3 dashes, CRLF, 3 dots) for all failed merge requests:

+----+-----------------+------------------+---------------------------+ | id | title | length(st_diffs) | HEX(SUBSTR(st_diffs,1,9)) | +----+-----------------+------------------+---------------------------+ | 22 | test1 | 9 | 2D2D2D200A2E2E2E0A | | 23 | test2 | 9 | 2D2D2D200A2E2E2E0A |

Output of checks

$ bundle exec rake gitlab:check RAILS_ENV=production
Checking Environment ...
Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.4.0 ? ... OK (1.4.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ... 
Project / project-v1 ... ok
Project / project-v2 ... ok
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Checking Sidekiq ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
Projects have satellites? ... 
Platform / platform-v2 ... yes
Taipan / taipan-instrument ... yes
Taipan / taipan-trunk ... yes
Taipan / taipan-os ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.10)
Checking GitLab ... Finished

Regards, Chris

Assignee
Assign to
Time tracking