Skip to content

panic: runtime error on macOS BigSur 11.2 (codeql-action-sync tool) #56

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

Closed
hsbt opened this issue Feb 24, 2021 · 10 comments
Closed

panic: runtime error on macOS BigSur 11.2 (codeql-action-sync tool) #56

hsbt opened this issue Feb 24, 2021 · 10 comments
Assignees

Comments

@hsbt
Copy link

hsbt commented Feb 24, 2021

HI, I tried to sync github/codeql-action to our on-prem GHES instance. But I got the following error on my macOS.

Command:

./codeql-action-sync sync --destination-token xxx --destination-url https://our-ghes-server --force

Result:

(snip)
DEBU[0123] Pushing Git references to https://our-ghes-server/github/codeql-action.git...
Resolving deltas: 100% (139/139), done.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x143f807]

goroutine 1 [running]:
github.com/go-git/go-git/v5/plumbing/protocol/packp.(*ReportStatus).Error(0x0, 0xc0000a0000, 0x18d2120)
        /home/runner/go/pkg/mod/github.com/go-git/go-git/v5@v5.1.0/plumbing/protocol/packp/report_status.go:31 +0x37
github.com/go-git/go-git/v5.(*Remote).PushContext(0xc000c4baa8, 0x18d4f60, 0xc0000a0000, 0xc000c4bae0, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/go-git/go-git/v5@v5.1.0/remote.go:199 +0x8d1
github.com/github/codeql-action-sync/internal/push.(*pushService).pushGit(0xc000c4bc20, 0xc001144300, 0x0, 0x0, 0x0)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/internal/push/push.go:216 +0x97d
github.com/github/codeql-action-sync/internal/push.Push(0x18d4f60, 0xc0000a0000, 0xc00027ac00, 0x1b, 0x7ffeefbff2a1, 0x1e, 0x7ffeefbff266, 0x28, 0x1755b6c, 0x14, ...)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/internal/push/push.go:427 +0x53c
github.com/github/codeql-action-sync/cmd.glob..func4(0x1d4cde0, 0xc0000bc870, 0x0, 0x5, 0x0, 0x0)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/cmd/sync.go:21 +0x1e9
github.com/spf13/cobra.(*Command).execute(0x1d4cde0, 0xc0000bc820, 0x5, 0x5, 0x1d4cde0, 0xc0000bc820)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0x1d4c600, 0x1d4cde0, 0x1, 0x1)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:880
github.com/github/codeql-action-sync/cmd.Execute(0x18d4f60, 0xc0000a0000, 0xc000713f78, 0x100580f)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/cmd/root.go:67 +0x237
main.main()
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/main.go:15 +0x4e
@joshhale
Copy link

(@simon-engledew to attempt to reproduce)

@joshhale joshhale changed the title panic: runtime error on macOS BigSur 11.2 panic: runtime error on macOS BigSur 11.2 (codeql-action-sync tool) Apr 26, 2021
@simon-engledew
Copy link
Contributor

simon-engledew commented Apr 26, 2021

Hello Hiroshi! Sorry for the delay in getting to this - we were rather hoping to upgrade to Big Sur and look into this issue sooner! 🙇

As it's been a month and we are still quite not ready to upgrade, 😭 I've got everything set up on a virtual machine instead. ✌️

The bad news is, I cannot recreate your issue! Using codeql-action-sync-tool release 1.0.4 everything works as expected when pushing to a GHES test instance I have:

image

Can you confirm you are still seeing this problem? I am using:

image

@hsbt
Copy link
Author

hsbt commented Apr 27, 2021

Still happend with Big Sur 11.3 and codeql-sync-1.0.4.

see

(snip)
DEBU[0214] Pushing Git references to https://our-ghes-server/github/codeql-action.git...
Resolving deltas: 100% (78/78), done.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x143f807]

goroutine 1 [running]:
github.com/go-git/go-git/v5/plumbing/protocol/packp.(*ReportStatus).Error(0x0, 0xc0000240c8, 0x18d2ac0)
        /home/runner/go/pkg/mod/github.com/go-git/go-git/v5@v5.1.0/plumbing/protocol/packp/report_status.go:31 +0x37
github.com/go-git/go-git/v5.(*Remote).PushContext(0xc00e423aa0, 0x18d5900, 0xc0000240c8, 0xc01750fad8, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/go-git/go-git/v5@v5.1.0/remote.go:199 +0x8d1
github.com/github/codeql-action-sync/internal/push.(*pushService).pushGit(0xc00e423c20, 0xc015aa8600, 0x0, 0x0, 0x0)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/internal/push/push.go:234 +0x97d
github.com/github/codeql-action-sync/internal/push.Push(0x18d5900, 0xc0000240c8, 0xc0002ad2c0, 0x1b, 0x7ffeefbff271, 0x1e, 0x7ffeefbff236, 0x28, 0x175621c, 0x14, ...)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/internal/push/push.go:447 +0x5a2
github.com/github/codeql-action-sync/cmd.glob..func4(0x1d4de00, 0xc00049db80, 0x0, 0x4, 0x0, 0x0)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/cmd/sync.go:21 +0x1e9
github.com/spf13/cobra.(*Command).execute(0x1d4de00, 0xc00049db40, 0x4, 0x4, 0x1d4de00, 0xc00049db40)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0x1d4d620, 0x1d4de00, 0x1, 0x1)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:880
github.com/github/codeql-action-sync/cmd.Execute(0x18d5900, 0xc0000240c8, 0xc00010ff78, 0x100580f)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/cmd/root.go:76 +0x237
main.main()
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/main.go:15 +0x4e

@simon-engledew
Copy link
Contributor

😞 🤔 Does the same thing happen when you push using --push-ssh? Do you have a reverse proxy in front of your GHES instance?

@hsbt
Copy link
Author

hsbt commented Apr 27, 2021

Unfortunately, it's failed with --push-ssh too.

Do you have a reverse proxy in front of your GHES instance?

Yes. But I could sync with https://github.com/actions/actions-sync. I'm not sure what difference it.

@simon-engledew
Copy link
Contributor

Unfortunately, it's failed with --push-ssh too.

🤔 Did it fail with the same error?

Does this new release help at all?

https://github.com/github/codeql-action-sync-tool/releases/tag/1.0.5

@hsbt
Copy link
Author

hsbt commented Apr 27, 2021

🤔 Did it fail with the same error?

I got the following error:

DEBU[0002] Pushing Git releases to git@git-staging.pepabo.com:github/codeql-action.git...
FATA[0002] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
Error listing remote references.

And 1.0.5 has same error with 1.0.4.

DEBU[0090] Pushing Git references to https://our-ghes-server/github/codeql-action.git...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x14478f7]

goroutine 1 [running]:
github.com/go-git/go-git/v5/plumbing/protocol/packp.(*ReportStatus).Error(0x0, 0xc0000240c8, 0x18e9660)
        /home/runner/go/pkg/mod/github.com/go-git/go-git/v5@v5.3.0/plumbing/protocol/packp/report_status.go:31 +0x37
github.com/go-git/go-git/v5.(*Remote).PushContext(0xc0000cfa40, 0x18e9360, 0xc0000240c8, 0xc0018d3aa8, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/go-git/go-git/v5@v5.3.0/remote.go:216 +0x96e
github.com/github/codeql-action-sync/internal/push.(*pushService).pushGit(0xc0000cfc20, 0xc002dccf00, 0x0, 0x0, 0x0)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/internal/push/push.go:234 +0x9a9
github.com/github/codeql-action-sync/internal/push.Push(0x18e9360, 0xc0000240c8, 0xc0004898a0, 0x1b, 0x7ffeefbff271, 0x1e, 0x7ffeefbff236, 0x28, 0x1767d2f, 0x14, ...)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/internal/push/push.go:447 +0x5a2
github.com/github/codeql-action-sync/cmd.glob..func4(0x1d6bec0, 0xc0003c86c0, 0x0, 0x4, 0x0, 0x0)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/cmd/sync.go:21 +0x1f1
github.com/spf13/cobra.(*Command).execute(0x1d6bec0, 0xc0003c8500, 0x4, 0x4, 0x1d6bec0, 0xc0003c8500)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:842 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0x1d6b6e0, 0x1d6bec0, 0x1, 0x1)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:880
github.com/github/codeql-action-sync/cmd.Execute(0x18e9360, 0xc0000240c8, 0xc00009df78, 0x100581f)
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/cmd/root.go:76 +0x237
main.main()
        /home/runner/work/codeql-action-sync-tool/codeql-action-sync-tool/main.go:15 +0x4e

@simon-engledew
Copy link
Contributor

🤔 That SSH error looks like a permissions issue. Have you added your public key to the GHES instance and do you have access to the destination organization?

And 1.0.5 has same error with 1.0.4

😞

@simon-engledew
Copy link
Contributor

Hi Hiroshi! Given that I can't reproduce this issue, and that SSH is hopefully just a permissions problem, I'm going to close this issue for now.

Please reopen it if you are still stuck. ❤️ 🙇

@hsbt
Copy link
Author

hsbt commented May 20, 2021

Unfortunately, I gave up to use codeql in our GHES instance. I will escalate this to our account manager later.

Thanks.

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

No branches or pull requests

3 participants