Re: libDAR skips files above 3 KB - Please help

Denis Corbin <[email protected]> Sat, 26 Apr 2008 09:29:00 +0200
Newsgroups gmane.comp.sysutils.backup.dar.libdar
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Satheesh wrote:
> Denis Corbin <dar.linux@...> writes:
[...]
>>
> 
> Thanks Denis. The libdar thread has root privileges (getuid returned 0 - same 
> as the process) and more over certain files on the same directory with same 
> permissions are being read correctly. fichier::open succceds for those files 
> however fichier::inherited_read fails.

OK, you are right, this is not a permission problem as you can open the
file in the requested mode.


> ::read is failing for files above ~3.2 K only.

If ::read is failing, this has for consequence to make
fichier::inherited_read to fail also. The question is thus why ::read
fails? Maybe one argument is out of range? I wonder in particular if the
amount of data read at once is not exceeding the system's capabilities.

As you can read at the top of src/libdar/generic_file.cpp, this amount
is 10 kbytes unless this value is over the value given by the SSIZE_MAX
system macro (if it exists), in which case it takes this value.

Does your system defines such a macro? Can you try a simple C (or C++)
program with smaller values (a few bytes for example) on a large file.

> I verified the same use-case on 
> RH Linux EL4 on x86 where this problem do not happen. I am using libdar 
> version 2.3.6.

Yep, this only shows that the problem is either internal to the system
or that dar is not adapted to that system.

> 
> Regards,
> Satheesh
> 
> 

Regards,
Denis.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIEtm8pC5CI8gYGlIRAglCAKCynctdPyDl5wm6s4rgQZGj/21ZYACbBBht
NORkpvB5E7q6/JftfTz17wE=
=6wzG
-----END PGP SIGNATURE-----

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone