-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
How to observe a dead loop. #4758
Comments
What is "do something"? If it does not include Without the function returning you will never have your If you want to see the progress of an unterminated loop you need to create and end a span each iteration of the loop. |
I mean how do I find out when my code never terminates? |
Add a timeout to the loop itself, so it can't never terminate ? |
Loop is just one possibility.Maybe it's a deadlock... |
If you have infinite and unchecked loops or deadlocks, you'll end up with CPU/memory being used for nothing, and a leak. That should be tracked and fixed in your code, I'm not sure traces should be handling it. Profiling could be something that helps you there. |
I can't pinpoint the problem fast enough for the loop that won't terminate. ( Maybe the function is not being called, or not requested)
|
Problem Statement
If there's a bug in my code, it's a dead loop.
In this case the trace cannot find out where the program is looping.
Should a span timeout be added?
like
Start(ctx,"name",Timeout(time.Minute ))
.The text was updated successfully, but these errors were encountered: