-
Notifications
You must be signed in to change notification settings - Fork 67
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 buffer overflow #272
Comments
Works just fine on linux. I increased it to 30k and it just consumes a lot of memory. Are you running out of memory? Is the OOM killer invoked? On my machine it consume somewhere around 5-6 GB of RAM. |
Yeah, I see it's really consumes so much memory. I don't think it's an OOM killer. I'm stuck with 32 system because of a main application (my app is a dynamic library). |
If you're on a 32-bit system then you could address at most 4 GB, maybe more with extended addressing, can you check if it's OOM? Not sure what you mean by "disable this handler". |
I know about this 4 GB limitation and it is a reason of crashes. I need to find workaround to use this cool UDP library. pub struct CongestionHandler {}
impl CongestionHandler {
pub fn new(config: &Config) -> CongestionHandler {
CongestionHandler {}
}
pub fn process_incoming(&mut self, _incoming_seq: u16) {}
pub fn process_outgoing(&mut self, _seq: u16, _time: Instant) {}
} |
Where are you getting the idea from that it's the congestion handler? Can you check the kernel log for OOM messages? |
I got a crash log with backtrace (there is an external library that gets it when the app crashes) and it looks like this:
And what about the kernel log I'll talk to the server administrator. Also I don't get why |
That indeed looks like OOM. You could try editing the capacity of the internal sequencebuffer to be smaller. Then each sequence buffer can grow as demand requires it. This will incur some more allocations during run-time though. Currently we do
Maybe that data structure needs to be changed to a HashSet instead since 65536 elements of type So we can try to make the capacity lower, or replace the functionality by a HashMap or HashSet. |
It's about ~766 kB for each connection, because So, the questions is can I remove this |
I'm not fixing this since I don't need it. You can try it yourself. Try removing it and check if all tests succeed. It would be appreciated if you could make a pull request for any fix you find. |
Please mention |
There is a critical bug with
CongestionHandler
.You can easily get
STATUS_STACK_BUFFER_OVERRUN
error on Windows with like 3000 virtual connections. Also this can be reproduced on Linux servers. Today I have bad feedback because my application causes crashes on real working servers.This test is able to show what I'm talking about
Error message I got from cargo:
The text was updated successfully, but these errors were encountered: