Re: open files limit
- From
- Pete Wyckoff <pw@padd.com>
- Date
- Aug 12, 2011, 17:26 UTC
- Message-ID
- <20110812172600.GA15896@padd.com>
- In-Reply-To
- <CAJo=hJsj8_VjD5wN9Gge_Me-eXKK-P7nLAxERiiLp0+ayiEBbg@mail.gmail.com>
spearce@spearce.org wrote on Fri, 12 Aug 2011 09:09 -0700:
Show 17 quoted lines
> On Fri, Aug 12, 2011 at 08:15, Pete Wyckoff <pw@padd.com> wrote: > > Somebody at $work found this problem: > > > > $ git ls-files -s | wc > > error: packfile .git/objects/pack/pack-1627e77da82bbb36118762649c8aa88c05664b1e.pack cannot be accessed > > [..lots more similar errors..] > > > > Turns out his shell's open file descriptor limit was 500. And > > there are 1600 pack files in the repo. > > > > Increasing the descriptor limit to 1024 fixed it. I could > > probably get him to repack, which may also fix it. > > > > Does it seem feasible to look for EMFILE errors and close > > some packs? Or at least spit out a more intuitive error? > > What version of Git? I remember fixing this already.... :-)
Initially 1.7.5.4. Same problem on 1.7.6 and master.
I have your "Limit file descriptors used by packs" (c793430, 28 feb 2011).
It fails here:
if (!is_pack_valid(p)) {
error("packfile %s cannot be accessed", p->pack_name);
goto next;
}because p->pack_fd is -1, because an earlier git_open_noatime() got EMFILE. The function unuse_one_window() is never able to find anything to close.
I'll do some more debugging this weekend. Thanks for pointing out that it _should_ be fixed.
-- Pete