LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Linux x86 32/64: issue with file > 2gb (https://www.linuxquestions.org/questions/linux-software-2/linux-x86-32-64-issue-with-file-2gb-762149/)

vpandura 10-15-2009 12:42 PM

Linux x86 32/64: issue with file > 2gb
 
Hi,

In our product, we have a limitation that tmp file(file created in /tmp folder for dumping data retrieved from db) cannot be written more than 2gb size. So in order to increase it to write till 4gb, we changed mainly in our code from fseek to fseek064. When we tried to execute this code compiled with ICC v9.1.0.46, it worked fine. But when we used 7.1.032, it fails exactly when temp file reaches 2g size. The error returned from fseeko64 is "2" which seems to be "No such file or directory". This doesn't seem to make any sense. Also we are not sure whether compiler version has any role here to play.

I have added 2 required compile time flags -D_LARGEFILE64_SOURCE=1 & -D_LARGEFILE_SOURCE=1 for compiling with ICC compiler. The same code works fine with Solaris but not on Linux x86 32bit/64bit.

I use Red Hat Linux x86 32bit/64bit.
Can anyone suggest what could be wrong here? Is there any other way to get rid of this situation? Any pointers please?

Thanks in Advance,
-vinod.

clvic 10-15-2009 01:05 PM

The most important thing in my opinion is to know the filesystem... which is the filesystem of your /tmp?

i92guboj 10-15-2009 01:33 PM

Anything with glibc >= 2.2, a recent enough kernel (even if it's a 2.4 one) and a sane linux fs should support this without problems, as far as I know.

However I have no experience with the icc compiler, only with gcc.

vpandura 10-15-2009 01:47 PM

it is ext3.

chrism01 10-15-2009 08:03 PM

Quote:

When we tried to execute this code compiled with ICC v9.1.0.46, it worked fine
so what's the problem; why switch back to v7.x?

vpandura 10-15-2009 11:07 PM

we support 2 code-lines. one of them uses 9.x and other 7.x. It works fine with 9.x but fails with 7.x. But we couldn't see any problem with using above 2 flavours of compiler so far. Thanks.

Valery Reznic 10-16-2009 01:04 AM

Quote:

Originally Posted by vpandura (Post 3721142)
we support 2 code-lines. one of them uses 9.x and other 7.x. It works fine with 9.x but fails with 7.x. But we couldn't see any problem with using above 2 flavours of compiler so far. Thanks.

You could try to run your program under strace.
It may give you some insight what actual system calls (and what's their parameters) are used


All times are GMT -5. The time now is 08:47 PM.