Re: libDAR skips files above 3 KB - Please help

Satheesh <satheesh_sskzm-/[email protected]> Mon, 28 Apr 2008 01:47:26 +0000 (UTC)
Newsgroups gmane.comp.sysutils.backup.dar.libdar
Message-ID <[email protected]>
Denis Corbin <dar.linux@...> writes:

> 
> 
> 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.
> 
I noted that value as 100 K (102400).

> 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.
> 
My system defines that macro - it gave a really large value 2147483647. 
Obviously, it was taking 102400. So I modified it to 10240 and it all started 
working. Thanks a lot.

> > 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.
> 

I forgot to mention another problem that I encountered early on with stat 
call. Line 535 of sar.cpp (if(stat(fic, &buf) < 0)). "stat" is always failing 
with an errno not equal to ENOINT. Error code:0. Since my target location 
changes each time I run a backup, I've commented that if-else block and always 
creating a new file. Can you comment on why stat fails ? It's attempting to 
check for a file "/data/backup/042608/full.1.dar", where the 
directory "/data/backup/042608" exists with all permissions. 

> > 
> > Regards,
> > Satheesh
> > 
> > 
> 
> Regards,
> Denis.
> 
> 





-------------------------------------------------------------------------
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