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

CompactStorage fails and terminates agent will panic #101

Closed
ardias opened this issue Sep 10, 2020 · 1 comment · Fixed by #102
Closed

CompactStorage fails and terminates agent will panic #101

ardias opened this issue Sep 10, 2020 · 1 comment · Fixed by #102
Labels
bug Categorizes issue or PR as related to a bug.

Comments

@ardias
Copy link
Contributor

ardias commented Sep 10, 2020

CompactStorage at the start of the agent can make the agent panic when walking the storeage dir:

time="2020-09-08T19:01:28+02:00" level=fatal msg="runtime error: invalid memory address or nil pointer dereference" stacktrace="goroutine 1 [running]:\nruntime/debug.Stack(0xc0000c46a8, 0xce59c0, 0x15ce320) /usr/local/go/src/runtime/debug/stack.go:24 +0x9d\ngithub.com/newrelic/infrastructure-agent/pkg/helpers/recover.PanicHandler(0x0) /go/src/github.com/newrelic/infrastructure-agent/pkg/helpers/recover/recover.go:30 +0x51\npanic(0xce59c0, 0x15ce320) /usr/local/go/src/runtime/panic.go:975 +0x3e3\ngithub.com/newrelic/infrastructure-agent/internal/agent/delta.(*Store).StorageSize.func1(0xc02a265000, 0x7c, 0x0, 0x0, 0x1031c20, 0xc0239a69f0, 0x0, 0x0) /go/src/github.com/newrelic/infrastructure-agent/internal/agent/delta/store.go:272 +0x2b\npath/filepath.walk(0xc02a26c620, 0x62, 0x1049b40, 0xc02a2781a0, 0xc0000c4b00, 0x0, 0x0) /usr/local/go/src/path/filepath/path.go:380 +0x20c\npath/filepath.walk(0xc028524780, 0x33, 0x1049b40, 0xc02807e820, 0xc0000c4b00, 0x0, 0x0) /usr/local/go/src/path/filepath/path.go:384 +0x2ff\npath/filepath.walk(0xc000799aa0, 0x27, 0x1049b40, 0xc02807e270, 0xc0000c4b00, 0x0, 0xc022105ae0) /usr/local/go/src/path/filepath/path.go:384 +0x2ff\npath/filepath.Walk(0xc000799aa0, 0x27, 0xc0000c4b00, 0xc0000c4b08, 0xc000ceaf30) /usr/local/go/src/path/filepath/path.go:406 +0xff\ngithub.com/newrelic/infrastructure-agent/internal/agent/delta.(*Store).StorageSize(0xc00047d020, 0xc000799aa0, 0x27, 0xc00417e840, 0xc01c7b9740, 0xc0000c4abd) /go/src/github.com/newrelic/infrastructure-agent/internal/agent/delta/store.go:271 +0x66\ngithub.com/newrelic/infrastructure-agent/internal/agent/delta.(*Store).CompactStorage(0xc00047d020, 0xc000ceaf30, 0x2f, 0x1400000, 0x0, 0x0) /go/src/github.com/newrelic/infrastructure-agent/internal/agent/delta/store.go:243 +0x41\ngithub.com/newrelic/infrastructure-agent/internal/agent.(*patchSenderIngest).Process(0xc00417e840, 0x0, 0x0) /go/src/github.com/newrelic/infrastructure-agent/internal/agent/patch_sender.go:162 +0x50f\ngithub.com/newrelic/infrastructure-agent/internal/agent.(*Agent).sendInventory(0xc000184800, 0xc00016ceb0) /go/src/github.com/newrelic/infrastructure-agent/internal/agent/agent.go:942 +0xbe\ngithub.com/newrelic/infrastructure-agent/internal/agent.(*Agent).Run(0xc000184800, 0x0, 0x0) /go/src/github.com/newrelic/infrastructure-agent/internal/agent/agent.go:920 +0x9f1\nmain.initializeAgentAndRun(0xc000426300, 0x0, 0xc000470150, 0x2a, 0xc0004b83c0, 0x1d, 0xc0001edc80, 0x34, 0xc0004700f0, 0x28, ...) /go/src/github.com/newrelic/infrastructure-agent/cmd/newrelic-infra/newrelic-infra.go:323 +0x1cb7\nmain.main() /go/src/github.com/newrelic/infrastructure-agent/cmd/newrelic-infra/newrelic-infra.go:165 +0x80b\n"

@ardias ardias added the bug Categorizes issue or PR as related to a bug. label Sep 10, 2020
@varas
Copy link
Contributor

varas commented Sep 10, 2020

Fixed at #102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants