[perl bindings] Bizarre copy of UNKNOWN in subroutine

340 views
Skip to first unread message

Otto Allmendinger

unread,
Jun 5, 2011, 7:24:17 AM6/5/11
to us...@subversion.apache.org
The perl bindings don't work with the newest version of that manifests
with "git svn", the reasons are unclear though

I'm using Arch Linux

# pacman -Q subversion perl git
subversion 1.6.15-1
perl 5.14.0-1
git 1.7.5.2-2

# git svn rebase
Bizarre copy of UNKNOWN in subroutine entry at
/usr/lib/perl5/vendor_perl/SVN/Base.pm line 80.


More information:

StackOverflow thinks it is subversion and perl:
http://stackoverflow.com/questions/6217317/bizarre-copy-of-unknown-in-subroutine-entry

Bug report in Debian bug tracker:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=628507

linked swig bug from debian tracker:
http://sourceforge.net/tracker/?func=detail&aid=3260265&group_id=1645&atid=301645


Thanks,

Otto

Stefan Sperling

unread,
Jun 5, 2011, 11:39:24 AM6/5/11
to Otto Allmendinger, us...@subversion.apache.org
On Sun, Jun 05, 2011 at 01:24:17PM +0200, Otto Allmendinger wrote:
> The perl bindings don't work with the newest version of that manifests
> with "git svn", the reasons are unclear though
>
> I'm using Arch Linux
>
> # pacman -Q subversion perl git
> subversion 1.6.15-1
> perl 5.14.0-1
> git 1.7.5.2-2

The debian bug report you linked says this might be a problem with SWIG.
What version of SWIG are you using?

Daniel Shahaf

unread,
Jun 5, 2011, 11:48:25 AM6/5/11
to Otto Allmendinger, us...@subversion.apache.org
Otto Allmendinger wrote on Sun, Jun 05, 2011 at 13:24:17 +0200:
> # git svn rebase
> Bizarre copy of UNKNOWN in subroutine entry at
> /usr/lib/perl5/vendor_perl/SVN/Base.pm line 80.
>

We need more information.

Otto Allmendinger

unread,
Jun 5, 2011, 12:41:16 PM6/5/11
to Otto Allmendinger, us...@subversion.apache.org
> The debian bug report you linked says this might be a problem with SWIG.
> What version of SWIG are you using?

I'm using swig 2.0.4 where the bug is supposed to be fixed.

Svn is compiled against that version, the errors still occurs.

Output of "make test" in bindings/swig/perl/native:
https://gist.github.com/1009124

Otto Allmendinger

unread,
Jun 14, 2011, 3:21:54 AM6/14/11
to Otto Allmendinger, us...@subversion.apache.org
Update:

The problem seems to affect the i686 architecture and does not
manifest under x86_64:

https://bugs.archlinux.org/task/24540

Otto Allmendinger

unread,
Jun 19, 2011, 1:43:31 PM6/19/11
to Otto Allmendinger, us...@subversion.apache.org
So does this qualify as a proper bug? Can I add this to the issue tracker?

Stefan Sperling

unread,
Jun 19, 2011, 1:53:12 PM6/19/11
to Otto Allmendinger, us...@subversion.apache.org
On Sun, Jun 19, 2011 at 07:43:31PM +0200, Otto Allmendinger wrote:
> So does this qualify as a proper bug? Can I add this to the issue tracker?

Yes, please add it.

Someone will need to pin down where the problem is coming from.
Is it SWIG? Is it Perl? Is it Subversion?

Can you try to reproduce the problem with an earlier version of
SWIG and/or Perl?

Stéphane Gaudreault

unread,
Jun 20, 2011, 9:54:12 AM6/20/11
to us...@subversion.apache.org

Hi,

We think that only 32 bits systems are affected by this bug because

cd subversion-1.6.17/subversion/bindings/swig/perl/native; make test

fails on i686, but works on x86_64[1].

We have that problem with either swig 2.0.3 or 2.0.4. We had no problem with
perl v5.12.3. The problem was noticed after the upgrade to v5.14.0. Someone
suggested that the problem could be related to the use of 64bits offset by perl
[2].

Regards,

Stéphane Gaudreault

[1] https://bugs.archlinux.org/task/24540
[2] http://www.gossamer-threads.com/lists/perl/porters/263222

Stefan Sperling

unread,
Jun 20, 2011, 3:28:32 PM6/20/11
to Stéphane Gaudreault, us...@subversion.apache.org
On Mon, Jun 20, 2011 at 09:54:12AM -0400, St�phane Gaudreault wrote:
> Le 19 juin 2011 13:53:12, Stefan Sperling a �crit :

> > On Sun, Jun 19, 2011 at 07:43:31PM +0200, Otto Allmendinger wrote:
> > > So does this qualify as a proper bug? Can I add this to the issue
> > > tracker?
> >
> > Yes, please add it.
> >
> > Someone will need to pin down where the problem is coming from.
> > Is it SWIG? Is it Perl? Is it Subversion?
> >
> > Can you try to reproduce the problem with an earlier version of
> > SWIG and/or Perl?
>
> Hi,
>
> We think that only 32 bits systems are affected by this bug because
>
> cd subversion-1.6.17/subversion/bindings/swig/perl/native; make test
>
> fails on i686, but works on x86_64[1].
>
> We have that problem with either swig 2.0.3 or 2.0.4. We had no problem with
> perl v5.12.3. The problem was noticed after the upgrade to v5.14.0. Someone
> suggested that the problem could be related to the use of 64bits offset by perl
> [2].
>
> Regards,
>
> St�phane Gaudreault

Are you sure the test failures referenced in [2] are related to
the "bizarre copy of UNKNOWN" problem? I don't see that error
appearing in [2].

