ARMmaster17/Captain

DEB package does not remove binaries/configuration

Closed this issue · 2 comments

General Information

  • This is a: bug report
  • Captain version: main
  • OS: Debian 10 x64 LXC
  • Proxmox version: v6.3-3

Issue Report

2:05PM DBG building new plane PlaneName=tfwip1.firecore.lab
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xae4d02]

goroutine 11 [running]:
github.com/Telmate/proxmox-api-go/proxmox.(*Client).GetNextID(0x0, 0x0, 0x2b, 0xc00029f250, 0xb)
        /root/go/pkg/mod/github.com/!telmate/proxmox-api-go@v0.0.0-20210517153043-5b9c621ea0cd/proxmox/client.go:766 +0x72
github.com/ARMmaster17/Captain/ATC/drivers/providers.ProxmoxLxcProviderDriver.BuildPlane(0x0, 0xc0003944b0, 0x0, 0x0, 0xc0003944b0, 0xc0003b97a8)
        /src/Captain/ATC/drivers/providers/ProxmoxLxcProviderDriver.go:71 +0x7de
github.com/ARMmaster17/Captain/ATC/drivers.BuildPlaneOnAnyProvider(0xc0003944b0, 0xc0003944b0, 0x0, 0x0, 0x13)
        /src/Captain/ATC/drivers/ProviderDriverManager.go:24 +0x21b
main.(*Plane).buildPlane(0xc0002db900, 0x0, 0x0)
        /src/Captain/ATC/Plane.go:108 +0x1d4
main.(*Plane).BeforeCreate(0xc0002db900, 0xc00039ddd0, 0xc0002db900, 0x7f7f01447c80)
        /src/Captain/ATC/Plane.go:78 +0x2da
gorm.io/gorm/callbacks.BeforeCreate.func1(0xcc0d40, 0xc0002db900, 0xc00039ddd0, 0xcc0d01)
        /root/go/pkg/mod/gorm.io/gorm@v1.21.10/callbacks/create.go:25 +0xc2
gorm.io/gorm/callbacks.callMethod(0xc00039cc60, 0xc0003b9a08)
        /root/go/pkg/mod/gorm.io/gorm@v1.21.10/callbacks/callmethod.go:20 +0x2d1
gorm.io/gorm/callbacks.BeforeCreate(0xc00039cc60)
        /root/go/pkg/mod/gorm.io/gorm@v1.21.10/callbacks/create.go:14 +0x8e
gorm.io/gorm.(*processor).Execute(0xc00033d9a0, 0xc00039cc60, 0xd24b4a)
        /root/go/pkg/mod/gorm.io/gorm@v1.21.10/callbacks.go:130 +0x447
gorm.io/gorm.(*DB).Save(0xc000379860, 0xcc0d40, 0xc0002db900, 0x9)
        /root/go/pkg/mod/gorm.io/gorm@v1.21.10/finisher_api.go:87 +0x72f
main.builder.buildPlane(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /src/Captain/ATC/Builder.go:44 +0x1f7
created by main.(*Formation).launchBuilder
        /src/Captain/ATC/Formation.go:121 +0x257

Just a guess, this is because the base objects for each method are not pointer objects, so the session object is initialized, but then lost when the method returns.

Unable to replicate on Windows 10 x64 with Ubuntu 18.04 LTS WSL2. Must be specific to this particular server/Debian.

Found the issue. When running apt-get remove captain-atc it does not remove the old binary from /usr/local/bin, and re-installing does not install a new binary.