11-14-2011 08:37 AM
Brad,
Thanks.
I am using DAQmx 9.3.
I am seeing paged kernel memory increase, but I have not monitored process committ charge yet.
I will try starting tasks outside the loop.
11-15-2011 10:22 AM
DAQmx 9.3 should have the autostart bug fixed so that should not be the issue (fixed in 9.1) However, the DAQmx state diagram may be leaking just a bit from what you are stating. Definatly call the "control task" from the DAQmx advanced palatte and see if starting the loop with the task expressly "reserved" changes things at all.
In this thread Sean exposed some of the underlying fundamentals of the DAQmx State machine. Let us know if this stabilizes your system- if it does I'm sure R&D will get into it and re-debug the driver
11-15-2011 10:42 AM
Update:
I changed deployment PCs last Friday and the test has run without failure since then. So I have not yet made any further changes that you've mentioned.
However, this machine has more memory and it may be simply taking longer to exhibit the same issue.
Thanks for the link to the DAQmx state machine discussion. I will plan to make some of these modifications if/when the error returns.
11-17-2011 10:33 AM
Continues to run without error. Thanks to all who have posted.
11-30-2011 02:49 PM
Update: Error has returned on new PC.
Since I last posted, I have had 2 instances of the program crashing on the latest PC. The time to failure has increased substantially on this PC, but nontheless remains. The first failure occurred after 10 days running, The 2nd error occurred after 8 days running.
I grabbed the displayed error after the 2nd failure:
Error -50352 occurred at Low Cost Keypad Test.vi
Possible Reason(s):
NI Platform Services: The requested memory could not be allocated.
Task Name: _unnamedTask<0>
I then ran task manager and grabbed the following from the performance tab.
Physical Memory Total (MB) : 2006
Physical Memory Cached (MB) : 848
Physical Memory Available (MB): 846
Physical Memory Free (MB) : 20
Kernel Memory Paged (MB) : 977
Kernel Memory NonPaged (MB): 546
System Handles: 20673
System Threads: 820
System Processes: 78
System Up Time: 8:05:41:35
System Committ (MB): 2235/4012
After rebooting and restarting, grabbed the same data:
Physical Memory Total (MB) : 2006
Physical Memory Cached (MB) : 359
Physical Memory Available (MB): 1328
Physical Memory Free (MB) : 1063
Kernel Memory Paged (MB) : 79
Kernel Memory NonPaged (MB): 45
System Handles: 19371
System Threads: 922
System Processes: 82
System Up Time: 0:00:04:20
System Commit (MB): 799/4012
I believe I still have a declining resource problem.
12-01-2011 02:06 PM
Rick,
You can find some possible solutions here. I would also recommend upgrading to DAQmx 9.4, the latest version.
Also, Brad previously asked for some information:
"Also, you mentioned "available memory". In operating systems that have virtual memory, available memory is wasted memory, so this isn't a reliable indicator of a memory leak. Instead, I recommend periodically writing down the following statistics (or using PerfMon to record them) so that you can trend them over time:
Were you able to do this? Could you please post your findings?
Katie
12-05-2011 03:33 PM
Hi Rick,
Thanks for posting the numbers from Task Manager. That definitely looks like a memory leak.
Also, I can confirm that with DAQmx 9.4, there is a small memory leak (48 bytes) every time a cDAQ task is uncommitted. This has been reported to R&D as CAR #327313 and it is due to be fixed in the next release of NI-DAQmx. In the meantime, starting your tasks outside the loop should significantly limit the effect of this memory leak.
Brad
12-05-2011 04:46 PM
Thanks to all. I will post my findings as soon as I can return to working on this project.
02-26-2013 11:38 AM
Hi Rick,
I was wondering if you were able to get back on this project. We are seeing a similar issue and I was wondering if you found the root of the problem in yours. In the mean time, we will try some of the things NI R&D mentioned in this post.
Regards,
Fab
02-26-2013 05:38 PM
Fab,
I did return to this project and the problem was resolved. I have incorporated many suggetions from this thread, but I believe the most significant one was to create the task, and then start the task explicitly, outside the loop.
I hope it works as well for you.
Rick