But if your are sure it's related, the link at [2] clearly explains
that perl and extensions were compiled in an incompatible way:

"I doubt there's anything crucial about the particular flag, but rather
it's the fact that you're building extensions using flags that give
you code that is binary incompatible with the perl binary it's being
built against."

"With options like -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64' used
to build Perl but dropped when testing extension building, you could
be getting a different and incompatible stat structure or other binary
incompatible differences between the extension and the Perl core. "

Which is right. Any software that shares data structures needs the
data structures to be compatible. Else it crashes and whatnot.

So is this "bizarre copy of UNKNOWN" problem showing anywhere else than
Debian and Arch Linux? Maybe it's a problem with how these distributions
compile perl and related software? Maybe Perl is compiled with support
for large files but Subversion is not, or something like that?

Taylor Hedberg

unread,
Jun 29, 2011, 3:30:07 PM6/29/11
to us...@subversion.apache.org
Otto Allmendinger <otto.allmendinger <at> googlemail.com> writes:
> So does this qualify as a proper bug? Can I add this to the issue tracker?

Did you ever file a bug report for this? I'm having the same issue and I'd like
to keep tabs on the status of a resolution.

Stéphane Gaudreault

unread,
Jul 1, 2011, 6:00:18 PM7/1/11
to us...@subversion.apache.org
Le 20 juin 2011 15:28:32, Stefan Sperling a écrit :
> On Mon, Jun 20, 2011 at 09:54:12AM -0400, Stéphane Gaudreault wrote:

> > Le 19 juin 2011 13:53:12, Stefan Sperling a écrit :
> > > On Sun, Jun 19, 2011 at 07:43:31PM +0200, Otto Allmendinger wrote:
> > > > So does this qualify as a proper bug? Can I add this to the issue
> > > > tracker?
> > >
> > > Yes, please add it.
> > >
> > > Someone will need to pin down where the problem is coming from.
> > > Is it SWIG? Is it Perl? Is it Subversion?
> > >
> > > Can you try to reproduce the problem with an earlier version of
> > > SWIG and/or Perl?
> >
> > Hi,
> >
> > We think that only 32 bits systems are affected by this bug because
> >
> > cd subversion-1.6.17/subversion/bindings/swig/perl/native; make test
> >
> > fails on i686, but works on x86_64[1].
> >
> > We have that problem with either swig 2.0.3 or 2.0.4. We had no problem
> > with perl v5.12.3. The problem was noticed after the upgrade to v5.14.0.
> > Someone suggested that the problem could be related to the use of 64bits
> > offset by perl [2].
> >
> > Regards,
> >
> > Stéphane Gaudreault

> >
> > [1] https://bugs.archlinux.org/task/24540
> > [2] http://www.gossamer-threads.com/lists/perl/porters/263222
>
> Are you sure the test failures referenced in [2] are related to
> the "bizarre copy of UNKNOWN" problem? I don't see that error
> appearing in [2].
>
> But if your are sure it's related, the link at [2] clearly explains
> that perl and extensions were compiled in an incompatible way:
>
> "I doubt there's anything crucial about the particular flag, but rather
> it's the fact that you're building extensions using flags that give
> you code that is binary incompatible with the perl binary it's being
> built against."
>
> "With options like -D_LARGEFILE_SOURCE and -D_FILE_OFFSET_BITS=64' used
> to build Perl but dropped when testing extension building, you could
> be getting a different and incompatible stat structure or other binary
> incompatible differences between the extension and the Perl core. "
>
> Which is right. Any software that shares data structures needs the
> data structures to be compatible. Else it crashes and whatnot.
>
> So is this "bizarre copy of UNKNOWN" problem showing anywhere else than
> Debian and Arch Linux? Maybe it's a problem with how these distributions
> compile perl and related software? Maybe Perl is compiled with support
> for large files but Subversion is not, or something like that?


Hi,

Our collegue Marcela Mašláňová from the Red Hat team suggested that the
problem might be in in Makefile.PL where ExtUtils::MakeMaker overwrite the
CCFLAGS. The following patch fix the problem for us. Could you please apply it
?

Regards,

--
Stéphane Gaudreault
ArchLinux developer

===========================================
diff -Naur
subversion-1.6.17.ori/subversion/bindings/swig/perl/native/Makefile.PL.in
subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in
--- subversion-1.6.17.ori/subversion/bindings/swig/perl/native/Makefile.PL.in
2010-11-24 20:42:16.000000000 +0000
+++ subversion-1.6.17/subversion/bindings/swig/perl/native/Makefile.PL.in
2011-07-01 20:16:16.520892074 +0000
@@ -43,7 +43,7 @@
my %config = (
ABSTRACT => 'Perl bindings for Subversion',
DEFINE => $cppflags,
- CCFLAGS => $cflags,
+ CCFLAGS => $Config{ccflags},
INC => join(' ',$apr_cflags, $apu_cflags,
" -I$swig_srcdir/perl/libsvn_swig_perl",
" -I$svnlib_srcdir/include",

Otto Allmendinger

unread,
Jul 2, 2011, 10:08:23 AM7/2/11
to subversi...@googlegroups.com, us...@subversion.apache.org
Sorry, I didn't. I haven't gotten the thread updates and didn't find the time to do cross-version checks of perl + swig + svn. 

Stéphane's patch fixes it though so I don't know if an issue is still necessary. 

Daniel Shahaf

unread,
Jul 2, 2011, 5:24:31 PM7/2/11
to Stéphane Gaudreault, us...@subversion.apache.org
Please send this to dev@, it's more likely to get some attention there.

http://subversion.apache.org/patches

Thanks

Reply all
Reply to author
Forward
0 new messages