#3305 Pagure (git commit 37d153c4) crashes internally when processing a `git push --mirror` of a repo
Closed: Fixed 5 years ago Opened 5 years ago by ngompa.

When using Pagure git master (commit 37d153c4), I get crashes when trying to push code using git push --mirror.

The output from git push --mirror:

ngompa@opensuse-lp150-skuld-vm:~/Sources/origin-multidistro> git push --mirror ssh://git@localhost.localdomain/rpms/origin.git
Total 0 (delta 0), reused 0 (delta 0)
remote: Sending to redis to send commit notification emails
remote: * Publishing information for 34 commits
remote: 
remote: Create a pull-request for refs/remotes/origin/HEAD
remote:    http://localhost.localdomain/rpms/origin/diff/None..refs/remotes/origin/HEAD
remote: 
remote: ERROR: [u'git', u'rev-list', u'113f4ddf54bd1c9c43dd4042ddfde74850a30b95', u'^HEAD'] =-- 128
remote: 
remote: fatal: bad revision '^HEAD'
remote: 
remote: Sending to redis to send commit notification emails
remote: ERROR: [u'git', u'rev-list', u'15fc699171968b1a53bfbdf403db315132e60bab', u'^HEAD'] =-- 128
remote: 
remote: fatal: bad revision '^HEAD'
remote: 
remote: Sending to redis to send commit notification emails
To ssh://localhost.localdomain/rpms/origin.git
 * [new branch]      origin/HEAD -> origin/HEAD
 * [new branch]      origin/master -> origin/master
 * [new branch]      origin/multidistro -> origin/multidistro

The repo I did this with: https://gitlab.com/Conan_Kudo/origin-multidistro

The steps (assuming the target repo in the Pagure setup was created first):

  1. git clone --mirror https://gitlab.com/Conan_Kudo/origin-multidistro.git
  2. cd origin-multidistro.git
  3. git push --mirror ssh://git@localhost.localdomain/rpms/origin.git

After this, visiting the repo at http://localhost.localdomain/rpms/origin throws a HTTP 500 error every time, with those tracebacks in the apache2 error log.

The output from the apache2 error_log:

[Sun Jun 10 22:50:52.650795 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904] [2018-06-10 22:50:52,612] ERROR in app: Exception on /rpms/origin [GET]
[Sun Jun 10 22:50:52.650829 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904] Traceback (most recent call last):
[Sun Jun 10 22:50:52.650832 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
[Sun Jun 10 22:50:52.650835 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     response = self.full_dispatch_request()
[Sun Jun 10 22:50:52.650838 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
[Sun Jun 10 22:50:52.650841 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     rv = self.handle_user_exception(e)
[Sun Jun 10 22:50:52.650844 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
[Sun Jun 10 22:50:52.650846 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     reraise(exc_type, exc_value, tb)
[Sun Jun 10 22:50:52.650849 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
[Sun Jun 10 22:50:52.650851 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     rv = self.dispatch_request()
[Sun Jun 10 22:50:52.650854 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
[Sun Jun 10 22:50:52.650857 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     return self.view_functions[rule.endpoint](**req.view_args)
[Sun Jun 10 22:50:52.650859 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/pagure/ui/repo.py", line 183, in view_repo
[Sun Jun 10 22:50:52.650862 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     git_url_ssh=get_git_url_ssh(),
[Sun Jun 10 22:50:52.650865 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/templating.py", line 134, in render_template
[Sun Jun 10 22:50:52.650884 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     context, ctx.app)
[Sun Jun 10 22:50:52.650888 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/templating.py", line 116, in _render
[Sun Jun 10 22:50:52.650890 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     rv = template.render(context)
[Sun Jun 10 22:50:52.650893 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
[Sun Jun 10 22:50:52.650896 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     return self.environment.handle_exception(exc_info, True)
[Sun Jun 10 22:50:52.650898 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
[Sun Jun 10 22:50:52.650901 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     reraise(exc_type, exc_value, tb)
[Sun Jun 10 22:50:52.650904 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/pagure/templates/repo_info.html", line 18, in top-level template code
[Sun Jun 10 22:50:52.650907 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     {% set watch_button_text = 'Watch' %}
[Sun Jun 10 22:50:52.650909 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/pagure/templates/repo_master.html", line 5, in top-level template code
[Sun Jun 10 22:50:52.650912 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     {% set tag = "home" %}
[Sun Jun 10 22:50:52.650915 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/pagure/templates/master.html", line 185, in top-level template code
[Sun Jun 10 22:50:52.650917 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     {% block jscripts %}
[Sun Jun 10 22:50:52.650920 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/pagure/templates/repo_info.html", line 335, in block "jscripts"
[Sun Jun 10 22:50:52.650923 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     {{ super() }}
[Sun Jun 10 22:50:52.650925 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/pagure/templates/repo_master.html", line 431, in block "jscripts"
[Sun Jun 10 22:50:52.650928 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     var url = "{{ url_for(
[Sun Jun 10 22:50:52.650930 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/helpers.py", line 333, in url_for
[Sun Jun 10 22:50:52.650933 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     return appctx.app.handle_url_build_error(error, endpoint, values)
[Sun Jun 10 22:50:52.650936 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/app.py", line 1805, in handle_url_build_error
[Sun Jun 10 22:50:52.650938 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     reraise(exc_type, exc_value, tb)
[Sun Jun 10 22:50:52.650941 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/flask/helpers.py", line 323, in url_for
[Sun Jun 10 22:50:52.650944 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     force_external=external)
[Sun Jun 10 22:50:52.650946 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]   File "/usr/lib/python2.7/site-packages/werkzeug/routing.py", line 1768, in build
[Sun Jun 10 22:50:52.650949 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904]     raise BuildError(endpoint, values, method, self)
[Sun Jun 10 22:50:52.650952 2018] [wsgi:error] [pid 12116] [remote 127.0.0.1:49904] BuildError: Could not build url for endpoint 'ui_ns.new_request_pull' with values ['branch_from', 'namespace', 'repo', 'username']. Did you forget to specify values ['branch_to']?

I've verified I don't encounter this problem with the same setup on pagure 4.0.3.

ngompa@opensuse-lp150-skuld-vm:~/Sources> git clone --mirror https://gitlab.com/Conan_Kudo/origin-multidistro
Cloning into bare repository 'origin-multidistro.git'...
warning: redirecting to https://gitlab.com/Conan_Kudo/origin-multidistro.git/
remote: Counting objects: 172, done.
remote: Compressing objects: 100% (104/104), done.
remote: Total 172 (delta 82), reused 131 (delta 59)
Receiving objects: 100% (172/172), 133.43 KiB | 2.02 MiB/s, done.
Resolving deltas: 100% (82/82), done.
ngompa@opensuse-lp150-skuld-vm:~/Sources> cd origin-multidistro.git/
ngompa@opensuse-lp150-skuld-vm:~/Sources/origin-multidistro.git> git push --mirror ssh://git@localhost.localdomain/rpms/origin.git
Counting objects: 172, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (81/81), done.
Writing objects: 100% (172/172), 133.43 KiB | 133.43 MiB/s, done.
Total 172 (delta 82), reused 172 (delta 82)
remote: Resolving deltas: 100% (82/82), done.
remote: Sending to redis to log activity and send commit notification emails
remote: * Publishing information for 33 commits
remote: Sending to redis to send commit notification emails
remote: * Publishing information for 1 commits
remote: 
remote: Create a pull-request for multidistro
remote:    https://localhost.localdomain/rpms/origin/diff/master..multidistro
remote: 
remote: Sending to redis to send commit notification emails
remote: Sending to redis to send commit notification emails
remote: Sending to redis to send commit notification emails
remote: * Publishing information for 8 commits
remote: 
remote: Create a pull-request for refs/remotes/upstream/f24
remote:    https://localhost.localdomain/rpms/origin/diff/master..refs/remotes/upstream/f24
remote: 
remote: Sending to redis to send commit notification emails
remote: * Publishing information for 6 commits
remote: 
remote: Create a pull-request for refs/remotes/upstream/f25
remote:    https://localhost.localdomain/rpms/origin/diff/master..refs/remotes/upstream/f25
remote: 
remote: Sending to redis to send commit notification emails
remote: Sending to redis to send commit notification emails
remote: Sending to redis to send commit notification emails
remote: Sending to redis to send commit notification emails
remote: * Publishing information for 33 commits
remote: 
remote: Create a pull-request for refs/remotes/upstream/master
remote:    https://localhost.localdomain/rpms/origin/diff/master..refs/remotes/upstream/master
remote: 
To ssh://localhost.localdomain/rpms/origin.git
 * [new branch]      master -> master
 * [new branch]      multidistro -> multidistro
 * [new branch]      upstream/epel7 -> upstream/epel7
 * [new branch]      upstream/f23 -> upstream/f23
 * [new branch]      upstream/f24 -> upstream/f24
 * [new branch]      upstream/f25 -> upstream/f25
 * [new branch]      upstream/f26 -> upstream/f26
 * [new branch]      upstream/f27 -> upstream/f27
 * [new branch]      upstream/f28 -> upstream/f28
 * [new branch]      upstream/master -> upstream/master
ngompa@opensuse-lp150-skuld-vm:~/Sources/origin-multidistro.git> 

And no alarming output in the apache logs either (even when viewing the pull requests page).

Metadata Update from @pingou:
- Issue tagged with: bug

5 years ago

Metadata Update from @pingou:
- Issue assigned to pingou

5 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #3316 Merged 5 years ago