LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do I eventually get "Error 11 occurred at Open File"?

Hi,
I have written a program which does some File I/O in different parallel running loops and subvis.
But after the prgram has run nicely for two hours I eventually get a error-message like "Error 11 has occurred at Open File [...] This Error code is undefined..." and the cpu usage goes up to 100%. After saying ok, the error comes up again.

In "General LabView Error Codes" it says, that Error 11 is caused by too many open files, but I monitored this (/proc/sys/fs/file-nr, I am working under Linux), and the amount of open files didn't even came close to the limit.
Then I thought it could be caused by some processes who tried to access the same file at the same time, so I used semaphores to avoid such a possibility, but the error still shows up.

Anybody any idea what could cause this error?

Thanks for your help,
Daniel

PS: I'm running LabView 8.2 on Suse 10.0 Linux
0 Kudos
Message 1 of 7
(5,750 Views)
I have not seen this, but one possibility is that File references are not being closed when you are finished with the files. So even though the files may not be open, the references still exist.

Lynn
0 Kudos
Message 2 of 7
(5,740 Views)
Hello Lynn,
I don't think that is the reason, since I work with "Write to Spreadsheet File", which doesn't use references and in an other part of the program I use "read Text file" with a reference but there I am referencing to the same file during the whole program execution.


0 Kudos
Message 3 of 7
(5,727 Views)
Hi,

perhaps you have some code for me/us here to test this problem?
And how is it possible to reproduce this error?

Thanks
Regards
Dippi
0 Kudos
Message 4 of 7
(5,689 Views)
Hi,
the problem had been a subvi in which a file reference had been openend but not closed.
I replaced this subvi and now everything seems to work fine.
So Lynn was right after all..

Thank you all for your help.

The only thing I am wondering about is that the too many open files hadn't showed up in /proc/sys/fs/file-nr.
Does LabView manage such things itself? And if so, how can you monitor such things ?

Best regards,
Daniel




0 Kudos
Message 5 of 7
(5,684 Views)
Perhaps there is a per-user or per-process limit? I've never run into a problem like that, so I wouldn't know where to look.  To check the program's open files though, you could check lsof or look in /proc/<pid>/fd.  From there you can see each file reference that the process has open.
0 Kudos
Message 6 of 7
(5,678 Views)
Hi Daniel,

ich found the following explanation:

Title:
Why Do I Receive an Error 11 from Open File or Open TCP Connection on LabVIEW for Sun?

Problem:
Why do I receive an error 11 from Open File or Open TCP Connection on LabVIEW for Sun?

Solution :
On Solaris, there is a limit to the number of files that can be opened at a time. By default, this number is around 64. This is a limit imposed by the operating system and not by LabVIEW. You should be able to change this limit within the OS. If the number of files opened exceeds this limit, error 11 will be returned from Open File. This error can also be returned from TCP Open Connection. The reason for this is that each open TCP connection is treated as an open file on UNIX.

I hope this will clear your last question.

I wish you a nice weekend.

Regards
Dippi
0 Kudos
Message 7 of 7
(5,653 Views)