LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

linux memory leak

Dear LabVIEWers
We are having problems with an application running in a small embedded computer based on the Via Eden/C3. the application performs different networking tasks through a TCP connection. The fact is that the same application running in the developer machine (PIII, Madriva Linux 2006 kernel 2.6) runs fine but at the target machine (VIA Eden/C3 with the same linux distro) exhibits a memory leak (about 1M every 30 minutes) and finally crashes. We were suspecting about some problems with unclosed references (of a control or the network connection). but I must say that a simple Wait loop with an stop button (and a wait of some miliseconds)  exhibit the same problem at the target machine (VIA eden/c3) that is, a memory leak. Maybe the labview runtime has some problems with this cpu architecture? (it is supposed that is intel compatible isn't it?). Any help will be welcome.

thanks in advance
0 Kudos
Message 1 of 7
(3,689 Views)
Hi anireno,

this behaviour sounds strange. We have LabVIEW with NIDAQmx and VISA running on flash systems with really small resources running stable for days and weeks.
There are, however, known but undocumented memory leaks in LabVIEW.
I had the same problem with a leak in one of my apps that killed my system afer 3 days.
Here the problem was a waveform chart. Using waveform charts fills up your memory, no matter how big the "history length" is. This is a NI-known fact on EVERY OS (Windows, Linux, Solaris,...) since August 2006 but it has not been fixed yet. (I think I will open an angy thread about publishing known bugs and using bugzilla...).

In general Via Eden/C3 should work fine. We have been using those for a while but switched to a more rugged and long-time-available board some time ago.

Can you give me a little bit more information on your system? Are you running Madriva 2006 on your VIA-Board? Do you have hardware drivers as wenn (VISA, NIDAQmx,...) or just the plain LabVIEW Runtime Engine?

Are you sure LV is eating the memory?
Have you tried to trace the memory usage? You probably know how to do that, eg using pmap -x <PID>.

I usually write the memory usage to file every minute or so (sleep 60). In bash this could look like this (replace myapp with the name of your app):

while (( 1 )); do pmap -x $(ps aux|grep myapp|grep -v grep|awk '{print $2}')|grep 'total kB'>>memlog.txt;sleep 60;done

( this command: $(ps aux|grep myapp|grep -v grep|awk '{print $2}') just fetches the process ID  for you.)

I hope this helps a little bit.
If you are interested in a gentoo-based 70MB flash-OS let me know. The system we use should run on some VIA-boards (but not all. Problem is VIA changes chipsets like underwear and you never know what you get when you by a new one. There are even differences between EDEN and EDEN-processors. And on a small flashdisk-OS you just can't support every network driver in the world)
We have LV8.0 and NIDAQmx, a VNC server, samba, ftp, ssh, scp, busybox integrated.
The reason we didn't publish it is that you have to have a little bit linux background to install it (eg grub-configuration) and the documentation is not really brilliant. And the LV-RTE is not GNU anyways (why?? who knows)

so long

-DB
0 Kudos
Message 2 of 7
(3,652 Views)
Dear Bef, I think I´ve solved the problem (more or less). Finally I realized that the problem was not the LabVIEW app but the  Linux itself.  Yes, I know it sounds strange, but I have installed different Slackware versions (I know that is not officially supported, but It´s a nice to handle distro), and even running Linux at level 1 (one user) the "top" command shows a leak of 1MB every couple of minutes. I did the test also under virtual machines intallation (qemu) and the behaviour was the same. At the end I have installed Mandriva 2006 under the VIA hardware and the LabVIEW application is working fine.

The application has several x-y graphs (simulated as charts 🙂   ) and is performing TCP/IP communications with a server developed also in LabVIEW.
What kind of hardware are you using at this moment?. We choose VIA for its price and fanless capabilities. But I would like to know what are you using.

Of course I am very interested in your gentoo OS. The application is now installed in a 40GB small laptop harddisk and I would like to decrease the size of my OS 🙂 (1GB)
We would like to develop an embedded system with DAQ using LabVIEW. Your gentoo solution sounds very good. Don´t worry for the quality of the documentation.
You can contact me directly (see email in my profile)
Best regards

0 Kudos
Message 3 of 7
(3,644 Views)
hi anireno,

I can't see your e-mail address in your profile. my address: bergmannsvm-tec.de
-DB
0 Kudos
Message 4 of 7
(3,636 Views)

@bef wrote:
hi anireno,

I can't see your e-mail address in your profile. my address: bergmannsvm-tec.de


woops, there should have been an "@" after bergmann!
-DB
0 Kudos
Message 5 of 7
(3,632 Views)
Oops!
My name is Anibal
aniren@gmail.com (private)
aniren@cartif.es (office)
0 Kudos
Message 6 of 7
(3,630 Views)
Your web looks nice but German speaking is on my TODO list 🙂
0 Kudos
Message 7 of 7
(3,626 Views)