Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: https://forum.uvnc.com/viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
Important: Please update to latest version before to create a reply, a topic or an issue: https://forum.uvnc.com/viewtopic.php?t=37864
Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://x.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc
[SOLVED] Repeater 100% processor usage
[SOLVED] Repeater 100% processor usage
Continuing problem https://forum.ultravnc.net/viewtopic.php?t=30236 here.
Last edited by Prisma on 2013-08-26 11:53, edited 2 times in total.
Re: [BUG] Repeater 100% processor usage
Applied a hotfix to source code. Dirty but anyway...
Code: Select all
while(notwebstopped)
{
sessions = wi_poll();
if( sessions < 0 )
{
dtrap(); /* restart the server thread?? */
Sleep(1); /*<----------------- */
}
}
- Rudi De Vos
- Admin & Developer
- Posts: 6865
- Joined: 2004-04-23 10:21
- Contact:
Re: [BUG] Repeater 100% processor usage
this seems a better solution
Add an extra while loop and close/restart socket on error.
Add an extra while loop and close/restart socket on error.
Code: Select all
DWORD WINAPI ThreadStartWeb(LPVOID lpParam)
{
int sessions = 0;
while(notwebstopped)
{
int old_port=0;
int error=-1;
WORD wVersionRequested;
WSADATA wsaData;
int err;
sessions = 0;
wVersionRequested = MAKEWORD( 2, 2 );
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 ) {
return 0;
}
printf("Webio server starting...\n");
error = wi_init();
old_port=saved_portHTTP;
while (error<0)
{
dprintf("wi_init error %d\n", error);
saved_portHTTP++;
error = wi_init();
}
if (old_port!=saved_portHTTP)
{
char text[200];
sprintf(text,"The defined web port is already in use. \nChanged to http://localhost:%i \nVerify settings!\n Default user and password is admin.",saved_portHTTP);
MessageBox(NULL,text,"UltraVnc Repeater: Warning",MB_ICONEXCLAMATION);
}
/* Install our port-local authentication routine */
emfs.wfs_fauth = wfs_auth;
while(notwebstopped)
{
sessions = wi_poll();
if( sessions < 0 )
{
// dtrap(); This doesn't do anything on win32 platform.
goto dtrap;
}
}
dtrap:
closesocket(wi_listen);
WSACleanup( );
}
return sessions;
}
- Rudi De Vos
- Admin & Developer
- Posts: 6865
- Joined: 2004-04-23 10:21
- Contact:
Re: [BUG] Repeater 100% processor usage
Downloaded and running (for now) in debugger. We'll see. THX Rudi.
Re: [BUG] Repeater 100% processor usage
Hello Rudi,
that wasn't it. Now the socket seems to be not restarted. Until restart of the whole process, the repeater keeps working but the website keeps being unavailable.
that wasn't it. Now the socket seems to be not restarted. Until restart of the whole process, the repeater keeps working but the website keeps being unavailable.
- Rudi De Vos
- Admin & Developer
- Posts: 6865
- Joined: 2004-04-23 10:21
- Contact:
Re: [BUG] Repeater 100% processor usage
It's a hell to test, i install a securityb tool to test websites to generate a lot of data.
Found another one
missing wi_delsess(sess);
session don't get removed, so you keep getting the socket error in a loop
Found another one
missing wi_delsess(sess);
session don't get removed, so you keep getting the socket error in a loop
Code: Select all
case WI_POSTRX:
/* See if there is more to read */
error = recv(sess->ws_socket,
sess->ws_rxbuf + sess->ws_rxsize,
sizeof(sess->ws_rxbuf) - sess->ws_rxsize, 0);
if(error < 0)
{
if(errno == EWOULDBLOCK)
error = 0;
else
{
error = errno;
dprintf("sock recv error %d\n", error );
wi_delsess(sess); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<ADD
return WIE_SOCKET;
}
}
- Rudi De Vos
- Admin & Developer
- Posts: 6865
- Joined: 2004-04-23 10:21
- Contact:
Re: [BUG] Repeater 100% processor usage
found some other...
src+bin in same folder (repeater16082013.zip)
src+bin in same folder (repeater16082013.zip)
Re: [BUG] Repeater 100% processor usage
New code runnig in our VS2010...
Re: [BUG] Repeater 100% processor usage
Stable until now. 100% processor usage should have happened within a few day. But it didn't. I mark this thread pre-empting as solved.