Commit graph error 505, runtime error #7262

Closed
opened 2025-11-02 07:21:14 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @alexolkh on GitHub (Apr 28, 2021).

  • Gitea version (or commit ref): Gitea version 1.14.1 built with GNU Make 4.1, go1.16.3 : bindata, sqlite, sqlite_unlock_notify

  • Git version: git version 1.8.3.1

  • Operating system: CentOS 7, Linux localhost.localdomain 3.10.0-1160.24.1.el7.x86_64 #1 SMP Thu Apr 8 19:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

  • Running as systemd service

  • Database (use [x]):

    • PostgreSQL
    • MySQL (mariaDB)
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:

    • Yes (provide example URL)
    • No
  • Log gist:

Description

I have error 505 on web gitea, when trying show "commit graph" in all repo`s. And error in log file is (no more any errors or warnings):

2021/04/28 16:44:00 ...uters/routes/base.go:153:1() [E] PANIC: runtime error: slice bounds out of range [:5] with length 2
        /usr/local/go/src/runtime/panic.go:98 (0x43d364)
        /source/modules/gitgraph/graph_models.go:219 (0x206c671)
        /source/modules/gitgraph/graph_models.go:199 (0x206bfe4)
        /source/modules/gitgraph/graph_models.go:73 (0x206b544)
        /source/modules/gitgraph/parser.go:84 (0x206cc57)
        /source/modules/gitgraph/graph.go:100 (0x206e598)
        /source/modules/git/command.go:153 (0x8f0039)
        /source/modules/gitgraph/graph.go:67 (0x206ace4)
        /source/routers/repo/commit.go:134 (0x20815a7)
        /source/modules/web/route.go:53 (0x1f7de6b)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x1b3720a)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/modules/web/route.go:92 (0x1f7e3d6)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/modules/web/route.go:92 (0x1f7e3d6)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/modules/web/route.go:92 (0x1f7e3d6)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/vendor/github.com/go-chi/chi/middleware/get_head.go:37 (0x21ad921)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/modules/context/context.go:704 (0x1b563a1)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/routers/routes/base.go:94 (0x21b4d21)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/routers/routes/base.go:94 (0x21b4d21)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/modules/public/public.go:86 (0x13f4947)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/modules/public/public.go:86 (0x13f4947)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/routers/routes/base.go:199 (0x21b6910)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/vendor/gitea.com/go-chi/session/session.go:256 (0x154682e)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/vendor/github.com/go-chi/chi/mux.go:70 (0x1b34d6a)
        /source/vendor/github.com/go-chi/chi/mux.go:311 (0x1b3b15b)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/vendor/github.com/go-chi/chi/mux.go:436 (0x1b3720a)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/routers/routes/web.go:110 (0x21b7d5d)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/routers/routes/base.go:38 (0x21b399b)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/vendor/github.com/go-chi/chi/middleware/strip.go:30 (0x21ae227)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/vendor/github.com/chi-middleware/proxy/middleware.go:37 (0x21a988e)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/routers/routes/web.go:66 (0x21b789c)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /source/vendor/github.com/go-chi/chi/mux.go:87 (0x1b34af0)
        /source/modules/web/route.go:268 (0x1f7d3b3)
        /source/vendor/github.com/gorilla/context/context.go:141 (0x11b4b53)
        /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3)
        /usr/local/go/src/net/http/server.go:2887 (0x7c0682)
        /usr/local/go/src/net/http/server.go:1952 (0x7bbbac)
        /usr/local/go/src/runtime/asm_amd64.s:1371 (0x47a4e0)

Screenshots

Screenshot_20210428_160156

App.ini file

I add SCRIPT_TYPE=sh in app.ini, it was in other topics with error "slice bounds out of range", but it is not help.


APP_NAME = System
RUN_USER = gitea
RUN_MODE = prod

[oauth2]
JWT_SECRET = ...

[security]
INTERNAL_TOKEN     = ...
INSTALL_LOCK       = true
SECRET_KEY         = ...
PASSWORD_HASH_ALGO = ...

[database]
DB_TYPE  = mysql
HOST     = 127.0.0.1:3306
NAME     = gitea
USER     = root
PASSWD   = ...
SCHEMA   = 
SSL_MODE = disable
CHARSET  = utf8
PATH     = /var/lib/gitea/data/gitea.db
LOG_SQL  = false

[repository]
ROOT = /home/gitea/gitea-repositories
SCRIPT_TYPE=sh

[server]
SSH_DOMAIN       = ...
DOMAIN           = localhost
HTTP_PORT        = 3000
ROOT_URL         = ...
DISABLE_SSH      = false
SSH_PORT         = 3022
LFS_START_SERVER = false 
LFS_CONTENT_PATH = /var/lib/gitea/data/lfs
LFS_JWT_SECRET   = ...
OFFLINE_MODE     = false
START_SSH_SERVER = true

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM            = false
ENABLE_NOTIFY_MAIL                = false
DISABLE_REGISTRATION              = false
ALLOW_ONLY_EXTERNAL_REGISTRATION  = false
ENABLE_CAPTCHA                    = false
REQUIRE_SIGNIN_VIEW               = false
DEFAULT_KEEP_EMAIL_PRIVATE        = false
DEFAULT_ALLOW_CREATE_ORGANIZATION = false
DEFAULT_ENABLE_TIMETRACKING       = false
NO_REPLY_ADDRESS                  = 

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = true

[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false

[session]
PROVIDER = file

[log]
MODE      = file 
LEVEL     = info
ROOT_PATH = /var/lib/gitea/log
ROUTER    = console
Originally created by @alexolkh on GitHub (Apr 28, 2021). - Gitea version (or commit ref): Gitea version 1.14.1 built with GNU Make 4.1, go1.16.3 : bindata, sqlite, sqlite_unlock_notify - Git version: git version 1.8.3.1 - Operating system: CentOS 7, Linux localhost.localdomain 3.10.0-1160.24.1.el7.x86_64 #1 SMP Thu Apr 8 19:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux - Running as systemd service - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL (mariaDB) - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - Log gist: ## Description I have error 505 on web gitea, when trying show "commit graph" in all repo`s. And error in log file is (no more any errors or warnings): ``` 2021/04/28 16:44:00 ...uters/routes/base.go:153:1() [E] PANIC: runtime error: slice bounds out of range [:5] with length 2 /usr/local/go/src/runtime/panic.go:98 (0x43d364) /source/modules/gitgraph/graph_models.go:219 (0x206c671) /source/modules/gitgraph/graph_models.go:199 (0x206bfe4) /source/modules/gitgraph/graph_models.go:73 (0x206b544) /source/modules/gitgraph/parser.go:84 (0x206cc57) /source/modules/gitgraph/graph.go:100 (0x206e598) /source/modules/git/command.go:153 (0x8f0039) /source/modules/gitgraph/graph.go:67 (0x206ace4) /source/routers/repo/commit.go:134 (0x20815a7) /source/modules/web/route.go:53 (0x1f7de6b) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/vendor/github.com/go-chi/chi/mux.go:436 (0x1b3720a) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/modules/web/route.go:92 (0x1f7e3d6) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/modules/web/route.go:92 (0x1f7e3d6) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/modules/web/route.go:92 (0x1f7e3d6) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/vendor/github.com/go-chi/chi/middleware/get_head.go:37 (0x21ad921) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/modules/context/context.go:704 (0x1b563a1) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/routers/routes/base.go:94 (0x21b4d21) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/routers/routes/base.go:94 (0x21b4d21) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/modules/public/public.go:86 (0x13f4947) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/modules/public/public.go:86 (0x13f4947) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/routers/routes/base.go:199 (0x21b6910) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/vendor/gitea.com/go-chi/session/session.go:256 (0x154682e) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/vendor/github.com/go-chi/chi/mux.go:70 (0x1b34d6a) /source/vendor/github.com/go-chi/chi/mux.go:311 (0x1b3b15b) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/vendor/github.com/go-chi/chi/mux.go:436 (0x1b3720a) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/routers/routes/web.go:110 (0x21b7d5d) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/routers/routes/base.go:38 (0x21b399b) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/vendor/github.com/go-chi/chi/middleware/strip.go:30 (0x21ae227) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/vendor/github.com/chi-middleware/proxy/middleware.go:37 (0x21a988e) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/routers/routes/web.go:66 (0x21b789c) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /source/vendor/github.com/go-chi/chi/mux.go:87 (0x1b34af0) /source/modules/web/route.go:268 (0x1f7d3b3) /source/vendor/github.com/gorilla/context/context.go:141 (0x11b4b53) /usr/local/go/src/net/http/server.go:2069 (0x7bd0c3) /usr/local/go/src/net/http/server.go:2887 (0x7c0682) /usr/local/go/src/net/http/server.go:1952 (0x7bbbac) /usr/local/go/src/runtime/asm_amd64.s:1371 (0x47a4e0) ``` ## Screenshots ![Screenshot_20210428_160156](https://user-images.githubusercontent.com/53308803/116385947-23144580-a83b-11eb-9b7f-c027eaba87e9.png) ## App.ini file I add SCRIPT_TYPE=sh in app.ini, it was in other topics with error "slice bounds out of range", but it is not help. ``` APP_NAME = System RUN_USER = gitea RUN_MODE = prod [oauth2] JWT_SECRET = ... [security] INTERNAL_TOKEN = ... INSTALL_LOCK = true SECRET_KEY = ... PASSWORD_HASH_ALGO = ... [database] DB_TYPE = mysql HOST = 127.0.0.1:3306 NAME = gitea USER = root PASSWD = ... SCHEMA = SSL_MODE = disable CHARSET = utf8 PATH = /var/lib/gitea/data/gitea.db LOG_SQL = false [repository] ROOT = /home/gitea/gitea-repositories SCRIPT_TYPE=sh [server] SSH_DOMAIN = ... DOMAIN = localhost HTTP_PORT = 3000 ROOT_URL = ... DISABLE_SSH = false SSH_PORT = 3022 LFS_START_SERVER = false LFS_CONTENT_PATH = /var/lib/gitea/data/lfs LFS_JWT_SECRET = ... OFFLINE_MODE = false START_SSH_SERVER = true [mailer] ENABLED = false [service] REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = false DISABLE_REGISTRATION = false ALLOW_ONLY_EXTERNAL_REGISTRATION = false ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false DEFAULT_KEEP_EMAIL_PRIVATE = false DEFAULT_ALLOW_CREATE_ORGANIZATION = false DEFAULT_ENABLE_TIMETRACKING = false NO_REPLY_ADDRESS = [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = true [openid] ENABLE_OPENID_SIGNIN = false ENABLE_OPENID_SIGNUP = false [session] PROVIDER = file [log] MODE = file LEVEL = info ROOT_PATH = /var/lib/gitea/log ROUTER = console ```
GiteaMirror added the type/bugissue/duplicate labels 2025-11-02 07:21:14 -06:00
Author
Owner

@zeripath commented on GitHub (Apr 28, 2021):

This is a duplicate of #15514

@zeripath commented on GitHub (Apr 28, 2021): This is a duplicate of #15514
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7262