[colug-432] Troubleshooting Suggestions: File Truncation Issue

Rob Stampfli rob944 at cboh.org
Sun Jan 10 10:16:29 EST 2016


On Sun, Jan 10, 2016 at 08:15:02AM -0500, William E. T. wrote:
> If we iterate over that process thousands to millions of times, we'll see
> the following happen:
> 
> open("main.pre.tsidx", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0600) = 3
> write(3, "\33[?1049h\33[?1h\33=\33[1;61r\33[?12;25h\33"..., 29549) = 29549
> close(3)                                = 0
> link("main.pre.tsidx", "main.tsidx")    = 0
> unlink("main.pre.tsidx")                = 0
> stat("main.tsidx", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0

I presume that the "tsidx" is a unique identifier?  Are these files
being produced serially by only one process, or are there several
processes running simultaneously?  My first inclination is to suspect
you are getting an occasional collision in file names between two
independent processes.

Also, it would be interesting to do a stat() of main.pre.tsidx before
it is unlinked (i.e., the "link" step may be a red herring here).

Rob


More information about the colug-432 mailing list