Page 1 of 1

vpnserver - bug in socket polling

Posted: Tue Feb 14, 2023 8:35 am
by jayjay7000
The vpnserver application, and either l2tp or sstp code, is doing recvfrom() on all open vpn sockets in loop instead of testing with epoll. This causes 100% cpu, specially with many users, since recvfrom just returns etryagain.

This is seen in current stable version and multiple older stable versions

Re: vpnserver - bug in socket polling

Posted: Tue Feb 14, 2023 3:25 pm
by shakibamoshiri
jayjay7000 wrote:
Tue Feb 14, 2023 8:35 am
The vpnserver application, and either l2tp or sstp code, is doing recvfrom() on all open vpn sockets in loop instead of testing with epoll. This causes 100% cpu, specially with many users, since recvfrom just returns etryagain.

This is seen in current stable version and multiple older stable versions
Have you seen that in DE version ?
https://github.com/SoftEtherVPN/SoftEtherVPN

Worth mentioning it that has been reported for 5 (DE version) as well :|
https://github.com/SoftEtherVPN/SoftEth ... ssues/1756

Re: vpnserver - bug in socket polling

Posted: Wed Feb 15, 2023 1:18 am
by jayjay7000
havent tested DE, but I see that several others are having the same issues.
It should be fairly easy to fix for a person familiar with the code.

Re: vpnserver - bug in socket polling

Posted: Wed Feb 15, 2023 6:55 am
by shakibamoshiri
jayjay7000 wrote:
Wed Feb 15, 2023 1:18 am
havent tested DE, but I see that several others are having the same issues.
It should be fairly easy to fix for a person familiar with the code.
You might go and share this on Github.
I think there will be a reason why they have chosen that method.