Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic Error with Pull Request Submit #4572

Closed
5 tasks
mangkang opened this issue Jun 20, 2017 · 15 comments
Closed
5 tasks

Panic Error with Pull Request Submit #4572

mangkang opened this issue Jun 20, 2017 · 15 comments
Labels
💊 bug Something isn't working

Comments

@mangkang
Copy link

  • Gogs version (or commit ref): 0.11.19.0609
  • Git version: 2.7.4
  • Operating system: Ubuntu
  • Database (use [x]):
    • PostgreSQL
    • [X ] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gogs.io:
    • Yes (provide example URL)
    • No
    • [ X] Not relevant
  • Log gist (usually found in log/gogs.log):

Hi,

I am getting the following errors when submitting a pull request. The request went through but
I am getting an empty page on submit. Please let me know if there is a configuration I am missing.
Thanks.

Macaron] 2017-06-20 04:34:59: Started POST /vistara/itom2/compare/master...mangkang:master for 172.25.224.70
[Macaron] PANIC: runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:489 (0x4340bf)
/usr/local/go/src/runtime/panic.go:63 (0x432f6e)
/usr/local/go/src/runtime/signal_unix.go:290 (0x44930f)
/home/vagrant/gopath/src/github.com/gogits/gogs/models/repo.go:612 (0xb7d70a)
/home/vagrant/gopath/src/github.com/gogits/gogs/models/repo.go:630 (0xb7dbe0)
/home/vagrant/gopath/src/github.com/gogits/gogs/models/repo.go:287 (0xb7a5df)
/home/vagrant/gopath/src/github.com/gogits/gogs/models/repo.go:314 (0xb7a8ea)
/home/vagrant/gopath/src/github.com/gogits/gogs/models/pull.go:140 (0xb6b775)
/home/vagrant/gopath/src/github.com/gogits/gogs/models/pull.go:444 (0xb6fd6d)
/home/vagrant/gopath/src/github.com/gogits/gogs/routers/repo/pull.go:705 (0xc2f699)
/usr/local/go/src/runtime/asm_amd64.s:516 (0x460726)
/usr/local/go/src/reflect/value.go:434 (0x4b279f)
/usr/local/go/src/reflect/value.go:302 (0x4b1d64)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:177 (0x88bd3f)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:137 (0x88b70a)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:121 (0x8a99e2)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:112 (0x8a9906)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/session/session.go:186 (0x901dc0)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:79 (0x8a9781)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:157 (0x88ba12)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:135 (0x88b80b)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:121 (0x8a99e2)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:112 (0x8a9906)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/recovery.go:161 (0x8bd26b)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/logger.go:40 (0x8ace98)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:157 (0x88ba12)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:135 (0x88b80b)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:121 (0x8a99e2)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:112 (0x8a9906)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/logger.go:52 (0x8bc4e4)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/logger.go:40 (0x8ace98)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:157 (0x88ba12)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/github.com/go-macaron/inject/inject.go:135 (0x88b80b)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/context.go:121 (0x8a99e2)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/router.go:187 (0x8be539)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/router.go:296 (0x8b65dd)
/home/vagrant/gopath/src/github.com/gogits/gogs/vendor/gopkg.in/macaron.v1/macaron.go:220 (0x8ae4dc)
/usr/local/go/src/net/http/server.go:2568 (0x6dc702)
/usr/local/go/src/net/http/server.go:3088 (0x6de103)
:312 (0x703024)
/usr/local/go/src/net/http/h2_bundle.go:4319 (0x6fa5ad)
/usr/local/go/src/net/http/h2_bundle.go:4599 (0x6b30f9)
/usr/local/go/src/runtime/asm_amd64.s:2197 (0x462dc1)
[Macaron] 2017-06-20 04:34:59: Completed POST /vistara/itom2/compare/master...mangkang:master 500 Internal Server Error in 103.436195ms

...

@duckbrain
Copy link

#4565 Probably related

@mangkang
Copy link
Author

Still getting panic error after building latest from master.

@unknwon
Copy link
Member

unknwon commented Jun 27, 2017

Hi, why can't you reproduce on demo site?

@unknwon unknwon added the status: needs feedback Tell me more about it label Jun 27, 2017
@dracic
Copy link

dracic commented Jun 30, 2017

@unknwon, i did try on demo site:

I forked https://try.gogs.io/kolgotcko/test, my repo is https://try.gogs.io/dracic/test. I have made one commit and then submitted a pull request.

https://try.gogs.io/kolgotcko/test/compare/master...dracic:master gives error 500, but at the end the pull request is saved...

Best regards

@mattddowney
Copy link

Can confirm, we are experiencing this issue. Error 500, then pull request saved.

@theredcat
Copy link

theredcat commented Jul 4, 2017

Can confirm too on v0.10.8 . Here is the backtrace :

[Macaron] 2017-07-04 14:10:36: Started GET /xxxxxxxxxx/xxxx/pulls/162 for 127.0.0.1
2017/07/04 14:10:36 [TRACE] Session ID: 70835c38eb2c3d61
2017/07/04 14:10:36 [TRACE] CSRF Token: 2jegA7TMey35nGQz0orGtL_zQwM6MTQ5OTE1NzkzMjQ5MzI3NzYyMw==
2017/07/04 14:10:36 [TRACE] Template: repo/issue/view
[Macaron] 2017-07-04 14:10:36: Completed GET /xxxxxxxxxx/xxxx/pulls/162 200 OK in 122.826586ms
[Macaron] 2017-07-04 14:10:37: Started POST /xxxxxxxxxx/xxxx/pulls/162/merge for 127.0.0.1
2017/07/04 14:10:37 [TRACE] Session ID: 70835c38eb2c3d61
2017/07/04 14:10:37 [TRACE] CSRF Token: 2jegA7TMey35nGQz0orGtL_zQwM6MTQ5OTE1NzkzMjQ5MzI3NzYyMw==
[Macaron] 2017-07-04 14:10:40: Completed POST /xxxxxxxxxx/xxxx/pulls/162/merge 302 Found in 3.150374256s
2017/07/04 14:10:40 [TRACE] Pull request merged: 503
2017/07/04 14:10:40 [TRACE] DeliverHooks [repo_id: 126]
2017/07/04 14:10:40 [TRACE] AddTestPullRequestTask [head_repo_id: 126, head_branch: develop]: finding pull requests
2017/07/04 14:10:40 [TRACE] addHeadRepoTasks[300]: composing new test task
2017/07/04 14:10:40 [TRACE] PullRequest[300].UpdatePatch: ignored cruppted data
2017/07/04 14:10:40 [TRACE] PushToBaseRepo[126]: pushing commits to base repo 'refs/pull/106/head'
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x10 pc=0x5c9b5a]

goroutine 15776 [running]:
panic(0x10777c0, 0xc82000e0d0)
        /usr/local/go/1.6.2/src/runtime/panic.go:481 +0x3e6
github.com/gogits/gogs/models.(*Repository).getOwner(0x0, 0x7f7f8b9ae270, 0xc820123c20, 0x0, 0x0)
        /usr/src/gogs/src/github.com/gogits/gogs/models/repo.go:273 +0x2a
github.com/gogits/gogs/models.(*Repository).mustOwner(0x0, 0x7f7f8b9ae270, 0xc820123c20, 0x0)
        /usr/src/gogs/src/github.com/gogits/gogs/models/repo.go:286 +0x39
github.com/gogits/gogs/models.(*Repository).repoPath(0x0, 0x7f7f8b9ae270, 0xc820123c20, 0x0, 0x0)
        /usr/src/gogs/src/github.com/gogits/gogs/models/repo.go:415 +0x45
github.com/gogits/gogs/models.(*Repository).RepoPath(0x0, 0x0, 0x0)
        /usr/src/gogs/src/github.com/gogits/gogs/models/repo.go:419 +0x5a
github.com/gogits/gogs/models.(*PullRequest).PushToBaseRepo(0xc82163e1c0, 0x0, 0x0)
        /usr/src/gogs/src/github.com/gogits/gogs/models/pull.go:572 +0x1cf
github.com/gogits/gogs/models.addHeadRepoTasks(0xc82180e0f0, 0x1, 0x2)
        /usr/src/gogs/src/github.com/gogits/gogs/models/pull.go:652 +0x2b9
github.com/gogits/gogs/models.AddTestPullRequestTask(0xc82248c000, 0x7e, 0xc8219f7ff0, 0xc, 0xc8217e8d00)
        /usr/src/gogs/src/github.com/gogits/gogs/models/pull.go:698 +0x77d
created by github.com/gogits/gogs/models.(*PullRequest).Merge.func1
        /usr/src/gogs/src/github.com/gogits/gogs/models/pull.go:190 +0xd5

@jiangytcn
Copy link

@unknown i had the same issue with latest release

  • Gogs version 0.11.19.0609
  • git version 2.7.4
  • Operating system: Ubuntu 16.04.2 LTS
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gogs.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist (usually found in log/gogs.log):
    same as other users above

@unknwon unknwon added the 💊 bug Something isn't working label Jul 14, 2017
@unknwon unknwon added this to the 0.12 milestone Jul 14, 2017
@unknwon
Copy link
Member

unknwon commented Jul 14, 2017

Patch has pushed to fix this issue, please test on master branch or https://try.gogs.io.

@caffeineaddiction
Copy link

caffeineaddiction commented Jul 18, 2017

unable to test fix ... creating a fork causes an error 500 #4628

unknwon added a commit that referenced this issue Jul 18, 2017
Should not load attributes if repository not found in HasForkedRepo.
@unknwon
Copy link
Member

unknwon commented Jul 18, 2017

@caffeineaddiction should be good now! Please help test again.

@caffeineaddiction
Copy link

@unknwon confirmed working on https://try.gogs.io

when can we expect a new docker release of this fix?

@unknwon
Copy link
Member

unknwon commented Jul 18, 2017

@caffeineaddiction I think it is already available (latest and develop): https://hub.docker.com/r/gogs/gogs/builds/

@caffeineaddiction
Copy link

caffeineaddiction commented Jul 18, 2017

@unknwon epic win, tyvm for the fix. I have tested in on both try.gogs.io as well as my local server via docker

@mangkang
Copy link
Author

Tested pull request on master branch. Works fine now. Thanks!

@unknwon unknwon removed the status: needs feedback Tell me more about it label Jul 18, 2017
@AlexS12
Copy link

AlexS12 commented Aug 30, 2017

Hi,

I have just updated gogs to 0.11.29 @ 2017-08-15 (Windows 386) following the steps enumerated in this link https://gogs.io/docs/upgrade/upgrade_from_binary. My git version is 2.12.0.windows.1 and I am using sql database.

However I still find problems trying to submit a pull request. I cannot see any error, but the page stays waiting forever. Then anyone else navigating in gogs cannot list any repositories in any organization.

@unknwon unknwon removed this from the 0.13 milestone Nov 26, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💊 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants