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: runtime error: invalid memory address or nil pointer dereference #90

Closed
jeffmccollum opened this issue Apr 30, 2020 · 2 comments
Closed

Comments

@jeffmccollum
Copy link

jeffmccollum commented Apr 30, 2020

Running Terraboard in containers, and when I get to a specific state file, the terraboard container will exit this error.

I've tried relaunching the terraboard container and it will fail as it tries to import the same state file. I've also tried removing the db container and starting fresh, and it will fail again on the same state file.

time="2020-04-30T19:52:15Z" level=info msg="Retrieving state from S3" path="path/terraform.tfstate" version_id=id
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xc8db68]

goroutine 34 [running]:
github.com/camptocamp/terraboard/db.marshalAttributeValues(0x0, 0xc0003cf140, 0xc0004e7610, 0x0)
        /go/src/github.com/camptocamp/terraboard/db/db.go:82 +0x78
github.com/camptocamp/terraboard/db.(*Database).stateS3toDB(0xc000368180, 0xc0003cea80, 0xc000027f80, 0x3b, 0xc000358900, 0x20, 0x0, 0x0, 0x0, 0x0, ...)
        /go/src/github.com/camptocamp/terraboard/db/db.go:70 +0x23a
github.com/camptocamp/terraboard/db.(*Database).InsertState(0xc000368180, 0xc000027f80, 0x3b, 0xc000358900, 0x20, 0xc0003cea80, 0x0, 0x0)
        /go/src/github.com/camptocamp/terraboard/db/db.go:114 +0xa1
main.refreshDB(0x1, 0xc000368180, 0x11f0220, 0xc0001d70e0)
        /go/src/github.com/camptocamp/terraboard/main.go:105 +0xb6b
created by main.main
        /go/src/github.com/camptocamp/terraboard/main.go:164 +0x1c12

It would be nice if an import error occurs, skip the state file and keep importing.

@raphink
Copy link
Contributor

raphink commented May 2, 2020

Thanks for the report.

Could you post the problematic state please?

@jeffmccollum
Copy link
Author

Ended up not using terraboard for the usecase I had in mind, so closing this issue.

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