unum-cloud / ucall

Web Serving and Remote Procedure Calls at 50x lower latency and 70x higher bandwidth than FastAPI, implementing JSON-RPC & REST over io_uring ☎️
https://unum-cloud.github.io/ucall/
Apache License 2.0
1.13k stars 42 forks source link

Bug: Core dump with the uring example #94

Open MarkReedZ opened 6 months ago

MarkReedZ commented 6 months ago

Describe the bug

On Ubuntu 22 with kernel 6.0.19 with the uring example the go client hangs and wrk causes a core dump.

On Ubuntu 23.10 with the base 6.5 kernel both cases hang.

Steps to reproduce

  cmake -DCMAKE_BUILD_TYPE=Release -B ./build_release  && make -C ./build_release
  ./build_release/build/bin/ucall_example_login_uring

  go run ./examples/login/jsonrpc_client.go
    hangs
  wrk -t1 -c1 -d2s http://localhost:8545/ -s examples/login/json.lua
    core dump

Expected behavior

Curl does work fine:

curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc":"2.0","method":"validate_session","params":{"user_id":55,"session_id":21},"id":0}' http://localhost:8545/

{"jsonrpc":"2.0","id":0,"result":false}

UCall version

main branch

Operating System

Ubuntu 22.04

Hardware architecture

x86

Which interface are you using?

Native C interface

Which implementation are you using?

io_uring

Contact Details

No response

Is there an existing issue for this?

Code of Conduct

MarkReedZ commented 5 months ago

This is fixed with the following PR.

https://github.com/unum-cloud/ucall/pull/104