-
Notifications
You must be signed in to change notification settings - Fork 4
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
stack overflow :( #1
Comments
64420 requests at most till overflow |
it stays alive if run by plain lua, but it certainly leaks, as htop shows |
https://github.com/wg/wrk -- fast http perf testing tool |
so the trace states we over-inserting head table in response |
I'm working on this finally. I can't seem to find where the stack is leaking frames. |
so do i. may be the event loop is not tail-recursive? |
I traced the queues in continuable, and they stay constant max length. I logged a stack trace on every request right before the exception happens, and the stack length is constant too (about 10 calls deep). |
but you are able to replicate the issue, right? |
I am able to replicate with luajit 2.0.0, but for lua 5.1.5 I get different error message: |
notice, that we don't stop reading at all in current master. i tried to cope with that at https://github.com/dvv/luv-2/commit/4cdecc4713e99af6e3b817b631c497efeaf63599#L3R135 |
I have got an answer from Mike Pall:
Well, you're most certainly overflowing the Lua stack if you get |
Oh, that stack! That's easy to fix...
|
Fixed in luvit/luv@789eea6 |
i can't see any improvement. I added -DLUV_CHECK_STACK=1 to Makefile but the issue remained. |
Are you sure you're using the updated luv version? Also what server are you running. I was using a modified version of test-web.lua that skipped the middlewares and manually set the content length in the main app. |
All's well now. |
I posted some comments to you at IRC -- please consider answering |
So do non-keep-alive requests (like "wrk -H 'Connection: close' ") work for you? It does not work for me, and for keep-alive, it crashes after the last request. |
apply last chunks of http://busybox.net/~dvv/luv-1.patch -- for some reason @creationix haven't applied them to the core. |
It is better now, but still Connection: close requests break the test-web.lua example:
|
confirmed. afaics we respond with HTTP/1.1 hardcoded. will look into this |
7f878e3#commitcomment-2173869 |
$ test-web.lua & $ wrk -c1000 -r1000000 -t2 http://localhost:8080/
server crashes:
The text was updated successfully, but these errors were encountered: