maliceio / malice

VirusTotal Wanna Be - Now with 100% more Hipster
Apache License 2.0
1.65k stars 265 forks source link

malice not work #90

Closed MortezaMoFa closed 5 years ago

MortezaMoFa commented 5 years ago

Describe the bug

All enabled plugins not installed would you like to install them now? (yes/no) [Warning] This can take a while if it is the first time you have ran Malice.

Output of :

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

goroutine 1 [running]:
github.com/maliceio/malice/malice/docker/client/image.Pull(0xc0003886c0, 0xc00035b230, 0xd, 0xb29d3a, 0x6)
    /Users/blacktop/go/src/github.com/maliceio/malice/malice/docker/client/image/image.go:40 +0x95
github.com/maliceio/malice/plugins.UpdateEnabledPlugins(0xc0003886c0)
    /Users/blacktop/go/src/github.com/maliceio/malice/plugins/plugins.go:257 +0x2b0
github.com/maliceio/malice/commands.cmdUpdatePlugin(0x0, 0x0, 0x1, 0x0, 0xc00021d740)
    /Users/blacktop/go/src/github.com/maliceio/malice/commands/plugin.go:161 +0x20f
github.com/maliceio/malice/commands.glob..func8(0xc0000a6c60, 0x0, 0xc0000a6c60)
    /Users/blacktop/go/src/github.com/maliceio/malice/commands/commands.go:138 +0xc1
github.com/maliceio/malice/vendor/github.com/urfave/cli.HandleAction(0xa26280, 0xb52c08, 0xc0000a6c60, 0xc00021d700, 0x0)
    /Users/blacktop/go/src/github.com/maliceio/malice/vendor/github.com/urfave/cli/app.go:490 +0xc8
github.com/maliceio/malice/vendor/github.com/urfave/cli.Command.Run(0xb29ef6, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb2dde7, 0xd, 0x0, ...)
    /Users/blacktop/go/src/github.com/maliceio/malice/vendor/github.com/urfave/cli/command.go:210 +0x990
github.com/maliceio/malice/vendor/github.com/urfave/cli.(*App).RunAsSubcommand(0xc000093520, 0xc0000a69a0, 0x0, 0x0)
    /Users/blacktop/go/src/github.com/maliceio/malice/vendor/github.com/urfave/cli/app.go:379 +0x7ef
github.com/maliceio/malice/vendor/github.com/urfave/cli.Command.startApp(0xb29dac, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb39c48, 0x1f, 0x0, ...)
    /Users/blacktop/go/src/github.com/maliceio/malice/vendor/github.com/urfave/cli/command.go:298 +0x808
github.com/maliceio/malice/vendor/github.com/urfave/cli.Command.Run(0xb29dac, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0xb39c48, 0x1f, 0x0, ...)
    /Users/blacktop/go/src/github.com/maliceio/malice/vendor/github.com/urfave/cli/command.go:98 +0x1237
github.com/maliceio/malice/vendor/github.com/urfave/cli.(*App).Run(0xc000093380, 0xc00007e000, 0x4, 0x4, 0x0, 0x0)
    /Users/blacktop/go/src/github.com/maliceio/malice/vendor/github.com/urfave/cli/app.go:255 +0x687
main.main()
    /Users/blacktop/go/src/github.com/maliceio/malice/main.go:88 +0x4b2

Additional context

uname -a
Linux ubuntu 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

on vmware

blacktop commented 5 years ago

So that is a weird things where the dockerHUB is failing and returning an error EOF, I have noticed that if you try again it usually works. I will be adding some smart "retry" functionality soon to at least not crash when that happens