[Core] [Error Message] Possible unhandled error from worker
See original GitHub issueWhen you have a remote function that handles an exception, a Possible unhandled error message is still printed on the driver side. For example,
import time
import ray
ray.init()
@ray.remote
def foo():
raise Exception("oops")
@ray.remote
def main():
i = 0
while True:
i += 1
time.sleep(1)
print(i)
try:
ray.get(foo.remote())
except:
pass
ray.get(main.remote())
Shows the following message on the driver
2020-11-13 18:03:16,514 ERROR worker.py:1036 -- Possible unhandled error from worker: ray::foo() (pid=68380, ip=192.168.2.228)
File "python/ray/_raylet.pyx", line 482, in ray._raylet.execute_task
File "<stdin>", line 3, in foo
Exception: oops
even though the exception is actually being properly handled in the remote function main. This is very confusing for the user because it implies that an error actually occurs even though it doesn’t. At the very least we should emphasize that it is a Possible unhandled error and that it can be safe to ignore this message if it is being handled.
See https://github.com/ray-project/ray/issues/5240 and https://github.com/ray-project/ray/pull/11849#issuecomment-727111327 for more examples.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:24 (21 by maintainers)
Top Results From Across the Web
Error on worker #1: Error: Debug Failure. Unhandled SyntaxKind
I am upgrading my Angular project from version 10.2.x to version 11. As per official angular update guide, when I run the command...
Read more >Worker: error event - Web APIs - MDN Web Docs
The error event of the Worker interface fires when an error occurs in the worker.
Read more >Errors | Node.js v19.3.0 Documentation
If an object is passed as message , the text message is generated by calling String(message) . If the cause option is provided,...
Read more >What is an Unhandled Exception, and How to Catch All C# ...
An exception is a known type of error. An unhandled exception occurs when the application code does not properly handle exceptions.
Read more >Troubleshoot Dataflow errors - Google Cloud
This error occurs if a single operation causes the worker code to fail four times. Dataflow fails the job, and this message is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@valiantljk the message is being shown even though no error actually occurs. Since you are using ParallelIterators, it is safe to ignore this.
It looks like you are using ParallelIterators inside a Ray task, correct? The reason why you are seeing this message is because the error is being handled in the remote worker, but not in the driver, so the message is erroneously being printed on the driver side. This is a bug on our end, and we will fix it shortly!
👌 @rkooo567