LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

App runs for 29 days, then sends CPU to 100%. Have you seen this before?

Dear all,
 
I have a CVI 5.5 application running on a number of WinNT machines.  After 29 days (plus about 6 hours) the application suddenly takes 100% of the CPU.  Has anyone seen this before?
 
My application is acting as a TCP server, and starts a client connection to talk to instances of the application running on a number of other machines on the LAN.  I typically run with 4 PCs in a system.  Each instance sends status information about the machine to the others, the data rate being about 300 bytes per connection, once per second.
 
I can set the application running on each machine, and the memory usage and number of handles is stable.  Then, suddenly, after 29 days, the CPU will usage max out.  The effect is that the application GUI becomes unresponsive, but I know the program is still ticking away and is not locked in any of my while-loops.  I know this because the timer callback that drives the app is still causing logging at a 'normal' rate, and is still actioning the client calls to send data to the other machines.
 
Task Manager reports 5 threads for the app while it's running, yet it only starts one other (apart from the main program) - to control the client connections.  I know this connection thread is not causing the lock-up, because it has a Sleep call, and also logs to the log file.  Hence the lock-up must be one of the 3 remaining threads of the CVI run-time.
 
This problem is not seen on Windows 2000 or XP.
 
So has anyone experienced anything like this in the past?
 
Thanks in advance.
 
Ian.
0 Kudos
Message 1 of 3
(2,964 Views)
Ian, there ase a couple of hints about running a program for several days long ending with its UI frozen. I point you to this discussion that can be useful for you.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(2,934 Views)

Thanks for your response Robert, much appreciated.

However, I don't think that any of the points in the link are relevant to my problem.  Although my application does use a timer, it does not use the eventDataX parameters that are passed into the timer callback.  Furthermore, I am sure that my program is not stuck in any of my code, as I have logging in all while loops, which is not seen when the problem occurs after the 29 days. 

(Also, I can't make 29 days + 6 hours fit into a reasonable x^y number of seconds or ms!!!)

It makes sense that something is going into a loop and not returning, because the UI locks up and the CPU goes 100%.  But I can't see how it can be my code that's doing this.

I am toying with the idea of taking out the timer and replacing it with a thread.  But even this may not solve the problem if it's due to an interaction between CVI5.5 and NT4.  I would like to know if anyone has had similar problems with this combination.

Thanks.

Ian.

0 Kudos
Message 3 of 3
(2,912 Views)