From: Bill Lear Date: Wed, 28 Feb 2007 16:55:31 GMT Subject: Re: Error "fatal: cannot pread pack file: Success" Message-ID: <17893.46083.869042.467318@lisa.zopyra.com> In-Reply-To: <20070228164922.GB5924@spearce.org> On Wednesday, February 28, 2007 at 11:49:22 (-0500) Shawn O. Pearce writes: >Morten Welinder wrote: >> >+ die("cannot pread pack file: %s from=%lu, packfile >> >size=%lu", strerror(errno), from, lseek(pack_fd, SEEK_END, 0)); >> >> That might give you the errno from the lseek call. > >Yes, and I don't care here. We're dead either way, that pread is >returning bunk and we don't know why. > >But it is also giving me SEEK_END, not the end of the file. I got >the arguments backwards to lseek. Whoops. ;-) Ok, fixed that: % strace -f -o tracefile git clone --bare ~/devel/project [...] fatal: cannot pread pack file: Success from=39395, packfile size=0 [...] % grep pread tracefile 28635 pread(3, 28635 <... pread resumed> "", 207, 39395) = 0 28635 write(2, "cannot pread pack file: Success "..., 59) = 59 Bill