Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Consequences of file size overflow: (2 Items)
   
Consequences of file size overflow  
We had an application whose stdout was redirected to a log file. The file overflowed, and about the same time we had 
some application problems that may or may not have been related. The log file itself appears to be corrupted with chunks
 of other files.

What happens in this case? As far as I can tell, the output from the application continued to be piped to the log file 
without interruption when the file overflowed. ls shows the file as having a size in excess of 4.6 gb.

We plan on not allowing this to happen again, but I'd still like to know just what kind of problems this might cause.

Thanks,

Kevin
Re: Consequences of file size overflow  
By overflow, I suspect you mean it grew beyond the maximum size the file system allows? Or did you pregrow the file to a
 size and used pwrite to write at certain offsets? What file system is it? fs-qnx4.so or fs-qnx6.so, or even something 
else? 

Generally, the behaviour of QNX filesystems in such a case is not documented. I have requested that the mechanisms that 
the QNX filesystems use to reach their corresponding maximum level of reliability to be documented in detail - maybe it 
will happen for 6.4.2.

For your problem I suggest the straight forward approach:
- reduce length of log messages
- reduce number of log messages
- write a thread that monitors the length of the log file once a day (?) and if too long, lock access to it with a mutex
 or so and archive it (e.g. rename, move, create new empty one).


- Malte