Azure / batch-insights

One liners to enable Application insights on azure batch
MIT License
24 stars 16 forks source link

Crash in v1.1.0 using standard_d2s_v3 VMs #27

Closed JimiSmith closed 5 years ago

JimiSmith commented 5 years ago

The app insights uploader crashes with the following stacktrace

Using v1.1.0, VMs are all standard_d2s_v3

File path: D:\batch\tasks\startup\wd\node-stats.err.log

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

goroutine 1 [running]:
github.com/Azure/batch-insights/pkg.AppInsightsService.UploadStats(0x788a20, 0xc0000058a0, 0xc0000ee000, 0x0, 0x0, 0x0, 0xc000014ca0, 0x2, 0x2, 0x0, ...)
    D:/a/1/s/pkg/appinsights.go:43 +0x495
github.com/Azure/batch-insights/pkg.ListenForStats(0xc000024090, 0xb, 0xc00000a150, 0x26, 0xc00000a180, 0x24)
    D:/a/1/s/pkg/batchinsights.go:73 +0x3f4
main.main()
    D:/a/1/s/main.go:32 +0x321
JimiSmith commented 5 years ago

I can see stats coming through for some VMs, but the majority have this crash

timotheeguerin commented 5 years ago

Hhm intresting, what OS are you using? and is it CloudService or VirtualMachine?

timotheeguerin commented 5 years ago

Is there any other errors before, it seems by looking at the stack trace the disk statistics are null wondering if it logged an error for that

timotheeguerin commented 5 years ago

I got a fix could you try it

Update the download url to https://batchapppackage.blob.core.windows.net/downloads/batch-insights.exe

JimiSmith commented 5 years ago

Thanks for the quick response!

The OS is WindowsServer 2016-Datacenter. Using Virtual Machines in batch. I'll try the fix out tomorrow and let you know the results

JimiSmith commented 5 years ago

Looks like it works now with the updated binary. Thanks!