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

segfault against Gitea #161

Open
andrewimeson opened this issue Jul 17, 2023 · 2 comments
Open

segfault against Gitea #161

andrewimeson opened this issue Jul 17, 2023 · 2 comments

Comments

@andrewimeson
Copy link

Gickup 0.10.17 (darwin_arm64) is giving me a segfault when running, except for --help and --version

---
source:
  gitea:
    - token: <redacted>
      url: https://git.example.com
      includeorgs: [org, archive-org]
      wiki: false
destination:
  local:
    - path: /Users/aimeson/Documents/git-backups/backups/
      structured: true
      zip: false
      keep: 5
      bare: false
log:
  timeformat: 2006-01-02 15:04:05
  file-logging:
    dir: log
    file: gickup.log
    maxage: 7
$ ./gickup
2023-07-17T14:58:33-04:00 INF Reading conf.yml file=conf.yml
2023-07-17 14:58:33 INF Configuration loaded destinations=1 pairs=1 sources=1
2023-07-17 14:58:33 INF Backup run starting
2023-07-17 14:58:33 INF grabbing my repositories stage=gitea url=https://git.example.com
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x104b1d218]

goroutine 1 [running]:
code.gitea.io/sdk/gitea.(*Client).doRequest(0x0, {0x104d8808d, 0x3}, {0x104d88a17, 0x5}, 0x0, {0x0, 0x0})
	/home/runner/go/pkg/mod/code.gitea.io/sdk/gitea@v0.15.1/client.go:206 +0x28
code.gitea.io/sdk/gitea.(*Client).getResponse(0x0, {0x104d8808d, 0x3}, {0x104d88a17, 0x5}, 0x0, {0x0, 0x0})
	/home/runner/go/pkg/mod/code.gitea.io/sdk/gitea@v0.15.1/client.go:289 +0x7c
code.gitea.io/sdk/gitea.(*Client).getParsedResponse(0x0, {0x104d8808d, 0x3}, {0x104d88a17, 0x5}, 0x0, {0x0, 0x0}, {0x104ef1d60, 0x140002b4a50})
	/home/runner/go/pkg/mod/code.gitea.io/sdk/gitea@v0.15.1/client.go:311 +0x60
code.gitea.io/sdk/gitea.(*Client).GetMyUserInfo(0x0)
	/home/runner/go/pkg/mod/code.gitea.io/sdk/gitea@v0.15.1/user.go:67 +0x80
github.com/cooperspencer/gickup/gitea.Get(0x140002ec000)
	/home/runner/work/gickup/gickup/gitea/gitea.go:208 +0x458
main.runBackup(0x140002ec000, 0x0)
	/home/runner/work/gickup/gickup/main.go:240 +0x1c4
main.main()
	/home/runner/work/gickup/gickup/main.go:422 +0xd94

Are the references to /home/runner relevant? That path doesn't exist on my machine, but perhaps that's an expected artifact of them being built on GitHub Actions?

It worked for me last week, I'm not sure what changed.

@andrewimeson
Copy link
Author

I discovered the issue was that my Gitea server was unreachable. The messaging could probably be improved.

@cooperspencer
Copy link
Owner

Ok. I thought there might be breaking changes between gitea 1.19 and 1.20, as they just released 1.20. I will improve the error messages in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants