Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: 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://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Repeater Crashing

Post Reply
Nick_od
40
40
Posts: 80
Joined: 2013-09-04 06:42

Repeater Crashing

Post by Nick_od »

After some time, Repeater Crashing
version: repeater16082013.zip 16-Aug-2013 23:25 203K
test on Windows SP3

I found where it happens

file "webgui\settings.c"

This procedure is throwing an exception and system crash:

Code: Select all

void win_log(char *line) { /* Also used in log.c */
    struct LIST *curr=NULL;
    int len;
    static int log_len=0;
    len=strlen(line);
    curr=(struct LIST *)malloc(sizeof(struct LIST)+len);
    curr->len=len;
    strcpy(curr->txt, line);
    curr->next=NULL;

    if(tail)
        tail->next=curr;
    tail=curr;
    if(!head)
        head=tail;
    log_len++;
    while(log_len>LOG_LINES) {
        curr=head;
        head=head->next;
        free(curr);       <------------------------------------------- exception here
        log_len--;
    }

}
Can you fix this?
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6831
Joined: 2004-04-23 10:21
Contact:

Re: Repeater Crashing

Post by Rudi De Vos »

At first look, nothing is wrong .
But multiple instances can call the log function, if this happen in the same ms..stange thing can happen.
I"m adding a criticalsection to make it threadsafe. Don't know if this gonna solve it
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6831
Joined: 2004-04-23 10:21
Contact:

Re: Repeater Crashing

Post by Rudi De Vos »

bin+src zip updated
Nick_od
40
40
Posts: 80
Joined: 2013-09-04 06:42

Re: Repeater Crashing

Post by Nick_od »

The program is stable for 3 days without fail.
I test with 10 servers.

I have another question.
What do I need to change. What would Ultravnc server connected to the Repeater and stay connected 30 minutes.
Now they connect + - 8 min. and then reconnect.
Nick_od
40
40
Posts: 80
Joined: 2013-09-04 06:42

Re: Repeater Crashing

Post by Nick_od »

Сan you help me please? :cry:

Now UltaVNC server to connect to the Repeater and connected it to 7-8 minutes and then re connect again to the Repeater.

What do I need to change, that would server UltraVNC connected to the Repeater and has been connected to it for 30 minutes and then re connected?

How can I change this time interval?
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6831
Joined: 2004-04-23 10:21
Contact:

Re: Repeater Crashing

Post by Rudi De Vos »

Are you sure the repeater disconnect and it's not the port that close after 8 minutes of inactivity.
As far as i can remember there is nothing in the repeater source for it, but sockets close if no data has been send for x time.
Nick_od
40
40
Posts: 80
Joined: 2013-09-04 06:42

Re: Repeater Crashing

Post by Nick_od »

Greetings.
I ran the test Repeater. at 50-100 UltraVNC servers.
Found a bug or a programming error.
This problem occurs 1-2 times a day.
The program does not show the error and continues to work.
But realistically, the program is not working properly.

The problem is that the thread is not closed and remains in memory.
The server shows that the connection is broken, but the connection is not physically closed.
The server can not create a new thread, because the previous thread is not complete close.


Here are my pictures I hope you'll understand what I'm trying to show you.
http://imageshack.us/photo/my-images/59/rclq.png/
http://imageshack.us/photo/my-images/29/lq9t.png/
Prisma
100
100
Posts: 320
Joined: 2005-10-27 15:50

Re: Repeater Crashing

Post by Prisma »

To give a positive feedback: We also had random crashes very often. I figured out that it most likely had to with connected servers hanging on the repeater without having a corresponding viewer connected. After Rudi's fix from 2013-09-14 these crashes disappeared also. I haven't understood this post 100%, so, is my scenario the described scenario? Within the last 2 months the repeater crashed only one single time.

Nearly back to old stability! Tank you both! What about the last post of Nick_od? Is this also resolved?
Nick_od
40
40
Posts: 80
Joined: 2013-09-04 06:42

Re: Repeater Crashing

Post by Nick_od »

I found another bug.
I need a few more days for testing.
I will write if the error prove to be true.
Nick_od
40
40
Posts: 80
Joined: 2013-09-04 06:42

Re: Repeater Crashing

Post by Nick_od »

1) Repater shows that the ID server UltraVNC connected.
But as soon as I try to connect to this ID.
Repater indicates that the connection is established.
But this connection is not really as there is no server connected to UltraVNC Repeater.
No password request because the server is not physically connected to the Repeater.
But Repater shows that the server is connected to Ultravnс Repater
Image

2) Repeater after some time there are many compounds with one IP (Ultravnс server) on the same port.
Constantly increasing number of connections.
But really I do not have as many connections established.
The picture shows an example.
Image
Prisma
100
100
Posts: 320
Joined: 2005-10-27 15:50

Re: Repeater Crashing

Post by Prisma »

Once again with your Image ;)
Image
Nick_od
40
40
Posts: 80
Joined: 2013-09-04 06:42

Re: Repeater Crashing

Post by Nick_od »

1) Repater shows that the ID server UltraVNC connected.
But as soon as I try to connect to this ID.
Repater indicates that the connection is established.
But this connection is not really as there is no server connected to UltraVNC Repeater.
No password request because the server is not physically connected to the Repeater.
But Repater shows that the server is connected to Ultravnс Repater
Repeater sometimes incorrectly closes the connection Ultravnс server.
Repeater continues to show that the server is connected.
But really it is not connected.
Repeater continues to show a large number of established connections with the server UltraVNC in "TCPview".
atenasinfo
Posts: 5
Joined: 2013-11-20 11:06

Re: Repeater Crashing

Post by atenasinfo »

Yes ,
I have the same problem !
Nick_od
40
40
Posts: 80
Joined: 2013-09-04 06:42

Re: Repeater Crashing

Post by Nick_od »

Hi Rudi
You can fix this bug? or is it impossible to fix. :cry:

Looks like a similar situation here https://forum.ultravnc.net/viewtopic.php?f=47&t=30578
Post Reply