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

MBT run-in with -c throws error on GitHub actions - Ubuntu 20.04.4 LTS #144

Open
swaroopbhatk opened this issue Apr 20, 2022 · 2 comments
Open

Comments

@swaroopbhatk
Copy link

swaroopbhatk commented Apr 20, 2022

Having trouble running mbt in GitHub actions. I am facing probglem with -c flag

command used:

mbt run-in -m test commit -c "$(git rev-parse HEAD)"

Debug Trace:

DEBU[0000] Commit &{{0x28eba70 0xc0001544c0} 0x28eba70} has 1 parents (@github.com/mbtproject/mbt/lib.(*stdLog).Debug log.go,80) 
DEBU[0000] Changes are based on parent <nil> (@github.com/mbtproject/mbt/lib.(*stdLog).Debug log.go,80) 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x6290a6]

goroutine 1 [running]:
github.com/mbtproject/mbt/vendor/github.com/libgit2/git2go.(*Commit).Tree.func1(0xc0000dc5e8, 0x0, 0x1)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/vendor/github.com/libgit2/git2go/commit.go:72 +0x26
github.com/mbtproject/mbt/vendor/github.com/libgit2/git2go.(*Commit).Tree(0x0, 0x0, 0x0, 0x0)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/vendor/github.com/libgit2/git2go/commit.go:72 +0x89
github.com/mbtproject/mbt/lib.(*libgitRepo).Changes(0xc000153e30, 0x868540, 0xc0000c3ad0, 0xd04310, 0x0, 0x0, 0x0, 0x0)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/lib/repo.go:186 +0x20d
github.com/mbtproject/mbt/lib.(*stdManifestBuilder).ByCommitContent.func1(0xc000153e30, 0x0, 0x0)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/lib/manifest_builder.go:96 +0xcb
github.com/mbtproject/mbt/lib.(*stdManifestBuilder).runManifestBuilder(0xc000154500, 0xc000158600, 0x4, 0xc0000c51a0, 0x38)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/lib/manifest_builder.go:181 +0xb8
github.com/mbtproject/mbt/lib.(*stdManifestBuilder).ByCommitContent(0xc000154500, 0x868540, 0xc0000c3ad0, 0x868540, 0xc0000c3ad0, 0x0)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/lib/manifest_builder.go:90 +0x7b
github.com/mbtproject/mbt/lib.(*stdSystem).ManifestByCommitContent(0xc0000fa0e0, 0x7ffe9b65475a, 0x28, 0x7dee60, 0x1, 0xc000154540)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/lib/manifest.go:55 +0xa5
github.com/mbtproject/mbt/lib.(*stdSystem).BuildCommitContent(0xc0000fa0e0, 0x7ffe9b65475a, 0x28, 0xc000154540, 0x6, 0x5, 0xc000153e60)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/lib/build.go:90 +0x43
github.com/mbtproject/mbt/cmd.glob..func9(0xcca940, 0xc000153da0, 0x1, 0x3, 0x86faa0, 0xc0000fa0e0)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/cmd/build.go:116 +0x10e
github.com/mbtproject/mbt/cmd.buildHandler.func1(0xcca940, 0xc000153da0, 0x1, 0x3, 0x0, 0x0)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/cmd/build_handler.go:30 +0x57
github.com/mbtproject/mbt/vendor/github.com/spf13/cobra.(*Command).execute(0xcca940, 0xc000153d40, 0x3, 0x3, 0xcca940, 0xc000153d40)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/vendor/github.com/spf13/cobra/command.go:698 +0x431
github.com/mbtproject/mbt/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xccc2c0, 0x0, 0x0, 0x6b454d)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/vendor/github.com/spf13/cobra/command.go:783 +0x2ca
github.com/mbtproject/mbt/vendor/github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/work/mbt/src/github.com/mbtproject/mbt/vendor/github.com/spf13/cobra/command.go:736

Kernel:

Static hostname: fv-az128-613
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 74072d6ea45543a08fa7f3ec7f09e15a
           Boot ID: 07bda2ea90614d46b4c5cd244b26e8bd
    Virtualization: microsoft
  Operating System: Ubuntu 20.04.4 LTS
            Kernel: Linux 5.13.0-1021-azure
      Architecture: x86-64

Any help will be really appreciated. Thank you in advance.

@swaroopbhatk swaroopbhatk changed the title mbt run-in with -c throws error on github actions MBT run-in with -c throws error on GitHub actions - Ubuntu 20.04.4 LTS Apr 20, 2022
@buddhike
Copy link
Member

buddhike commented May 2, 2022

Thanks for reporting this issue @swaroopbhatk. Just curious, does this happen only when you have one commit in your repo?

@hightoxicity
Copy link

Hi @swaroopbhatk , your issue looks like the same as the one I had few weeks ago (#146). You should check that your CI is not doing a swallow git checkout of your repository, it could explain why mbt get nil when trying to look at git history.

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

3 participants