ucall: Bug: Cannot call the server
Describe the bug
After creating a custom server in python using ujrpc
and starting the server, on sending a request server terminates.
This also happens while using examples/sum/ujrpc_server.py
directly from inside the codebase.
SERVER:
CLIENT (cURL):
Tried sending request using cURL, Postman with & without any data.
However, running the benchmarks run successfully.
Steps to reproduce
System: W11, WSL2 Python 3.10.6 pip 23.0.1 virtualenv 20.20.0
- Clone the project
- Create a virtual environment & source it
- install all required packages
pip install uvicorn fastapi websocket-client requests tqdm fire
- run the server
python examples/sum/ujrpc_server.py
- request using cURL or Postman
Expected behavior
- Calling with / without data should not terminate the server
- Calling with proper data & method should return valid data
UJRPC version
0.0.9
Operating System
W11-WSL2-Ubuntu22.04
Hardware architecture
x86
Which interface are you using?
Official Python bindings
Which implementation are you using?
POSIX
Contact Details
No response
Is there an existing issue for this?
- I have searched the existing issues
Code of Conduct
- I agree to follow this project’s Code of Conduct
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 22 (4 by maintainers)
thanks @biplobmanna ^^ I was a bit blind. That fixes it.
@ashvardanian you were interested in benchmarks. If you have some commands you’d like me to run, please let me know.
As we have not tested on
WSL
, it is difficult to predict what issues may arise. @biplobmanna it would be better to open a separate feature request specifically forWSL
. Similarly, if @thomanq encounters any other reproducible issues, new issues should be opened accordingly.However, it appears that the specific issue related to
Illegal instruction (core dumped)
has been resolved, so i guess this issue can be closed @ashvardanian.Trying with
ujrpc.uring
:I’m getting segfaults for every case.
Killed all processes previously exited -> still segfault. Restarted WSL and redo -> still segfault
max_threads=8
-> still segfaultmax_threads=1
-> still segfaultMaybe this issue is with WSL? 🤔
Also, slight correction to the cURL request. It was missing a
}
in the data portion.I generally use Postman for these, and here’s the full cURL for that (if it helps):
Thank you, @thomanq! We will follow up soon.
As for the endpoint, it will remain
http://localhost:8545/
for all endpoints. Unlike REST, with JSON-RPC, the function name and arguments are always provided in the payload, and not in the URI.Using that code from the README:
I still get:
when visiting
http://localhost:8545/
. I guess it should be a 404? Same issue visitinghttp://localhost:8545/sum
orhttp://localhost:8545/sum?a=1&b=2
I reinstalled with the above command.
Trying to use ujrpc.uring I get a ModuleNotFoundError. Not sure what I’d have to do to test that.
The error message
Illegal instruction (core dumped)
was coming fromsimdjson
. We upgraded to the latest version, and it appears that the issue has been resolved. I suggest that you try again after the new version is released and see if the problem is resolved on your end.I also get
Illegal instruction (core dumped)
. CPU:AMD Ryzen 7 4800U
Kernel:Linux 6.2
Python3.11.0
implementation:Posix
ujrpc0.2.3