gruntwork-io / cloud-nuke

A tool for cleaning up your cloud accounts by nuking (deleting) all resources within it
https://gruntwork.io/
MIT License
2.81k stars 358 forks source link

Panic when running cloud-nuke with telemetry enabled #703

Closed jeremyoverman closed 6 months ago

jeremyoverman commented 6 months ago

Hi! I just downloaded cloud-nuke and got a panic when running the executable without DISABLE_TELEMETRY=true. With telemetry disabled, it works file. I'm running this on WSL2 with Ubuntu 22.04.

$ wget https://github.com/gruntwork-io/cloud-nuke/releases/download/v0.35.0/cloud-nuke_linux_amd64
...
$ chmod +x cloud-nuke_linux_amd64
$ mv cloud-nuke_linux_amd64 ~/.bin/cloud-nuke
$ cloud-nuke
 WARNING  This program sends telemetry to Gruntwork. To disable, set DISABLE_TELEMETRY=true as an environment variable

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/gruntwork-io/cloud-nuke/telemetry.InitTelemetry({0x2e5b005, 0xa}, {0x33bfa50, 0x7})
        /home/circleci/project/telemetry/telemetry.go:19 +0x1b1
github.com/gruntwork-io/cloud-nuke/commands.CreateCli({0x33bfa50, 0x7})
        /home/circleci/project/commands/cli.go:30 +0xbf
main.main()
        /home/circleci/project/main.go:12 +0x25
$ DISABLE_TELEMETRY=true cloud-nuke
NAME:
   cloud-nuke - A CLI tool to nuke (delete) cloud resources.

USAGE:
   cloud-nuke [global options] command [command options] [arguments...]
...
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:        22.04
Codename:       jammy
$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         39 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  8
  On-line CPU(s) list:   0-7
Vendor ID:               GenuineIntel
  Model name:            11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    CPU family:          6
    Model:               140
    Thread(s) per core:  2
    Core(s) per socket:  4
    Socket(s):           1
    Stepping:            1
    BogoMIPS:            5606.42
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_
                         good nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq vmx ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f1
                         6c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep
                          bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx512vbmi umip avx
                         512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid movdiri movdir64b fsrm avx512_vp2intersect md_clear flush_l1d arch_capabilities
Virtualization features: 
  Virtualization:        VT-x
  Hypervisor vendor:     Microsoft
  Virtualization type:   full
Caches (sum of all):     
  L1d:                   192 KiB (4 instances)
  L1i:                   128 KiB (4 instances)
  L2:                    5 MiB (4 instances)
  L3:                    12 MiB (1 instance)
Vulnerabilities:         
  Gather data sampling:  Unknown: Dependent on hypervisor status
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Mitigation; Enhanced IBRS
  Spec rstack overflow:  Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl and seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Enhanced IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
  Srbds:                 Not affected
  Tsx async abort:       Not affected

Not a blocker since I can just disable telemetry but wanted to make you aware. I'm happy to share any more troublshooting information you need.

Thanks!