The latest version gitea. terminate abnormal #7521

Closed
opened 2025-11-02 07:28:31 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @coolincy on GitHub (Jun 29, 2021).

The latest version gitea. terminate abnormal

`2021/06/29 11:26:51 .../queue/workerpool.go:93:zeroBoost() [W] WorkerPool: 14 (for repo_stats_update-channel) has zero workers - adding 1 temporary workers for 5m0s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xa11e63]

goroutine 17332 [running]:
code.gitea.io/gitea/modules/git.(*TreeEntry).IsDir(...)
/go/src/code.gitea.io/gitea/modules/git/tree_entry_nogogit.go:66
code.gitea.io/gitea/modules/git.(*LastCommitCache).recursiveCache(0xc004c1d650, 0x3d94d68, 0xc0020bcfc0, 0xc003c15e00, 0xc003c15e10, 0x0, 0x0, 0x1, 0x1a, 0x25e8780)
/go/src/code.gitea.io/gitea/modules/git/last_commit_cache_nogogit.go:97 +0x4e3
code.gitea.io/gitea/modules/git.(*LastCommitCache).CacheCommit(...)
/go/src/code.gitea.io/gitea/modules/git/last_commit_cache_nogogit.go:68
code.gitea.io/gitea/modules/repository.CacheRef(0x3d94d68, 0xc0020bcfc0, 0xc005d7c000, 0xc004079aa0, 0xc003e1bcb0, 0x11, 0x76, 0xc00409f180)
/go/src/code.gitea.io/gitea/modules/repository/cache.go:47 +0x325
code.gitea.io/gitea/services/repository.pushUpdates(0xc00630cc30, 0x1, 0x1, 0x0, 0x0)
/go/src/code.gitea.io/gitea/services/repository/push.go:212 +0x1a18
code.gitea.io/gitea/services/repository.handle(0xc0011312c0, 0x1, 0x14)
/go/src/code.gitea.io/gitea/services/repository/push.go:32 +0x91
code.gitea.io/gitea/modules/queue.(*WorkerPool).doWork(0xc003cd0980, 0x3d94dd8, 0xc00558e240)
/go/src/code.gitea.io/gitea/modules/queue/workerpool.go:408 +0x9a9
code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers.func1(0xc003cd0980, 0x3d94dd8, 0xc00558e240, 0xc005e17b00)
/go/src/code.gitea.io/gitea/modules/queue/workerpool.go:261 +0x45
created by code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers
/go/src/code.gitea.io/gitea/modules/queue/workerpool.go:260 +0x65
Received signal 15; terminating.`

Originally created by @coolincy on GitHub (Jun 29, 2021). The latest version gitea. terminate abnormal `2021/06/29 11:26:51 .../queue/workerpool.go:93:zeroBoost() [W] WorkerPool: 14 (for repo_stats_update-channel) has zero workers - adding 1 temporary workers for 5m0s panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xa11e63] goroutine 17332 [running]: code.gitea.io/gitea/modules/git.(*TreeEntry).IsDir(...) /go/src/code.gitea.io/gitea/modules/git/tree_entry_nogogit.go:66 code.gitea.io/gitea/modules/git.(*LastCommitCache).recursiveCache(0xc004c1d650, 0x3d94d68, 0xc0020bcfc0, 0xc003c15e00, 0xc003c15e10, 0x0, 0x0, 0x1, 0x1a, 0x25e8780) /go/src/code.gitea.io/gitea/modules/git/last_commit_cache_nogogit.go:97 +0x4e3 code.gitea.io/gitea/modules/git.(*LastCommitCache).CacheCommit(...) /go/src/code.gitea.io/gitea/modules/git/last_commit_cache_nogogit.go:68 code.gitea.io/gitea/modules/repository.CacheRef(0x3d94d68, 0xc0020bcfc0, 0xc005d7c000, 0xc004079aa0, 0xc003e1bcb0, 0x11, 0x76, 0xc00409f180) /go/src/code.gitea.io/gitea/modules/repository/cache.go:47 +0x325 code.gitea.io/gitea/services/repository.pushUpdates(0xc00630cc30, 0x1, 0x1, 0x0, 0x0) /go/src/code.gitea.io/gitea/services/repository/push.go:212 +0x1a18 code.gitea.io/gitea/services/repository.handle(0xc0011312c0, 0x1, 0x14) /go/src/code.gitea.io/gitea/services/repository/push.go:32 +0x91 code.gitea.io/gitea/modules/queue.(*WorkerPool).doWork(0xc003cd0980, 0x3d94dd8, 0xc00558e240) /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:408 +0x9a9 code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers.func1(0xc003cd0980, 0x3d94dd8, 0xc00558e240, 0xc005e17b00) /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:261 +0x45 created by code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:260 +0x65 Received signal 15; terminating.`
GiteaMirror added the issue/needs-feedback label 2025-11-02 07:28:31 -06:00
Author
Owner

@techknowlogick commented on GitHub (Jun 29, 2021):

please fill out the full details of the issue template.

@techknowlogick commented on GitHub (Jun 29, 2021): please fill out the full details of the issue template.
Author
Owner

@coolincy commented on GitHub (Jun 29, 2021):

Run with docker:

docker run -d --restart=unless-stopped \
--name gitea -h git.xxxx.xxx \
-u 0:0 \
-m 16G \
-e APP_NAME="Xxxxx Git Service" \
-e DOMAIN="git.xxxx.xxx" \
-e SSH_DOMAIN="git.xxxx.xxx" \
-e SSH_PORT=22 \
-e SSH_LISTEN_PORT=22 \
-e DISABLE_SSH=true \
-e HTTP_PORT=3000 \
-e ROOT_URL="https://git.xxxx.xxx" \
-e DB_TYPE=postgres \
-e DB_HOST="192.168.0.80" \
-e DB_NAME=gitea \
-e DB_USER=gitea \
-e DB_PASSWD=gitea \
-e INSTALL_LOCK=true \
-e SECRET_KEY="xxxxxxxx" \
-e DISABLE_REGISTRATION=false \
-e REQUIRE_SIGNIN_VIEW=true \
-p 3000:3000 \
-v /data/gitea:/data \
-v /etc/timezone:/etc/timezone:ro \
-v /etc/localtime:/etc/localtime:ro \
gitea/gitea
  • Gitea version (or commit ref): 1.15.0+dev-509-g2f3d3ac20 built with GNU Make 4.3, go1.16.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify
  • Git version: 2.30.2
  • Operating system: docker
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:
2021/06/29 15:03:10 .../queue/workerpool.go:93:zeroBoost() [W] WorkerPool: 14 (for repo_stats_update-channel) has zero workers - adding 1 temporary workers for 5m0s
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xa11e63]

goroutine 6576 [running]:
code.gitea.io/gitea/modules/git.(*TreeEntry).IsDir(...)
        /go/src/code.gitea.io/gitea/modules/git/tree_entry_nogogit.go:66
code.gitea.io/gitea/modules/git.(*LastCommitCache).recursiveCache(0xc004917650, 0x3d94d68, 0xc0004f01c0, 0xc0038c23c0, 0xc0038c23d0, 0x0, 0x0, 0x1, 0x26, 0x25e8780)
        /go/src/code.gitea.io/gitea/modules/git/last_commit_cache_nogogit.go:97 +0x4e3
code.gitea.io/gitea/modules/git.(*LastCommitCache).CacheCommit(...)
        /go/src/code.gitea.io/gitea/modules/git/last_commit_cache_nogogit.go:68
code.gitea.io/gitea/modules/repository.CacheRef(0x3d94d68, 0xc0004f01c0, 0xc00649a400, 0xc0056239e0, 0xc0041c2c00, 0xd, 0x82, 0xc002cbef60)
        /go/src/code.gitea.io/gitea/modules/repository/cache.go:47 +0x325
code.gitea.io/gitea/services/repository.pushUpdates(0xc004f470c8, 0x1, 0x1, 0x0, 0x0)
        /go/src/code.gitea.io/gitea/services/repository/push.go:212 +0x1a18
code.gitea.io/gitea/services/repository.handle(0xc00038fb80, 0x1, 0x14)
        /go/src/code.gitea.io/gitea/services/repository/push.go:32 +0x91
code.gitea.io/gitea/modules/queue.(*WorkerPool).doWork(0xc00372cd00, 0x3d94dd8, 0xc005623680)
        /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:408 +0x9a9
code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers.func1(0xc00372cd00, 0x3d94dd8, 0xc005623680, 0xc007a6d860)
        /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:261 +0x45
created by code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers
        /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:260 +0x65
Received signal 15; terminating.

Description

...

Screenshots

@coolincy commented on GitHub (Jun 29, 2021): <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> Run with docker: ``` docker run -d --restart=unless-stopped \ --name gitea -h git.xxxx.xxx \ -u 0:0 \ -m 16G \ -e APP_NAME="Xxxxx Git Service" \ -e DOMAIN="git.xxxx.xxx" \ -e SSH_DOMAIN="git.xxxx.xxx" \ -e SSH_PORT=22 \ -e SSH_LISTEN_PORT=22 \ -e DISABLE_SSH=true \ -e HTTP_PORT=3000 \ -e ROOT_URL="https://git.xxxx.xxx" \ -e DB_TYPE=postgres \ -e DB_HOST="192.168.0.80" \ -e DB_NAME=gitea \ -e DB_USER=gitea \ -e DB_PASSWD=gitea \ -e INSTALL_LOCK=true \ -e SECRET_KEY="xxxxxxxx" \ -e DISABLE_REGISTRATION=false \ -e REQUIRE_SIGNIN_VIEW=true \ -p 3000:3000 \ -v /data/gitea:/data \ -v /etc/timezone:/etc/timezone:ro \ -v /etc/localtime:/etc/localtime:ro \ gitea/gitea ``` - Gitea version (or commit ref): 1.15.0+dev-509-g2f3d3ac20 built with GNU Make 4.3, go1.16.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify - Git version: 2.30.2 - Operating system: docker <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [x] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ``` 2021/06/29 15:03:10 .../queue/workerpool.go:93:zeroBoost() [W] WorkerPool: 14 (for repo_stats_update-channel) has zero workers - adding 1 temporary workers for 5m0s panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xa11e63] goroutine 6576 [running]: code.gitea.io/gitea/modules/git.(*TreeEntry).IsDir(...) /go/src/code.gitea.io/gitea/modules/git/tree_entry_nogogit.go:66 code.gitea.io/gitea/modules/git.(*LastCommitCache).recursiveCache(0xc004917650, 0x3d94d68, 0xc0004f01c0, 0xc0038c23c0, 0xc0038c23d0, 0x0, 0x0, 0x1, 0x26, 0x25e8780) /go/src/code.gitea.io/gitea/modules/git/last_commit_cache_nogogit.go:97 +0x4e3 code.gitea.io/gitea/modules/git.(*LastCommitCache).CacheCommit(...) /go/src/code.gitea.io/gitea/modules/git/last_commit_cache_nogogit.go:68 code.gitea.io/gitea/modules/repository.CacheRef(0x3d94d68, 0xc0004f01c0, 0xc00649a400, 0xc0056239e0, 0xc0041c2c00, 0xd, 0x82, 0xc002cbef60) /go/src/code.gitea.io/gitea/modules/repository/cache.go:47 +0x325 code.gitea.io/gitea/services/repository.pushUpdates(0xc004f470c8, 0x1, 0x1, 0x0, 0x0) /go/src/code.gitea.io/gitea/services/repository/push.go:212 +0x1a18 code.gitea.io/gitea/services/repository.handle(0xc00038fb80, 0x1, 0x14) /go/src/code.gitea.io/gitea/services/repository/push.go:32 +0x91 code.gitea.io/gitea/modules/queue.(*WorkerPool).doWork(0xc00372cd00, 0x3d94dd8, 0xc005623680) /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:408 +0x9a9 code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers.func1(0xc00372cd00, 0x3d94dd8, 0xc005623680, 0xc007a6d860) /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:261 +0x45 created by code.gitea.io/gitea/modules/queue.(*WorkerPool).addWorkers /go/src/code.gitea.io/gitea/modules/queue/workerpool.go:260 +0x65 Received signal 15; terminating. ``` ## Description <!-- If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services. --> ... ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@coolincy commented on GitHub (Jun 29, 2021):

random occurrence, then the docker container restarted.

@coolincy commented on GitHub (Jun 29, 2021): random occurrence, then the docker container restarted.
Author
Owner

@zeripath commented on GitHub (Jun 29, 2021):

This suggests that a nil TreeEntry snuck into the map here:

579fcad8cd/modules/git/last_commit_cache_nogogit.go (L97)

Which suggests that a path was missed in:

579fcad8cd/modules/git/last_commit_cache_nogogit.go (L88)

Are you able to work out which repository was being cached at the time? It will have been a repository that was just recently pushed to?

Would you be able to check your repository on the web ui and if there is an error rendering it give me the logs - or better push it up to try.gitea.io for me to try to figure out what's happened.

@zeripath commented on GitHub (Jun 29, 2021): This suggests that a nil TreeEntry snuck into the map here: https://github.com/go-gitea/gitea/blob/579fcad8cdd16e88edc60685fbf9b555266bac76/modules/git/last_commit_cache_nogogit.go#L97 Which suggests that a path was missed in: https://github.com/go-gitea/gitea/blob/579fcad8cdd16e88edc60685fbf9b555266bac76/modules/git/last_commit_cache_nogogit.go#L88 Are you able to work out which repository was being cached at the time? It will have been a repository that was just recently pushed to? Would you be able to check your repository on the web ui and if there is an error rendering it give me the logs - or better push it up to try.gitea.io for me to try to figure out what's happened.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7521