-
Notifications
You must be signed in to change notification settings - Fork 61
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
jsaddle-warp browser DOS on the Haskell program (stuck on sendTextData) #97
Comments
It seems to get stuck in this part of the loop in jsaddle.js, where batch[2] is always equal to expectedBatch - 1. When it is responsive it is always batch[2] == expectedBatch.
|
If I pause the javascript debugger and resume it, it becomes un-stuck for a while. Looks like the xhr.response after the point it becomes stuck is always the same. |
I've discovered the Haskell program is stuck on It seems like the browser is flooding the Haskell program and it never has a chance to send it's data, and when I stop it with the debugger - it has a chance to catch up. |
Ok, so I think this is actually a resource starvation problem and not a websockets issue. It does not occur immediately on a big batch of commands - but only with sustained numbers, eventually this fills up some system buffer and The stuck For whatever reason there's nothing to check that xhr result batch number is not the same one is last time, so it keeps sending the same xhr and set of results over and over. A hack seems to be to use |
@saulzar thanks heaps for looking into this. What OS and browser were you testing with? Do you remember if you had this commit.
We need to make sure we don't discard any at the receiving end, but this does sound like a good plan. |
@hamishmack - Chrome 72 on Linux Ubuntu 18.04, I believe the version I was testing against had that patch. The modified version I've been using is 0.9.6 (which includes that patch). I will test again and confirm. |
I'm writing a program which draws many things on a canvas - and have found that if I draw too many things, too fast, then jsaddle-warp will freeze up. It works fine in ghcjs in-browser. A reduced version is below.
The text was updated successfully, but these errors were encountered: