lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Sockets: select_waiting overflow


From: Joan Lledó
Subject: Re: [lwip-devel] Sockets: select_waiting overflow
Date: Tue, 4 Jul 2017 13:05:56 +0200

2017-07-03 20:42 GMT+02:00 Stian Skjelstad <address@hidden>:

>
>  What is your application design since you happen to hit this assertion? Are
> you not properly keeping track of your file descriptors and sometimes ends
> up with the a "zombie" file descriptor in an another thread, or some kind of
> memory-corruptions?
>

In my implementation, if you call select() to read from a fd_set with,
say, three sockets, then lwip_select() is called three times in three
different threads, one for each socket. When there's an event in one
of them, the other two threads keep waiting, if timeout is null, then
those two threads never return. This leads sshd to create hundreds of
threads in a matter of seconds.

It's a particular problem of my implementation, when fixed, there will
never be hundreds of threads in the stack.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]