-
Notifications
You must be signed in to change notification settings - Fork 7
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
Example either crash or hangs on Windows #22
Comments
Hi @qonn! Thanks for bringing up these issues. Apparently the CI has fallen out of sync with Pony releases, which I'm going to fix now. I've just switched the primary branch to "main" instead of "master", and updated the dependencies to support the latest release version of the compiler. You should now be able to run the tests by just cloning the repo and running |
Hi @Theodus, no problem! Thanks for the fix, it is easier to get things running now. unfortunately, I did another fresh initialization of jennet, the same example (corral add & corral fetch now works fine). Retest using Also, running |
I don't use Windows, but I suspect a reasonable fix would be to replace fun ref respond(res: BuildableResponse iso, res_body: ValBytes = []) =>
"""
Respond to the given request with the response.
"""
if res_body.size() > 0 then
res.add_header("Content-Length", res_body.size().string())
end
_responder(consume res, ByteArrays(res_body), this) Feel free to open a PR if this fix works for you, or if you have an alternative suggestion. Also, if you have had a Pony program crash (like a segfault). it would be good to have some more detail about that because that may be a bug somewhere in the Pony libraries we depend on. |
When I run the main example on Windows, it's either crash (2%) or just hang after several concurrent requests (98%).
Expected Behavior
Pony should never crash or hang once compiled! At least based on jennet implementation, it doesn't really do that much.
Current Behavior
Everything compiled nicely, but once I run the wrk tool via Ubuntu WSL
wrk -c100 -d30s --latency http://127.0.0.1:8080/
. It will crash or just hang forever instantly within 2 seconds. No errors, nothing. Just a feeling of emptiness.Current Workaround
I managed to get this working by always adding a
Content-Length
header to the BuildableResponse, I pretty much use my own BuildableResponse, instead of using the one provided here:Original:
jennet/jennet/jennet.pony
Lines 172 to 186 in 6ed62c9
Mine:
Steps to Reproduce
jennet-test
corral init
corral add github.com/ponylang/http_server.git
main
as the main branch so corral will fail. Thus we have to manually clone the jennet git into _corral folder in thejennet_test/_corral/github_com_theodus_jennet
corral run -- ponyc --define openssl_0.9.0
wrk -c100 -d30s --latency http://127.0.0.1:8080/
Context (Environment)
0.41.1 [release]
Compiled with: LLVM 9.0.1 -- MSVC-19.28.29335.0-x64 1928
Notes:
It works fine when building & running in a linux environment, just 100x much more slower somehow (might be due to WSL?):
0.41.1-4553e6cf [release]
Compiled with: LLVM 9.0.1 -- Clang-6.0.0-x86_64
Defaults: pic=true
The text was updated successfully, but these errors were encountered: