-
Notifications
You must be signed in to change notification settings - Fork 105
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
SSL enabled server hangs on request #201
Comments
Same here, any updates on this? |
There's open issue and PR in |
Same for me. Will check at tiny_http level maybe... |
This has been fixed in PR #231 updates rouille's tiny_http version to 0.7.0. Merging that and releasing new rouille should fix this issue. |
This was killing me for a while! |
Excellent news, I'll close the issue and if it pops up again feel free to reopen. |
I take it back! Will try to give more info in a bit. |
Hmm not even #231 seems to work. Apologies, I don't know any more advanced techniques to say exactly what is going wrong, it seems to just be hangs when returning the response. If I What makes this especially weird is that my main browser seems to have accepted the site (at first it was having issues too) and now it works entirely fine every time. |
Hmmm!!! Quick findings are: It seems to maybe sometimes only allow the first connection of a process in? It wasn't letting my firefox session in, I restarted the process, it let it in, now it works fine (even after restarting the process). However trying to do the same for my android chrome didn't work. I'm a bit lost!
I can't see any real patterns here! It seems to be a weird mess, perhaps it has to do with:
But I can't seem to find a pattern nor solution. Once again, will have a better look when I have a bit more time. If anyone else could also investigate that would be much appreciated. |
Thanks for continuing to investigate this, based on what you've added so far, I suspect request ordering is at fault, it could be that depending on the browser, it might open one or more connections, and depending on which of those succeeds the page either appears to work or does not. I'll try the SSL example from the repo on the off chance that reproduces the issue, if not, if you could drop a minimal example here that would be great. |
Unfortunately I'm not able to reproduce this when I wrap I tested both the I think your assessment and link to the HTTPS fix in tiny-http is likely to be related, a cursory glance at the change leads me to believe it's a bit of a work around that the browsers may or may not tolerate. |
I'll try to do some more testing, the biggest annoyance to this is that it is unreliable to reproduce and seems to not really be reproducable for a given machine:browser combination once they are working. Not entirely sure how one might change between the executors, I'm using whatever the default is with a loop which |
The PR references fixing a deadlock, but at least at first glance it doesn't look like it should have been dead locking there in the first place. The added synchronisation would have the side effect of changing the timings which could mask a deadlock from elsewhere. I'll keep investigating too. |
Maybe it is working now (?!) I can't reproduce again. I'll try getting rid of the changes I've added beyond current rouille and report back. |
I've gotten rid of all of the changes I've added and cannot reproduce. Very weird. Would appreciate others who have had issues with SSL in this thread giving rouille latest a test. For now, until I find issues, I'll leave it be. |
It turns out it was unfair to blame tiny-http/tiny-http#151! The PR description is inaccurate, it refers to the TLS Socket accept call being that which holds a lock preventing the request from being responded to. In fact it's the reader side of the accepted This code is most likely to get exercised by a client that does HTTP request pipelining, maybe that's something you can try playing with while you try and reproduce? |
Honestly I am far from experienced enough in the HTTP space to even understand what "HTTP request pipelining" is, if/when I get some time I'll make an effort to research it, test it, and report back. Until then it seems to be working fine. |
Not sure if its related to this exact issue but, I was seeing the an ssl enabled server hang for curl, but not for firefox, which oddly enough resolved itself when I forced curl to use IPV4 ( |
I seem to be having the exact same issue as described at the end of #90: the server starts OK with a valid cert and key but hangs after receiving a request. The provided gist (https://gist.github.com/CamJN/4369785b198a6dd513f75c8ad24023bd) hangs too.
rustc 1.31.1
on debian
rouille version: 3.0.0
The text was updated successfully, but these errors were encountered: