2019-04-20 build doesn't start ( session/memory.go VirtualSessionProvider segfault) #3216

Closed
opened 2025-11-02 05:04:10 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @gsantner on GitHub (Apr 20, 2019).

  • Gitea version (or commit ref): guess b74dc970e9
  • Git version: 2.17.1
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: gitea.log serv.log

Description

git pull doesn't work and webserv not running:

$ LANG=en git pull
Gitea: Internal error
Failed to get repository: Get http://127.0.0.1:9003/api/internal/repo/linux/dotfiles: dial tcp 127.0.0.1:9003: connect: connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Guess logs tell you best where the issue is ;).

Nightly build from 2019-04-19 works, so must be related to changes of yesterday. Guess the commit that did this issue is https://github.com/go-gitea/gitea/commit/b33f7f792bf3a1a1e54639db94cc80b84f68ebfd

Screenshots

Originally created by @gsantner on GitHub (Apr 20, 2019). - Gitea version (or commit ref): guess b74dc970e9911e42861b88a1338ca504644b7cd2 - Git version: 2.17.1 - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: [gitea.log](https://github.com/go-gitea/gitea/files/3099925/gitea.log) [serv.log](https://github.com/go-gitea/gitea/files/3099923/serv.log) ## Description git pull doesn't work and webserv not running: ``` $ LANG=en git pull Gitea: Internal error Failed to get repository: Get http://127.0.0.1:9003/api/internal/repo/linux/dotfiles: dial tcp 127.0.0.1:9003: connect: connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` Guess logs tell you best where the issue is ;). Nightly build from 2019-04-19 works, so must be related to changes of yesterday. Guess the commit that did this issue is <https://github.com/go-gitea/gitea/commit/b33f7f792bf3a1a1e54639db94cc80b84f68ebfd> ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@zeripath commented on GitHub (Apr 20, 2019):

That change shouldn't do it. Connection refused implies it's not even listening.

@zeripath commented on GitHub (Apr 20, 2019): That change shouldn't do it. Connection refused implies it's not even listening.
Author
Owner

@zeripath commented on GitHub (Apr 20, 2019):

Oh it is that change though the more helpful log is:

2019/04/20 09:40:01 routers/init.go:37:checkRunMode() [I] Run Mode: Development
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x9e8710]

goroutine 140 [running]:
container/list.(*List).Back(...)
	/usr/local/go/src/container/list/list.go:78
github.com/go-macaron/session.(*MemProvider).GC(0xc0005e9ad0)
	/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/memory.go:196 +0x40
code.gitea.io/gitea/modules/session.(*VirtualSessionProvider).GC(0xc00016e840)
	/go/src/code.gitea.io/gitea/modules/session/virtual.go:102 +0x34
github.com/go-macaron/session.(*Manager).GC(...)
	/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:381
github.com/go-macaron/session.(*Manager).startGC(0xc001b9d180)
	/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:386 +0x38
created by github.com/go-macaron/session.Sessioner
	/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:157 +0x145
@zeripath commented on GitHub (Apr 20, 2019): Oh it is that change though the more helpful log is: ``` 2019/04/20 09:40:01 routers/init.go:37:checkRunMode() [I] Run Mode: Development panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x9e8710] goroutine 140 [running]: container/list.(*List).Back(...) /usr/local/go/src/container/list/list.go:78 github.com/go-macaron/session.(*MemProvider).GC(0xc0005e9ad0) /go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/memory.go:196 +0x40 code.gitea.io/gitea/modules/session.(*VirtualSessionProvider).GC(0xc00016e840) /go/src/code.gitea.io/gitea/modules/session/virtual.go:102 +0x34 github.com/go-macaron/session.(*Manager).GC(...) /go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:381 github.com/go-macaron/session.(*Manager).startGC(0xc001b9d180) /go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:386 +0x38 created by github.com/go-macaron/session.Sessioner /go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:157 +0x145 ```
Author
Owner

@zeripath commented on GitHub (Apr 20, 2019):

Sigh MemProvider.Init doesn't actually properly Init and all its members are private so I can't just shadow them properly.

Simple and quick fix is to just copy the file and properly init it ourselves.

@zeripath commented on GitHub (Apr 20, 2019): *Sigh* MemProvider.Init doesn't actually properly Init and all its members are private so I can't just shadow them properly. Simple and quick fix is to just copy the file and properly init it ourselves.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3216