ni / grpc-labview

gRPC client and server support for LabVIEW
MIT License
88 stars 62 forks source link

gRPC response not shown consistently #217

Closed yijueli closed 1 year ago

yijueli commented 1 year ago

gRPC version: v0.5.2.3

This is an issue that highly effects the ADAS system stability. After long runtime or some wrong connections , we cannot get gRPC response unless the VI is closed and opened again.

It's hard to reproduce the long-run case which worries us a lot. But l made an example(gRPC Response Issue.zip) to reproduce the issue after a wrong connection. Try the steps below one more times if you cannot reproduce the issue for the first time. Steps:

  1. Open the Test. lvproj and connect a RT target.
  2. Open gRPC Client Test.vi and Run Service.vi. image
  3. Run Run Service.vi.
  4. In gRPC Client Test.vi, input "localhost" and the grpc port from Run Service.vi into the address as the picture below. You can get the expected -1014 error if you set an enough long timeout. image
  5. Stop the gRPC Client Test.vi and input the right RT address and the grpc port into the address. Then you can see the issue: NO ERROR, NO RESPONSE! You can stop the vi and rerun it, the issue still exists. image
  6. Close the gRPC Client Test.vi and reopen it, it works normally.

In addition, l found the other issue during the process. When l connected a wrong port which did not provide gRPC services and requested Greeter service in a loop, it sometimes threw -1004 error and sometimes -1014 error alternately. The problem misled us to locate other issues. image image

AB#2262093

AB#2272017

AB#2381674

shivaprasad-basavaraj commented 1 year ago

@yijueli I tried to reproduce this behavior but when I run the unary call of the helloworld project in a loop with the wrong address I consistently get an error -1014 mentioning it failed to connect to the address. You can see my modification to the helloworld client below. Does this resemble the client VI you were running?

image

If not can you share your example project?

-1004 is the deadline exceeded exception. Did you have any timeouts wired to your Unary call? That could explain the -1004 errors especially if the machine/network was under load so that it couldn't even contact the server before the deadline exceeded.

yijueli commented 1 year ago

@shivaprasad-basavaraj Yes, l set the timeout. In addition, l updated the issue content and gave an example to reproduce the more important issue for us.

gaoruhao commented 1 year ago

@shivaprasad-basavaraj Thanks for looking into this. This issue has been bothering our customers for some time. Until last week, we finally find a way to reproduce it without our ADAS code. Please help prioritize it. Thank you.

ni-sujain commented 1 year ago

@yijueli @gaoruhao With the above steps I could not re-create the problem. One way I could replicate this issue was through aborting the client vi. I could replicate without RT target

After Step 4. we should abort the client vi and at Step 5. re-enter correct address and re-run the VI and then we can "No-error No response" issue.