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

Encountered a segmentation fault (SIGSEGV) with "invalid memory address or nil pointer dereference" error while running AFT sensors with logging enabled #39

Open
penieljacobpaulg opened this issue Jun 10, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@penieljacobpaulg
Copy link

While running AFT sensors with logging enabled using the specified configuration, I encountered a runtime error: "invalid memory address or nil pointer dereference." The error message is as follows:

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

goroutine 78 [running]:
main.jLogInternalJtimonForGnmi(0xc000436000, 0xc0004b5200, 0xc000555090)
/Users/amohit/go/src/jtimon/internal_jtimon.go:130 +0x6f
main.gnmiHandleResponse(0xc000436000, 0xc000555090)
/Users/amohit/go/src/jtimon/subscribe_gnmi.go:407 +0xb0d
main.subscribegNMI.func1()
/Users/amohit/go/src/jtimon/subscribe_gnmi.go:555 +0x189
created by main.subscribegNMI
/Users/amohit/go/src/jtimon/subscribe_gnmi.go:516 +0x72f

JSON configuration:

{
"host": "[2001:4860::192:168:0:5]",
"port": 10162,
"user": "csim",
"password": "Juniper123",
"gnmi": {
"mode": 0,
"encoding": 2
},
"cid": "r5_ocst_ext_1",
"vendor": {
"gnmi": {
"encoding": "protobuf"
}
},
"grpc": {
"ws": 5242880
},
"eos": true,
"internal-jtimon": {
"data-log-file": "TelemetrySensorData.log"
},
"tls": {
"clientcrt": "/home/csim/B2_2024/certs/client/client.crt",
"clientkey": "/home/csim/B2_2024/certs/client/client.key",
"ca": "/home/csim/B2_2024/certs/ca/ca.crt",
"servername": "R6"
},
"paths": [
{
"path": "/network-instances/network-instance/afts/",
"freq": 300000,
"gnmi_submode": 2
},
{
"path": "/network-instances/network-instance/mpls/signaling-protocols/rsvp-te/sessions/session/record-route-objects/",
"freq": 0,
"gnmi_submode": 1
}
]
}

@penieljacobpaulg
Copy link
Author

@M-Vivek @amohit1315 please look into it

@amohit1315
Copy link
Collaborator

The above panic error is seen because juniper header extension value was nil. Have added checks for this now to avoid parsing results, if its nil

@amohit1315 amohit1315 added the bug Something isn't working label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants