Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV: segmentation violation code when running backup alertsconditions #9

Open
ramneetm opened this issue Nov 28, 2018 · 5 comments
Labels
bug Something isn't working v0.1.5

Comments

@ramneetm
Copy link

SIGSEGV: segmentation violation code
$ ./nr backup alertsconditions -d /Users/rmalhotra
Start to backup all alertsconditions to '/Users/rmalhotra' folder
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1378246]

goroutine 1 [running]:
github.com/IBM/newrelic-cli/cmd/get.GetMonitorByID(0xc00018d140, 0x24, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/Users/rmalhotra/go/src/github.com/IBM/newrelic-cli/cmd/get/get_monitor.go:89 +0x3c6
github.com/IBM/newrelic-cli/cmd/backup.glob..func1(0x18b2c60, 0xc00007a8c0, 0x0, 0x2)
/Users/rmalhotra/go/src/github.com/IBM/newrelic-cli/cmd/backup/backup_alertsconditions.go:145 +0x526
github.com/spf13/cobra.(*Command).execute(0x18b2c60, 0xc00007a880, 0x2, 0x2, 0x18b2c60, 0xc00007a880)
/Users/rmalhotra/go/src/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0x18b2080, 0x18b2540, 0x18b7ac0, 0x0)
/Users/rmalhotra/go/src/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0x18b2080, 0x1005390, 0xc00007e058)
/Users/rmalhotra/go/src/github.com/spf13/cobra/command.go:800 +0x2b
github.com/IBM/newrelic-cli/cmd.Execute()
/Users/rmalhotra/go/src/github.com/IBM/newrelic-cli/cmd/root.go:56 +0x2d
main.main()
/Users/rmalhotra/IBM/newrelic-cli/nr.go:20 +0x20

@gaochan-1
Copy link
Contributor

Hi @ramneetm

Thank for your requesting, I will take a look at it.

Thanks!
Chan Gao

@gaochan-1
Copy link
Contributor

Hi @ramneetm

I can not reproduce this backup alertsconditions problem in my testing env. It may be caused by some specific data in your NewRelic account.

The error occurred while calling GetMonitorByID(), can you please backup the all Synthetics monitors and send me to take a look if how are different?

Thanks!
Chan Gao

@gaochan-1 gaochan-1 added the bug Something isn't working label Dec 5, 2018
@asomensari
Copy link

@ramneetm Can you share the New Relic account (account number) you are using for this test? I will try to replicate the problem

@ramneetm
Copy link
Author

@gaochan-1
Copy link
Contributor

@ramneetm

I restored the monitors you sent me and I created alert conditions,did the backup alertsconditions, although there are some error output, but it still succeed.

So far, It seems that it was difficult to identify root cause.

Start to backup all alertsconditions to 'bak_conditions' folder
invalid character '<' looking for beginning of value
invalid character '<' looking for beginning of value
invalid character '<' looking for beginning of value
invalid character '<' looking for beginning of value

OperationName           StatusCode   Description   Message
Get Alert Channels      200          Success       pageCount:1
Get Alert Channels      200          Success       pageCount:2
Get Alert Policies      200          Success       pageCount:1
Get Alert Policies      200          Success       pageCount:2
Get Monitor By ID       200          Success       monitor id: 16dd9c4a-56c4-4718-8439-a4b34eaad5ea, monitor name: Scripted broswer test using se builder
Get Labels              200          Success       pageCount:1
Get Labels              200          Success       pageCount:2
Get Monitors By Label   200          Success       pageSize:20,pageOffset:0
Get Monitors By Label   200          Success       pageSize:20,pageOffset:0
Get Monitor Script      200          Success       monitor id: 16dd9c4a-56c4-4718-8439-a4b34eaad5ea, monitor name: Scripted broswer test using se builder
Get Monitor By ID       200          Success       monitor id: 7c1aec59-025e-49eb-8333-b80fd2c15359, monitor name: Test Monitor
Get Labels              200          Success       pageCount:1
Get Labels              200          Success       pageCount:2
Get Monitors By Label   200          Success       pageSize:20,pageOffset:0
Get Monitors By Label   200          Success       pageSize:20,pageOffset:0
Get Monitor By ID       200          Success       monitor id: 44256f55-fefc-4a5f-88b6-4ce232ce4c7d, monitor name: example login pwd
Get Labels              200          Success       pageCount:1
Get Labels              200          Success       pageCount:2
Get Monitors By Label   200          Success       pageSize:20,pageOffset:0
Get Monitors By Label   200          Success       pageSize:20,pageOffset:0
Get Monitor Script      200          Success       monitor id: 44256f55-fefc-4a5f-88b6-4ce232ce4c7d, monitor name: example login pwd
Get Monitor By ID       200          Success       monitor id: b95957b9-0c0a-4f33-b18a-26bbba567d9e, monitor name: testclimonitor
Get Labels              200          Success       pageCount:1
Get Labels              200          Success       pageCount:2
Get Monitors By Label   200          Success       pageSize:20,pageOffset:0
Get Monitors By Label   200          Success       pageSize:20,pageOffset:0

FileName                                                              OperationStatus
bak_conditions/Test Policy-367484.alert-conditions.bak   success


Backup alert conditions, total: 1, success: 1, fail: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v0.1.5
Projects
None yet
Development

No branches or pull requests

3 participants