ekristen / aws-nuke

Remove all the resources from an AWS account
https://ekristen.github.io/aws-nuke/
MIT License
64 stars 8 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #221

Closed deekayw0n closed 1 month ago

deekayw0n commented 1 month ago

version: 3.5.1

after running successfully in no-dry-run a few times all the way to completion, randomly received the following SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x43557ff on an additional run. Ran again without receiving it.

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x43557ff]

goroutine 1 [running]:
main.main.func1()
    github.com/ekristen/aws-nuke/v3/main.go:26 +0x54
panic({0x52a3820?, 0xa7d6a30?})
    runtime/panic.go:914 +0x21f
github.com/ekristen/aws-nuke/v3/resources.(*RDSSnapshot).Properties(0xc002baa1b0)
    github.com/ekristen/aws-nuke/v3/resources/rds-snapshots.go:103 +0x13f
github.com/ekristen/libnuke/pkg/queue.(*Item).GetProperty(0xc000afb860, {0xc0001f9400, 0x9})
    github.com/ekristen/libnuke@v0.18.0/pkg/queue/item.go:76 +0x12e
github.com/ekristen/libnuke/pkg/nuke.(*Nuke).Filter(0xc0004b21e0, 0xc000afb860)
    github.com/ekristen/libnuke@v0.18.0/pkg/nuke/nuke.go:465 +0xa9b
github.com/ekristen/libnuke/pkg/nuke.(*Nuke).runScanner(0xc0004b21e0, {0x6ca4478?, 0xc0000ad0e0?}, 0xc0000cd920, 0xc0007a0000)
    github.com/ekristen/libnuke@v0.18.0/pkg/nuke/nuke.go:387 +0x245
github.com/ekristen/libnuke/pkg/nuke.(*Nuke).Scan(0xc0004b21e0, {0x6ca4478, 0xc0000ad0e0})
    github.com/ekristen/libnuke@v0.18.0/pkg/nuke/nuke.go:412 +0x1b6
github.com/ekristen/libnuke/pkg/nuke.(*Nuke).Run(0xc0004b21e0, {0x6ca4478, 0xc0000ad0e0})
    github.com/ekristen/libnuke@v0.18.0/pkg/nuke/nuke.go:198 +0xda
github.com/ekristen/aws-nuke/v3/pkg/commands/nuke.execute(0xc000050280)
    github.com/ekristen/aws-nuke/v3/pkg/commands/nuke/nuke.go:205 +0x180a
github.com/urfave/cli/v2.(*Command).Run(0xc000502000, 0xc000050280, {0xc0001c51e0, 0xb, 0xb})
    github.com/urfave/cli/v2@v2.27.2/command.go:276 +0x9dd
github.com/urfave/cli/v2.(*Command).Run(0xc0005026e0, 0xc000050140, {0xc0001b4000, 0xc, 0xc})
    github.com/urfave/cli/v2@v2.27.2/command.go:269 +0xc2e
github.com/urfave/cli/v2.(*App).RunContext(0xc0000be200, {0x6ca4210?, 0xa818e40}, {0xc0001b4000, 0xc, 0xc})
    github.com/urfave/cli/v2@v2.27.2/app.go:333 +0x5db
github.com/urfave/cli/v2.(*App).Run(...)
    github.com/urfave/cli/v2@v2.27.2/app.go:307
main.main()
    github.com/ekristen/aws-nuke/v3/main.go:46 +0x1eb
ekristen commented 1 month ago

It looks like this is having issue with the SnapshotCreateTime property.

ekristen commented 1 month ago

:tada: This issue has been resolved in version 3.5.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

deekayw0n commented 1 month ago

You are my hero - lightning fast resolution. Thanks for bringing this repo back to life!