git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git svn import failure : write .git/Git_svn_hash_BmjclS: Bad file descriptor

From
Nico Schlömer <nico.schloemer@gmail.com>
Date
Jan 31, 2015, 12:51 UTC
Message-ID
<CAK6Z60cGnvPP0ctnyV4tHfMmBGYRidEJzkAG+J2h9BunmtOAsQ@mail.gmail.com>
In-Reply-To
<20150130013017.GA10713@dcvr.yhbt.net>

I tried the patch and I still get ``` [...] r100 = e2a9b5baa2cebb18591ecb04ff350410d52f36de (refs/remotes/git-svn) Unexpected result returned from git cat-file at /home/nschloe/share/perl/5.18.2/Git/SVN/Fetcher.pm line 335. Failed to read object 619f9d1d857fb287d06a70c9dac6b8b534d0de6a at /home/nschloe/share/perl/5.18.2/Git/SVN/Fetcher.pm line 336, <GEN16> line 757.

error closing pipe: Bad file descriptor at /home/nschloe/libexec/git-core/git-svn line 0. error closing pipe: Bad file descriptor at /home/nschloe/libexec/git-core/git-svn line 0. ``` when ``` git svn clone https://geuz.org/svn/gmsh/trunk ```

Cheers, Nico

On Fri, Jan 30, 2015 at 2:30 AM, Eric Wong <normalperson@yhbt.net> wrote:
Show 89 quoted lines
> Valery Yundin <yuvalery@gmail.com> wrote:
>> Hi,
>>
>> Your patch seems to fix the problem.
>> I tried several times and I can svn clone the whole repository in one
>> go without a crash.
>
> Thanks for the confirmation.  Cc-ing a few other folks who encountered
> this problem (and Bcc-ing some folks who emailed me privately).
>
> Can the rest of you give this patch a try on your respective platforms
> and confirm the fix?
>
> http://article.gmane.org/gmane.comp.version-control.git/263168/raw
> (also: http://mid.gmane.org/20150130002247.GA22519@dcvr.yhbt.net )
>
> Junio: assuming all goes well with testers, can you apply my patch
> to the appropriate maintenance tracks with Tested-by:s?
> I'm going offline in a few hours and don't think I'll be around
> much the next week or so.
>
> Thanks.
>
>> Thanks,
>> Valery
>>
>> On 30 January 2015 at 01:22, Eric Wong <normalperson@yhbt.net> wrote:
>> > Valery Yundin <yuvalery@gmail.com> wrote:
>> >> Hi,
>> >>
>> >> Here you go:
>> >> dfa72fdb96befbd790f623bb2909a347176753c2 is the first bad commit
>> >
>> > Thank you.  Can you give the following patch a try?
>> > I have not been able to reproduce the problem on my end.
>> > If it doesn't work out, I might be out of ideas for a bit :/
>> > Increasing --log-window-size will help you run longer without
>> > the error, but that's not ideal as it can also eat memory.
>> >
>> > -----------------------8<----------------------
>> > From: Eric Wong <normalperson@yhbt.net>
>> > Subject: [PATCH] git-svn: destroy all tempfiles when reloading RA
>> >
>> > This may fix the errors some users are seeing with:
>> > "write .git/Git_svn_hash_XXXXXX: Bad file descriptor"
>> >
>> > Thanks to Valery Yundin for helping bisect the problem introduced in
>> > commit dfa72fdb96befbd790f623bb2909a347176753c2
>> > (git-svn: reload RA every log-window-size)
>> >
>> > Cc: Valery Yundin <yuvalery@gmail.com>
>> > Signed-off-by: Eric Wong <normalperson@yhbt.net>
>> > ---
>> >  perl/Git.pm        | 6 ++++++
>> >  perl/Git/SVN/Ra.pm | 1 +
>> >  2 files changed, 7 insertions(+)
>> >
>> > diff --git a/perl/Git.pm b/perl/Git.pm
>> > index b5905ee..698018e 100644
>> > --- a/perl/Git.pm
>> > +++ b/perl/Git.pm
>> > @@ -1347,6 +1347,12 @@ sub temp_path {
>> >         $TEMP_FILES{$temp_fd}{fname};
>> >  }
>> >
>> > +sub temp_reset_all {
>> > +       unlink values %TEMP_FILEMAP if %TEMP_FILEMAP;
>> > +       %TEMP_FILEMAP = ();
>> > +       %TEMP_FILES = ();
>> > +}
>> > +
>> >  sub END {
>> >         unlink values %TEMP_FILEMAP if %TEMP_FILEMAP;
>> >  }
>> > diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
>> > index 622535e..878679d 100644
>> > --- a/perl/Git/SVN/Ra.pm
>> > +++ b/perl/Git/SVN/Ra.pm
>> > @@ -397,6 +397,7 @@ sub gs_fetch_loop_common {
>> >                 $_[0] = undef;
>> >                 $self = undef;
>> >                 $RA = undef;
>> > +               Git->temp_reset_all;
>> >                 $gpool->clear;
>> >                 $self = Git::SVN::Ra->new($ra_url);
>> >                 $ra_invalid = undef;
>> > --
>> > EW
>> --
Previous: Eric WongNext: Valery Yundin
Message 7 of 14 in “git svn import failure : write .git/Git_svn_hash_BmjclS: Bad file descriptor”
  1. Valery YundinJan 29, 2015
  2. Eric WongJan 29, 2015
  3. Valery YundinJan 29, 2015
  4. Eric WongJan 30, 2015
  5. Valery YundinJan 30, 2015
  6. Eric WongJan 30, 2015
  7. Nico SchlömerJan 31, 2015
  8. Valery YundinJan 31, 2015
  9. Eric WongFeb 12, 2015
  10. Nico SchlömerFeb 16, 2015
  11. Eric WongFeb 17, 2015
  12. Kyle J. McKayFeb 25, 2015
  13. Eric WongFeb 25, 2015
  14. Kyle J. McKayFeb 25, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.