frej / fast-export

A mercurial to git converter using git-fast-import
http://repo.or.cz/w/fast-export.git
808 stars 255 forks source link

git-fast-import died of signal 11 - [Errno 32] Broken pipe #232

Closed calvnnhobs closed 4 years ago

calvnnhobs commented 4 years ago

Hi,

I'm running hg-fast-export to convert Mercurial to git. I'm using cygwin on Windows 10 to run on bash as I was having python issues trying to run the py files. I'm getting the following error during the numerous "Exporting simple delta revision" steps. Any thoughts on a solution?

error: git-fast-import died of signal 11
Traceback (most recent call last):
  File "/cygdrive/c/bitbucket/FastExport/fast-export/hg-fast-export.py", line 719, in <module>
    plugins=plugins_dict))
  File "/cygdrive/c/bitbucket/FastExport/fast-export/hg-fast-export.py", line 571, in hg2git
    plugins)
  File "/cygdrive/c/bitbucket/FastExport/fast-export/hg-fast-export.py", line 366, in export_commit
    export_file_contents(ctx,man,added,hgtags,fn_encoding,plugins)
  File "/cygdrive/c/bitbucket/FastExport/fast-export/hg-fast-export.py", line 238, in export_file_contents
    wr(d)
  File "/cygdrive/c/bitbucket/FastExport/fast-export/hg-fast-export.py", line 54, in wr
    wr_no_nl(msg)
  File "/cygdrive/c/bitbucket/FastExport/fast-export/hg-fast-export.py", line 51, in wr_no_nl
    stdout_buffer.write(msg)
IOError: [Errno 32] Broken pipe
frej commented 4 years ago

fast-export feeds git-fast-import through a pipe. When fast-import dies because of a segfault (signal 11) and closes its end of the pipe, fast-export crashes when it cannot write to the pipe.

If you are lucky, fast-import will have produced a crash log (check the CRASH REPORTS section in fast-import's man page) before it died, and that could give you a clue to what's wrong. If not, try to find out why fast-import dies. As git is a high quality tool, getting it to segfault just due to its input seems pretty unlikely, so my guess is that something is broken on cygwin.

You could wrap git-fast-import in a shell script which captures its input, and then use that to debug fast-import.

dentelis commented 4 years ago

I had the same problem, it was caused by illegal commit author. Setting authors file https://github.com/frej/fast-export/issues/15 was helpfull. "<>"="somebody <somebody@localhost.int>"

frej commented 4 years ago

No feedback in 90+ days, I assume this is resolved.