* error: Use of uninitialized value $hash in chomp
@ 2018-12-19 2:42 Andrew Shearer
2018-12-19 19:00 ` Ævar Arnfjörð Bjarmason
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Shearer @ 2018-12-19 2:42 UTC (permalink / raw)
To: git@vger.kernel.org
Hello
I am using a "git svn clone" command to extract our project history from svn into git.
About 30m into the process it fails with:
r50739 = 2a1491de1353b1e3cce50d8f9d383407218a44f1 (refs/remotes/git-svn)
fatal: Cannot open '.git/Git_svn_delta_33316_0_UkxiJV': Permission denied
Use of uninitialized value $hash in chomp at C:/Program Files/Git/mingw64/share/perl5/Git.pm line 929, <GEN11> line 36311.
hash-object -w --stdin-paths --no-filters: command returned error: 128
error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
(in cleanup) at /usr/share/perl5/vendor_perl/Error.pm line 198 during global destruction.
I tried updating to the latest build, 2.20.1.windows, but it still fails.
There is nothing particularly special about svn changeset 50739 that I can see compared to any other.
Anyone know why this might be failing or how I could resolve it?
Thanks
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: error: Use of uninitialized value $hash in chomp
2018-12-19 2:42 error: Use of uninitialized value $hash in chomp Andrew Shearer
@ 2018-12-19 19:00 ` Ævar Arnfjörð Bjarmason
2018-12-21 0:15 ` Andrew Shearer
0 siblings, 1 reply; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2018-12-19 19:00 UTC (permalink / raw)
To: Andrew Shearer; +Cc: git@vger.kernel.org, Eric Wong
On Wed, Dec 19 2018, Andrew Shearer wrote:
> Hello
>
> I am using a "git svn clone" command to extract our project history from svn into git.
> About 30m into the process it fails with:
>
> r50739 = 2a1491de1353b1e3cce50d8f9d383407218a44f1 (refs/remotes/git-svn)
> fatal: Cannot open '.git/Git_svn_delta_33316_0_UkxiJV': Permission denied
> Use of uninitialized value $hash in chomp at C:/Program Files/Git/mingw64/share/perl5/Git.pm line 929, <GEN11> line 36311.
> hash-object -w --stdin-paths --no-filters: command returned error: 128
>
> error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
> error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
> (in cleanup) at /usr/share/perl5/vendor_perl/Error.pm line 198 during global destruction.
>
> I tried updating to the latest build, 2.20.1.windows, but it still fails.
>
> There is nothing particularly special about svn changeset 50739 that I can see compared to any other.
> Anyone know why this might be failing or how I could resolve it?
That "Permission denied" looks scary. Don't know how git-svn gets into
this, but try with this patch on top:
diff --git a/perl/Git.pm b/perl/Git.pm
index d856930b2e..f5d15895d3 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -926,7 +926,13 @@ sub hash_and_insert_object {
throw Error::Simple("out pipe went bad");
}
- chomp(my $hash = <$in>);
+ my $hash = <$in>;
+ unless (defined $hash) {
+ sub noes { die "blah" }
+ noes();
+ } else {
+ chomp($hash);
+ }
unless (defined($hash)) {
$self->_close_hash_and_insert_object();
throw Error::Simple("in pipe went bad");
Then run:
perl -d $(git --exec-path)/git-svn
Set a breakpoint at that "noes" with:
DB<1> b Git::noes
Continue:
DB<2> c
Then when it stops there get a backtrace with "T":
DB<2> T
@ = DB::DB called from file 'perl/Git.pm' line 931
. = Git::noes() called from file 'perl/Git.pm' line 932
. = Git::hash_and_insert_object(ref(Git), 'Makefile') called from -e line 1
And see if you can get any other relevant info out of the debugger. See
"perldoc perldebug".
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: error: Use of uninitialized value $hash in chomp
2018-12-19 19:00 ` Ævar Arnfjörð Bjarmason
@ 2018-12-21 0:15 ` Andrew Shearer
2019-01-08 19:44 ` Andrew Shearer
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Shearer @ 2018-12-21 0:15 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason; +Cc: git@vger.kernel.org, Eric Wong
Hi
Thanks for reply, but sorry I don't know how to do that - I don't have the git source code or know how to debug it.
Is there another way I can capture logging/debugging information while running "git svn clone" and send it to you?
Thanks
Andrew Shearer / Web Developer
DDI 021 469 888 / andrew@terabyte.co.nz
/TERABYTE
-----Original Message-----
From: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Sent: Thursday, 20 December 2018 8:00 AM
To: Andrew Shearer <andrew@terabyte.co.nz>
Cc: git@vger.kernel.org; Eric Wong <e@80x24.org>
Subject: Re: error: Use of uninitialized value $hash in chomp
On Wed, Dec 19 2018, Andrew Shearer wrote:
> Hello
>
> I am using a "git svn clone" command to extract our project history from svn into git.
> About 30m into the process it fails with:
>
> r50739 = 2a1491de1353b1e3cce50d8f9d383407218a44f1
> (refs/remotes/git-svn)
> fatal: Cannot open '.git/Git_svn_delta_33316_0_UkxiJV': Permission
> denied Use of uninitialized value $hash in chomp at C:/Program Files/Git/mingw64/share/perl5/Git.pm line 929, <GEN11> line 36311.
> hash-object -w --stdin-paths --no-filters: command returned error: 128
>
> error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
> error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
> (in cleanup) at /usr/share/perl5/vendor_perl/Error.pm line 198 during global destruction.
>
> I tried updating to the latest build, 2.20.1.windows, but it still fails.
>
> There is nothing particularly special about svn changeset 50739 that I can see compared to any other.
> Anyone know why this might be failing or how I could resolve it?
That "Permission denied" looks scary. Don't know how git-svn gets into this, but try with this patch on top:
diff --git a/perl/Git.pm b/perl/Git.pm
index d856930b2e..f5d15895d3 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -926,7 +926,13 @@ sub hash_and_insert_object {
throw Error::Simple("out pipe went bad");
}
- chomp(my $hash = <$in>);
+ my $hash = <$in>;
+ unless (defined $hash) {
+ sub noes { die "blah" }
+ noes();
+ } else {
+ chomp($hash);
+ }
unless (defined($hash)) {
$self->_close_hash_and_insert_object();
throw Error::Simple("in pipe went bad");
Then run:
perl -d $(git --exec-path)/git-svn
Set a breakpoint at that "noes" with:
DB<1> b Git::noes
Continue:
DB<2> c
Then when it stops there get a backtrace with "T":
DB<2> T
@ = DB::DB called from file 'perl/Git.pm' line 931
. = Git::noes() called from file 'perl/Git.pm' line 932
. = Git::hash_and_insert_object(ref(Git), 'Makefile') called from -e line 1
And see if you can get any other relevant info out of the debugger. See "perldoc perldebug".
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: error: Use of uninitialized value $hash in chomp
2018-12-21 0:15 ` Andrew Shearer
@ 2019-01-08 19:44 ` Andrew Shearer
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Shearer @ 2019-01-08 19:44 UTC (permalink / raw)
To: Ævar Arnfjörð Bjarmason; +Cc: git@vger.kernel.org, Eric Wong
Hi
Thanks for reply, but sorry I don't know how to do that - I don't have the git source code or know how to debug it.
Is there another way I can capture logging/debugging information while running "git svn clone" and send it to you?
Thanks
Andrew Shearer / Web Developer
DDI 021 469 888 / andrew@terabyte.co.nz
/TERABYTE
-----Original Message-----
From: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Sent: Thursday, 20 December 2018 8:00 AM
To: Andrew Shearer <andrew@terabyte.co.nz>
Cc: git@vger.kernel.org; Eric Wong <e@80x24.org>
Subject: Re: error: Use of uninitialized value $hash in chomp
On Wed, Dec 19 2018, Andrew Shearer wrote:
> Hello
>
> I am using a "git svn clone" command to extract our project history from svn into git.
> About 30m into the process it fails with:
>
> r50739 = 2a1491de1353b1e3cce50d8f9d383407218a44f1
> (refs/remotes/git-svn)
> fatal: Cannot open '.git/Git_svn_delta_33316_0_UkxiJV': Permission
> denied Use of uninitialized value $hash in chomp at C:/Program Files/Git/mingw64/share/perl5/Git.pm line 929, <GEN11> line 36311.
> hash-object -w --stdin-paths --no-filters: command returned error: 128
>
> error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
> error closing pipe: Bad file descriptor at C:/Program Files/Git/mingw64/libexec/git-core\git-svn line 0.
> (in cleanup) at /usr/share/perl5/vendor_perl/Error.pm line 198 during global destruction.
>
> I tried updating to the latest build, 2.20.1.windows, but it still fails.
>
> There is nothing particularly special about svn changeset 50739 that I can see compared to any other.
> Anyone know why this might be failing or how I could resolve it?
That "Permission denied" looks scary. Don't know how git-svn gets into this, but try with this patch on top:
diff --git a/perl/Git.pm b/perl/Git.pm
index d856930b2e..f5d15895d3 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -926,7 +926,13 @@ sub hash_and_insert_object {
throw Error::Simple("out pipe went bad");
}
- chomp(my $hash = <$in>);
+ my $hash = <$in>;
+ unless (defined $hash) {
+ sub noes { die "blah" }
+ noes();
+ } else {
+ chomp($hash);
+ }
unless (defined($hash)) {
$self->_close_hash_and_insert_object();
throw Error::Simple("in pipe went bad");
Then run:
perl -d $(git --exec-path)/git-svn
Set a breakpoint at that "noes" with:
DB<1> b Git::noes
Continue:
DB<2> c
Then when it stops there get a backtrace with "T":
DB<2> T
@ = DB::DB called from file 'perl/Git.pm' line 931
. = Git::noes() called from file 'perl/Git.pm' line 932
. = Git::hash_and_insert_object(ref(Git), 'Makefile') called from -e line 1
And see if you can get any other relevant info out of the debugger. See "perldoc perldebug".
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-01-08 19:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 2:42 error: Use of uninitialized value $hash in chomp Andrew Shearer
2018-12-19 19:00 ` Ævar Arnfjörð Bjarmason
2018-12-21 0:15 ` Andrew Shearer
2019-01-08 19:44 ` Andrew Shearer
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).