diogomonica / actuary

An actuary is a business professional who analyzes the financial consequences of risk.
77 stars 14 forks source link

Fedora 23 (possibly others) - incompatible kernel version causes application to crash #12

Closed thanasisk closed 8 years ago

thanasisk commented 8 years ago

Hi all,

it looks like it is hashicorp/go-version related

Kernel Version: 4.4.6-301.fc23.x86_64

in my upcoming PR I have added a temporary handler for this kind of incompatibilities, however I believe that this should be addressed in the upstream

[akostopoulos@linux actuary]$ sudo ./actuary -f ../../default.toml
2016/04/27 09:29:36 Running Audit: Host Configuration
[WARN] - 1.1 Create a separate partition for containers 
     Containers NOT in seperate partition

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x51add5]

goroutine 1 [running]:
panic(0x868d20, 0xc8200100d0)
    /usr/local/go/src/runtime/panic.go:464 +0x3e6
github.com/hashicorp/go-version.(*Version).String(0x0, 0x0, 0x0)
    /home/akostopoulos/go/src/github.com/hashicorp/go-version/version.go:242 +0x775
github.com/hashicorp/go-version.(*Version).Compare(0x0, 0xc82018e2c0, 0x8f6d90)
    /home/akostopoulos/go/src/github.com/hashicorp/go-version/version.go:85 +0x33
github.com/hashicorp/go-version.constraintGreaterThanEqual(0x0, 0xc82018e2c0, 0x8f6d90)
    /home/akostopoulos/go/src/github.com/hashicorp/go-version/constraint.go:137 +0x2b
github.com/hashicorp/go-version.(*Constraint).Check(0xc820192680, 0x0, 0x0)
    /home/akostopoulos/go/src/github.com/hashicorp/go-version/constraint.go:91 +0x32
github.com/hashicorp/go-version.Constraints.Check(0xc8201a6010, 0x1, 0x1, 0x0, 0xc82018c820)
    /home/akostopoulos/go/src/github.com/hashicorp/go-version/constraint.go:71 +0x69
github.com/diogomonica/actuary/audit/dockerhost.CheckKernelVersion(0xc820108120, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /home/akostopoulos/go/src/github.com/diogomonica/actuary/audit/dockerhost/dockerhost.go:77 +0x198
main.main()
    /home/akostopoulos/go/src/github.com/thanasisk/actuary/cmd/actuary/main.go:89 +0x69e
zuBux commented 8 years ago

Thanks for reporting this! Indeed on my machine kernel version is somewhat different

Kernel Version: 3.13.0-85-generic

which might explain why this issue wasn't detected.

thanasisk commented 8 years ago

Thanks for the quick reply! Who will open an issue with upstream? Me or you?

zuBux commented 8 years ago

I guess the issue has already been mentioned here along with a fix

zuBux commented 8 years ago

Temporary fix https://github.com/diogomonica/actuary/pull/13/commits/f1b3fb7c253b37e08081867981ca3871b7212c26 until upstream fixes the issue.