Gitea: merge with huge amount of diffs, 500 in UI, GetPatch: signal: killed in log

Created on 17 Jul 2019  Â·  12Comments  Â·  Source: go-gitea/gitea

  • Gitea version (or commit ref): 1.8.3
  • Git version: 2.17.1
  • Operating system: Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-1043-aws x86_64)
  • Database (use [x]):

    • [ ] PostgreSQL

    • [ X ] MySQL

    • [ ] MSSQL

    • [ ] SQLite

  • Can you reproduce the bug at https://try.gitea.io:

    • [ ] Yes (provide example URL)

    • [ X ] No

    • [ ] Not relevant

  • Log gist:
    2019/07/17 00:36:19 [...routers/repo/pull.go:929 CompareAndPullRequestPost()] [E] GetPatch: signal: killed

attempt to create Pull Request. There's a great many changed files as a large binary dependency is being swapped in, new for old. Along with many other required changes to update the dependency. After picking the To and From branches, it's about 6 seconds before the next screen of the UI appears. says at the bottom, "Some files were not shown because too many files changed in this diff " . If we then click the Create Pull Request button, it spins for Page: 60126ms Template: 2ms and gives a 500. Log shows:
2019/07/17 01:53:55 [...routers/repo/pull.go:929 CompareAndPullRequestPost()] [E] GetPatch: signal: killed

I tried changing in app.ini:
PULL_REQUEST_QUEUE_LENGTH = 10000
from the default of 1000, but this had no effect. I think this seems like a hard coded timeout is being exceeded. Possibly quick fix for this?

Thanks much,

  • Drew
kinbug performancmemory performancspeed revieweconfirmed

Most helpful comment

We have a similar/same problem. We can replicate the issue on try.gitea.io.

Diffs are displayed correctly, but the pull request creation doesn't work. We can see nothing related in the logs.

You can easily replicate the issue with a repository at https://github.com/fpiecka/gitea-pr-fail

Import/clone the repository to try.gitea.io and try to create a PR merging branch1-link into branch1. The page will hang indefinitely in Firefox.

While playing with file sizes in the repository, I was able to get a 500 error from time to time.

All 12 comments

Maybe you can change some timeout args on [git]

Maybe you can change some timeout args on [git]

Nope. I already have all those values set VERY high. None of them effect this exactly 60 second timeout...

[git.timeout]
MIGRATE = 1800
MIRROR  = 1800
CLONE   = 1800
PULL    = 1800
GC      = 1800

also, nothing is getting killed by OOM killer. Judging by the page load timer, this always gets killed at 60 seconds. I think this is a non-exposed timeout limit, there doesn't seem to be a way to adjust it currently.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

also experiencing the same issue, even though this happens for PRs and also for the diff screen itself. No error is shown in the logs.
git diff -M dev origin/master > out.txt produces a ~2MB file.

Hmm... could you check on master as following #9302 the calls to GetPatch no longer involve storing the patch in memory and should just get streamed directly to a file.

We have a similar/same problem. We can replicate the issue on try.gitea.io.

Diffs are displayed correctly, but the pull request creation doesn't work. We can see nothing related in the logs.

You can easily replicate the issue with a repository at https://github.com/fpiecka/gitea-pr-fail

Import/clone the repository to try.gitea.io and try to create a PR merging branch1-link into branch1. The page will hang indefinitely in Firefox.

While playing with file sizes in the repository, I was able to get a 500 error from time to time.

@fpiecka So this is I'm certain due to the memory issue in diff display. Does the PR get created?

The PR isn't created. However the diff is displayed correctly before creating the PR.

I'm having this same problem. 18K deletions. PR is NOT created.

still? dang, I'd been hoping this was fixed. What version are you running?

On Fri, Apr 17, 2020 at 3:40 PM jamoeder77 notifications@github.com wrote:

I'm having this same problem. 18K deletions. PR is NOT created.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/go-gitea/gitea/issues/7495#issuecomment-615494594,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AD24PKCFKXHOLTHXWTR534DRNDLFDANCNFSM4IEJPQHA
.

(sorry for the delayed response).

1.10.6 built with GNU Make 4.1, go1.13.8 : bindata, sqlite, sqlite_unlock_notify
Git Version 2.8.0

Just ran into this same issue on another PR. Just as an FYI for a workaround, I've been recreating the branch in a single commit, disabling branch protection, merging the branch into the main working tree, and then re-enabling branch protection. It's not convenient but it works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adpande picture adpande  Â·  3Comments

ghost picture ghost  Â·  3Comments

jonasfranz picture jonasfranz  Â·  3Comments

BRMateus2 picture BRMateus2  Â·  3Comments

Fastidious picture Fastidious  Â·  3Comments