ekristen / aws-nuke

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

SIGSEGV: segmentation violation on route53-resolver-rules.go:159 #287

Closed tmax22 closed 2 months ago

tmax22 commented 2 months ago

looks exactly the same as this issue https://github.com/rebuy-de/aws-nuke/issues/1134. but it strange because it apears to be solved in https://github.com/ekristen/aws-nuke/pull/15

my error:

eu-west-1 - Route53ResolverRule - rslvr-autodefined-rr-internet-resolver (Internet Resolver) - [ID: "rslvr-autodefined-rr-internet-resolver", Name: "Internet Resolver"] - filtering DomainName "."
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=0x435c3f0]

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.(*Route53ResolverRule).String(0xc000992180)
      github.com/ekristen/aws-nuke/v3/resources/route53-resolver-rules.go:159 +0x50
github.com/ekristen/libnuke/pkg/nuke.(*Nuke).Filter(0xc000744280, 0xc000d5a8a0)
      github.com/ekristen/libnuke@v0.18.0/pkg/nuke/nuke.go:433 +0x222
github.com/ekristen/libnuke/pkg/nuke.(*Nuke).runScanner(0xc000744280, {0x6ca4478?, 0xc0000be050?}, 0xc0003a68a0, 0xc000728318)
      github.com/ekristen/libnuke@v0.18.0/pkg/nuke/nuke.go:387 +0x245
github.com/ekristen/libnuke/pkg/nuke.(*Nuke).Scan(0xc000744280, {0x6ca4478, 0xc0000be050})
      github.com/ekristen/libnuke@v0.18.0/pkg/nuke/nuke.go:412 +0x1b6
github.com/ekristen/libnuke/pkg/nuke.(*Nuke).Run(0xc000744280, {0x6ca4478, 0xc0000be050})
      github.com/ekristen/libnuke@v0.18.0/pkg/nuke/nuke.go:198 +0xda
github.com/ekristen/aws-nuke/v3/pkg/commands/nuke.execute(0xc000050480)
      github.com/ekristen/aws-nuke/v3/pkg/commands/nuke/nuke.go:205 +0x180a
github.com/urfave/cli/v2.(*Command).Run(0xc00040e000, 0xc000050480, {0xc00037e8d0, 0x3, 0x3})
      github.com/urfave/cli/v2@v2.27.2/command.go:276 +0x9dd
github.com/urfave/cli/v2.(*Command).Run(0xc00040e6e0, 0xc000050340, {0xc000050080, 0x4, 0x4})
      github.com/urfave/cli/v2@v2.27.2/command.go:269 +0xc2e
github.com/urfave/cli/v2.(*App).RunContext(0xc000474000, {0x6ca4210?, 0xa818e40}, {0xc000050080, 0x4, 0x4})
      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

a workaround for now would be filtering the default Internet Resolver by:

Route53ResolverRule:
  - property: Name
    value: "Internet Resolver"
ekristen commented 2 months ago

@tmax22 what version are you running? aws-nuke --version

tmax22 commented 2 months ago

latest v3.17.3.

ekristen commented 2 months ago

Can you please run and provide me the output, please sanitize any account ids.

aws route53resolver list-resolver-rules 
ekristen commented 2 months ago

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

The release is available on GitHub release

Your semantic-release bot :package::rocket: