-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Bug] RPC Server Python Exception Can't Be Send to RPC Client #16707
Comments
@tqchen @Lunderberg Can you help to see whether it is relevant to the changes of #15596? It is important for us to fix this issue, because Q1 release is coming, thanks. |
maybe indeed related to #15596 @Lunderberg seems we need to stringify python errors if they are caught by RPC |
Agreed. The full stack trace is in the python object, so we should be able to serialize it for RPC use. Prior to #15596, the full stack trace was embedded into the string error message, which worked with RPC transfers, but made it quite difficult to track nested levels of error messages. I'm thinking that RPC's serialization will be the reverse of the parsing that occurs here, so that the stack trace objects can be rebuilt when received. (Though, missing the full python variable information available within a non-RPC |
@Lunderberg can you help on this one ? |
Thank you for the ping, and I probably can in a few weeks, but am currently low on available time. |
After upgrade with the V0.15.0, we found the RPC have a bug, if the RPC server have some exception, we can't see the error message in RPC client like below.
After some investigations, I found only if the exception is raise by a Python packed function will cause this issue, like the below experiment, the C++'s exception is thrown to Python side correctly, then the Python throw it again will lose the error message, the RPC client only can receive the exception but the error message in it is empty.
![image](https://private-user-images.githubusercontent.com/19802523/312078112-2b982e95-7540-4bb2-b7f0-1f42ea3144d1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNjU4MTYsIm5iZiI6MTczOTA2NTUxNiwicGF0aCI6Ii8xOTgwMjUyMy8zMTIwNzgxMTItMmI5ODJlOTUtNzU0MC00YmIyLWI3ZjAtMWY0MmVhMzE0NGQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDAxNDUxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVmM2ExZjhjNTVlNDFkYjA3YjBkMTEyMmRjYjVkOWE1YTM1NTA1NzEzZjE0YTU4YWYzMGExNTUwN2VhOTI4ZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.KX3ubYkl_f_5ybkfypHfwQnncC-TNjM95IzrWDOQRk0)
If the exception is happened in a pure C++ remote packed function, then the error message is correctly sent back to the RPC client.
How to reproduce ?
just hard code a
raise "xxxxx"
in the function begin ofload_module
inpython/tvm/rpc/server.py
, or other Python packed function, and then call it in RPC client.The text was updated successfully, but these errors were encountered: