Closed ehaligow closed 1 year ago
After running ./dm addpollingrfapi with dummy value: intel@ubuntu:functional_test$ ./dm addpollingrfapi 192.168.40.149:8888:admin:asdasd transport is closing manager pod crashes.
intel@ubuntu:functional_test$ ./dm addpollingrfapi 192.168.40.149:8888:admin:asdasd transport is closing
intel@ubuntu:OCP-DeviceManager$ kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system calico-kube-controllers-7c5dd46f7d-2b78l 1/1 Running 0 12h kube-system calico-node-2vw8z 1/1 Running 0 12h kube-system coredns-558bd4d5db-72zm7 1/1 Running 0 12h kube-system coredns-558bd4d5db-w2tlk 1/1 Running 0 12h kube-system etcd-ubuntu 1/1 Running 0 12h kube-system kube-apiserver-ubuntu 1/1 Running 0 12h kube-system kube-controller-manager-ubuntu 1/1 Running 0 12h kube-system kube-proxy-lsl4w 1/1 Running 0 12h kube-system kube-scheduler-ubuntu 1/1 Running 0 12h manager cord-kafka-0 1/1 Running 1 12h manager cord-kafka-zookeeper-0 1/1 Running 0 12h manager device-management-5f6c9cb4cb-7hss4 0/1 CrashLoopBackOff 1 10h
Logs:
time="05-10-2022 19:50:11.177525" level=info msg="Received AddPollingRfAPI" panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x78 pc=0xa47a6c] goroutine 25 [running]: main.getHTTPBodyByRfAPI(0xc000198690, 0x13, 0xc0000b2248, 0x7, 0x1, 0x0, 0x0, 0xc0000b23cb, 0x5, 0xc0000b23d0, ...) /home/intel/IdeaProjects/OCP-DeviceManager/src/httpAPIs.go:113 +0x14c main.getHTTPBodyDataByRfAPI(0xc000198690, 0x13, 0xc0000b2248, 0x7, 0x1, 0x0, 0x0, 0xc0000b23cb, 0x5, 0xc0000b23d0, ...) /home/intel/IdeaProjects/OCP-DeviceManager/src/httpAPIs.go:147 +0xbe main.(*Server).getDeviceData(0xc000192840, 0xc000198690, 0x13, 0xc0000b2248, 0x7, 0xc000181e00, 0x5, 0x1, 0xbc3bbc, 0x9, ...) /home/intel/IdeaProjects/OCP-DeviceManager/src/httpAPIs.go:280 +0x2c5 main.(*Server).addPollingRfAPI(0xc000192840, 0xc000198690, 0x13, 0xc000181e00, 0x5, 0xc0000b2248, 0x7, 0xc0001fb908, 0x2, 0x2) /home/intel/IdeaProjects/OCP-DeviceManager/src/collect_data.go:143 +0xdc main.(*Server).AddPollingRfAPI(0xc000192840, 0xca88e0, 0xc000247d10, 0xc00024c820, 0xc000192840, 0xc000247d10, 0xc00006cba0) /home/intel/IdeaProjects/OCP-DeviceManager/src/grpcAPIs.go:896 +0x509 devicemanager/proto._DeviceManagement_AddPollingRfAPI_Handler(0xbbe7a0, 0xc000192840, 0xca88e0, 0xc000247d10, 0xc0001852c0, 0x0, 0xca88e0, 0xc000247d10, 0xc0001b46f0, 0x24) /home/intel/IdeaProjects/OCP-DeviceManager/src/proto/manager.pb.go:2727 +0x214 google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000fc000, 0xcafcb8, 0xc000001500, 0xc0002da000, 0xc00009a720, 0x105ab08, 0x0, 0x0, 0x 0) /home/intel/IdeaProjects/OCP-DeviceManager/src/vendor/google.golang.org/grpc/server.go:1082 +0x52b google.golang.org/grpc.(*Server).handleStream(0xc0000fc000, 0xcafcb8, 0xc000001500, 0xc0002da000, 0x0) /home/intel/IdeaProjects/OCP-DeviceManager/src/vendor/google.golang.org/grpc/server.go:1405 +0xccf google.golang.org/grpc.(*Server).serveStreams.func1.1(0xc00002a950, 0xc0000fc000, 0xcafcb8, 0xc000001500, 0xc0002da000) /home/intel/IdeaProjects/OCP-DeviceManager/src/vendor/google.golang.org/grpc/server.go:746 +0xab created by google.golang.org/grpc.(*Server).serveStreams.func1 /home/intel/IdeaProjects/OCP-DeviceManager/src/vendor/google.golang.org/grpc/server.go:744 +0xa5
After running ./dm addpollingrfapi with dummy value:
intel@ubuntu:functional_test$ ./dm addpollingrfapi 192.168.40.149:8888:admin:asdasd transport is closing
manager pod crashes.Logs: