Skip to content

PR Error 500 on CreateCsvDiff when trying to merge some branches: invalid memory address #19530

Closed
@99rgosse

Description

@99rgosse

Description

Hello
We have a huge repo (800 branches, 6Gb lfs files, 12k commits, with branch protection) that we have migrated from Gitlab 2 weeks ago, on a Self hosted Gitea 1.16.5 with Pgsql

Since 2 days, some users encounters a 500 error when trying to create a pull request, there are some branches that generates this error
I tested this on the 1.16.5 & 1.16.6 instances I have. We have not many other repo to test otherwise

If we recreate the same branch with another name, the PR works as intended.

short version log :

2022/04/27 14:44:11 ...rs/web/repo/issue.go:751:setTemplateIfExists() [D] could not extract metadata fdev .gitea/pull_request_template.md [mainrepo/dev]: frontmatter must start with a separator line

2022/04/27 14:44:11 ...s/context/context.go:204:HTML() [D] Template: repo/diff/compare

2022/04/27 14:44:12 ...s/context/context.go:214:HTML() [E] Render failed: template: repo/diff/csv_diff:3:15: executing "repo/diff/csv_diff" at <call .root.CreateCsvDiff .file .root.BaseCommit .root.HeadCommit>: error calling call: runtime error: invalid memory address or nil pointer dereference

2022/04/27 14:44:12 ...s/context/context.go:204:HTML() [D] Template: status/500

2022/04/27 14:44:12 Completed GET /mainrepo/dev/compare/release/master...release/calibration 500 Internal Server Error in 1.331171119s

Gitea Version

1.16.5 / 1.16.6 / latest dev on master

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://try.gitea.io/99rgosse/issues/issues/1

Screenshots

image

Git Version

2.30.3

Operating System

Docker Gitea with Ubuntu

How are you running Gitea?

Docker official Gitea v.16.6
Caching enabled :

[cache]
  | ENABLED  = true
  | ADAPTER  = memory
  | INTERVAL = 120
  | ITEM_TTL = 24h
  |  
  | [cache.last_commit]
  | ENABLED       = true
  | ITEM_TTL      = 8760h
  | COMMITS_COUNT = 7000

I tried :

  • Removing the caching
  • Removing the template generating errors

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions