Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.15.9 breaks Glib #12014

Closed
p5pRT opened this issue Mar 25, 2012 · 7 comments
Closed

5.15.9 breaks Glib #12014

p5pRT opened this issue Mar 25, 2012 · 7 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Mar 25, 2012

Migrated from rt.perl.org#111974 (status was 'resolved')

Searchable as RT111974$

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 25, 2012

From kaffeetisch@gmx.de

Created by kaffeetisch@gmx.de

I probably shouldn't have reported this at the bottom of another thread
(<http​://perl.markmail.org/thread/7be6f2t47bqrtjnr>), so here it is again​:

With perl 5.15.9 (and blead) multiple of Glib's tests segfault. This
reproduces the issue​:

  use Glib;
  my $obj = Glib​::Object->new;
  $obj->{key} = 'val';

gdb says​:

Program received signal SIGSEGV, Segmentation fault.
0x080ed041 in Perl_mg_clear (my_perl=0x81fa008, sv=0x81fe3d0) at mg.c​:376
376 if (vtbl && vtbl->svt_clear)
(gdb) bt
#0 0x080ed041 in Perl_mg_clear (my_perl=0x81fa008, sv=0x81fe3d0) at
mg.c​:376
#1 0x08107264 in Perl_hv_undef_flags (my_perl=0x81fa008, hv=0x81fe3d0,
  flags=2) at hv.c​:1872
#2 0x08122976 in Perl_sv_clear (my_perl=0x81fa008, orig_sv=0x81fe3d0)
  at sv.c​:6294
#3 0x08123146 in Perl_sv_free2 (my_perl=0x81fa008, sv=0x81fe3d0) at
sv.c​:6506
#4 0x08129a87 in Perl_sv_unref_flags (my_perl=0x696c6174, ref=0x8217270,
  flags=1) at sv.c​:9623
#5 0x0811f776 in Perl_sv_force_normal_flags (my_perl=0x81fa008,
sv=0x8217270,
  flags=1) at sv.c​:4834
#6 0x0814f6e9 in Perl_leave_scope (my_perl=0x81fa008, base=0) at
scope.c​:914
#7 0x0814d1ff in Perl_pop_scope (my_perl=0x696c6174) at scope.c​:110
#8 0x08158155 in Perl_pp_leave (my_perl=0x81fa008) at pp_ctl.c​:2152
#9 0x0810c4e7 in Perl_runops_standard (my_perl=0x81fa008) at run.c​:41
#10 0x0807d373 in S_run_body (my_perl=0x81fa008, oldscope=1) at perl.c​:2400
#11 0x0807ce5b in perl_run (my_perl=0x81fa008) at perl.c​:2318
#12 0x0805d96d in main (argc=2, argv=0xbffff594, env=0xbffff5a0)
  at perlmain.c​:120

valgrind says​:

==26758== Conditional jump or move depends on uninitialised value(s)
==26758== at 0x80ED06B​: Perl_mg_clear (mg.c​:370)
==26758== by 0x8107263​: Perl_hv_undef_flags (hv.c​:1872)
==26758== by 0x8122975​: Perl_sv_clear (sv.c​:6294)
==26758== by 0x8123145​: Perl_sv_free2 (sv.c​:6506)
==26758== by 0x8129A86​: Perl_sv_unref_flags (sv.c​:9623)
==26758== by 0x811F775​: Perl_sv_force_normal_flags (sv.c​:4834)
==26758== by 0x814F6E8​: Perl_leave_scope (scope.c​:914)
==26758== by 0x814D1FE​: Perl_pop_scope (scope.c​:110)
==26758== by 0x8158154​: Perl_pp_leave (pp_ctl.c​:2152)
==26758== by 0x810C4E6​: Perl_runops_standard (run.c​:41)
==26758== by 0x807D372​: S_run_body (perl.c​:2400)
==26758== by 0x807CE5A​: perl_run (perl.c​:2318)
==26758== by 0x805D96C​: main (perlmain.c​:120)
==26758==
==26758== Use of uninitialised value of size 4
==26758== at 0x80ED02A​: Perl_mg_clear (mg.c​:371)
==26758== by 0x8107263​: Perl_hv_undef_flags (hv.c​:1872)
==26758== by 0x8122975​: Perl_sv_clear (sv.c​:6294)
==26758== by 0x8123145​: Perl_sv_free2 (sv.c​:6506)
==26758== by 0x8129A86​: Perl_sv_unref_flags (sv.c​:9623)
==26758== by 0x811F775​: Perl_sv_force_normal_flags (sv.c​:4834)
==26758== by 0x814F6E8​: Perl_leave_scope (scope.c​:914)
==26758== by 0x814D1FE​: Perl_pop_scope (scope.c​:110)
==26758== by 0x8158154​: Perl_pp_leave (pp_ctl.c​:2152)
==26758== by 0x810C4E6​: Perl_runops_standard (run.c​:41)
==26758== by 0x807D372​: S_run_body (perl.c​:2400)
==26758== by 0x807CE5A​: perl_run (perl.c​:2318)
==26758== by 0x805D96C​: main (perlmain.c​:120)
==26758==
==26758== Use of uninitialised value of size 4
==26758== at 0x80ED033​: Perl_mg_clear (mg.c​:374)
==26758== by 0x8107263​: Perl_hv_undef_flags (hv.c​:1872)
==26758== by 0x8122975​: Perl_sv_clear (sv.c​:6294)
==26758== by 0x8123145​: Perl_sv_free2 (sv.c​:6506)
==26758== by 0x8129A86​: Perl_sv_unref_flags (sv.c​:9623)
==26758== by 0x811F775​: Perl_sv_force_normal_flags (sv.c​:4834)
==26758== by 0x814F6E8​: Perl_leave_scope (scope.c​:914)
==26758== by 0x814D1FE​: Perl_pop_scope (scope.c​:110)
==26758== by 0x8158154​: Perl_pp_leave (pp_ctl.c​:2152)
==26758== by 0x810C4E6​: Perl_runops_standard (run.c​:41)
==26758== by 0x807D372​: S_run_body (perl.c​:2400)
==26758== by 0x807CE5A​: perl_run (perl.c​:2318)
==26758== by 0x805D96C​: main (perlmain.c​:120)
==26758==
==26758== Invalid read of size 4
==26758== at 0x80ED041​: Perl_mg_clear (mg.c​:376)
==26758== by 0x8107263​: Perl_hv_undef_flags (hv.c​:1872)
==26758== by 0x8122975​: Perl_sv_clear (sv.c​:6294)
==26758== by 0x8123145​: Perl_sv_free2 (sv.c​:6506)
==26758== by 0x8129A86​: Perl_sv_unref_flags (sv.c​:9623)
==26758== by 0x811F775​: Perl_sv_force_normal_flags (sv.c​:4834)
==26758== by 0x814F6E8​: Perl_leave_scope (scope.c​:914)
==26758== by 0x814D1FE​: Perl_pop_scope (scope.c​:110)
==26758== by 0x8158154​: Perl_pp_leave (pp_ctl.c​:2152)
==26758== by 0x810C4E6​: Perl_runops_standard (run.c​:41)
==26758== by 0x807D372​: S_run_body (perl.c​:2400)
==26758== by 0x807CE5A​: perl_run (perl.c​:2318)
==26758== by 0x805D96C​: main (perlmain.c​:120)
==26758== Address 0x696c6180 is not stack'd, malloc'd or (recently) free'd
==26758==
==26758==
==26758== Process terminating with default action of signal 11 (SIGSEGV)
==26758== Access not within mapped region at address 0x696C6180
==26758== at 0x80ED041​: Perl_mg_clear (mg.c​:376)
==26758== by 0x8107263​: Perl_hv_undef_flags (hv.c​:1872)
==26758== by 0x8122975​: Perl_sv_clear (sv.c​:6294)
==26758== by 0x8123145​: Perl_sv_free2 (sv.c​:6506)
==26758== by 0x8129A86​: Perl_sv_unref_flags (sv.c​:9623)
==26758== by 0x811F775​: Perl_sv_force_normal_flags (sv.c​:4834)
==26758== by 0x814F6E8​: Perl_leave_scope (scope.c​:914)
==26758== by 0x814D1FE​: Perl_pop_scope (scope.c​:110)
==26758== by 0x8158154​: Perl_pp_leave (pp_ctl.c​:2152)
==26758== by 0x810C4E6​: Perl_runops_standard (run.c​:41)
==26758== by 0x807D372​: S_run_body (perl.c​:2400)
==26758== by 0x807CE5A​: perl_run (perl.c​:2318)
==26758== by 0x805D96C​: main (perlmain.c​:120)
==26758== If you believe this happened as a result of a stack
==26758== overflow in your program's main thread (unlikely but
==26758== possible), you can try to increase the size of the
==26758== main thread stack using the --main-stacksize= flag.
==26758== The main thread stack size used in this run was 8388608.

(In case you cannot find Glib on CPAN---there's some index issue
currently---you can use
<http​://sourceforge.net/projects/gtk2-perl/files/Glib/1.242/Glib-1.242.tar.gz/download>.)

'git bisect' points at the below commit as the culprit.

On 06.03.2012 15​:35, Dave Mitchell wrote​:

commit 5bec93b
Author​: David Mitchell<davem@​iabyn.com>
AuthorDate​: Tue Mar 6 14​:26​:27 2012 +0000
Commit​: David Mitchell<davem@​iabyn.com>
CommitDate​: Tue Mar 6 14​:26​:27 2012 +0000

 fix slowdown in nested hash freeing
Perl Info

Flags:
     category=core
     severity=medium

Site configuration information for perl 5.15.9:

Configured by torsten at Sun Mar 25 14:02:45 CEST 2012.

Summary of my perl5 (revision 5 version 15 subversion 9) configuration:

   Platform:
     osname=linux, osvers=3.0.0-16-generic-pae, 
archname=i686-linux-thread-multi
     uname='linux home.hcsiteeffak.de 3.0.0-16-generic-pae #29-ubuntu 
smp tue feb 14 13:56:31 utc 2012 i686 athlon i386 gnulinux '
     config_args='-Dprefix=/opt/perls/perl-5.15.9 -Dusethreads 
-Doptimize=-g -Dusedevel -des'
     hint=recommended, useposix=true, d_sigaction=define
     useithreads=define, usemultiplicity=define
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=undef, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing 
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
     optimize='-g',
     cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe 
-fstack-protector -I/usr/local/include'
     ccversion='', gccversion='4.6.1', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
     libpth=/usr/local/lib /lib/i386-linux-gnu /lib/../lib 
/usr/lib/i386-linux-gnu /usr/lib/../lib /lib /usr/lib
     libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc 
-lgdbm_compat
     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
     libc=, so=so, useshrplib=false, libperl=libperl.a
     gnulibc_version='2.13'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
     cccdlflags='-fPIC', lddlflags='-shared -g -L/usr/local/lib 
-fstack-protector'

Locally applied patches:



@INC for perl 5.15.9:
     /opt/perls/perl-5.15.9-lib/lib/perl5/i686-linux-thread-multi
     /opt/perls/perl-5.15.9-lib/lib/perl5
     /opt/perls/perl-5.15.9/lib/site_perl/5.15.9/i686-linux-thread-multi
     /opt/perls/perl-5.15.9/lib/site_perl/5.15.9
     /opt/perls/perl-5.15.9/lib/5.15.9/i686-linux-thread-multi
     /opt/perls/perl-5.15.9/lib/5.15.9
     .


Environment for perl 5.15.9:
     HOME=/home/torsten
     LANG=de_DE.UTF-8
     LANGUAGE=en
     LC_COLLATE=en_US.UTF-8
     LC_CTYPE=en_US.UTF-8
     LC_MEASUREMENT=de_DE.UTF-8
     LC_MESSAGES=en_US.UTF-8
     LC_MONETARY=de_DE.UTF-8
     LC_NUMERIC=de_DE.UTF-8
     LC_PAPER=de_DE.UTF-8
     LC_TIME=de_DE.UTF-8
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
 
PATH=/opt/perls/perl-5.15.9-lib/bin:/opt/perls/perl-5.15.9/bin:/opt/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
     PERL5LIB=/opt/perls/perl-5.15.9-lib/lib/perl5
     PERL5PREFIX=/opt/perls/perl-5.15.9-lib
     PERL_BADLANG (unset)
     PERL_MB_OPT=--install_base=/opt/perls/perl-5.15.9-lib
     PERL_MM_OPT=INSTALL_BASE=/opt/perls/perl-5.15.9-lib
     SHELL=/usr/bin/zsh

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 25, 2012

From @cpansprout

On Sun Mar 25 07​:56​:30 2012, kaffeetisch@​gmx.de wrote​:

With perl 5.15.9 (and blead) multiple of Glib's tests segfault. This
reproduces the issue​:

use Glib;
my $obj = Glib​::Object->new;
$obj->{key} = 'val';

'git bisect' points at the below commit as the culprit.

On 06.03.2012 15​:35, Dave Mitchell wrote​:

commit 5bec93b
Author​: David Mitchell<davem@​iabyn.com>
AuthorDate​: Tue Mar 6 14​:26​:27 2012 +0000
Commit​: David Mitchell<davem@​iabyn.com>
CommitDate​: Tue Mar 6 14​:26​:27 2012 +0000

 fix slowdown in nested hash freeing

This is a new regression in the last month. I think we really need to
fix this before 5.16. Can this be made a blocker?

--

Father Chrysostomos

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 25, 2012

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 26, 2012

From @iabyn

fixed with f37f40f

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 26, 2012

@iabyn - Status changed from 'open' to 'resolved'

@p5pRT p5pRT closed this Mar 26, 2012
@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 27, 2012

From @rjbs

* Father Chrysostomos via RT <perlbug-followup@​perl.org> [2012-03-25T13​:52​:43]

This is a new regression in the last month. I think we really need to
fix this before 5.16. Can this be made a blocker?

Done.

--
rjbs

@p5pRT
Copy link
Collaborator Author

@p5pRT p5pRT commented Mar 27, 2012

From @andk

On Sun, 25 Mar 2012 07​:56​:31 -0700, Torsten Schoenfeld (via RT) <perlbug-followup@​perl.org> said​:

tsch> (In case you cannot find Glib on CPAN---there's some index issue
tsch> currently---you can use
tsch> <http​://sourceforge.net/projects/gtk2-perl/files/Glib/1.242/Glib-1.242.tar.gz/download>.)

If I can help you to resolve the indexing issue, please let me know.
Having a distro that is both not indexed and involved in a blocker is a
pita.

On Mon, 26 Mar 2012 22​:22​:22 -0400, Ricardo Signes <perl.p5p@​rjbs.manxome.org> said​:

rjbs> * Father Chrysostomos via RT <perlbug-followup@​perl.org> [2012-03-25T13​:52​:43]

This is a new regression in the last month. I think we really need to
fix this before 5.16. Can this be made a blocker?

rjbs> Done.

Fixed with v5.15.9-39-gf37f40f according to Message-ID​:
<20120326140153.GB2918@​iabyn.com>

Tested by myself against XAOC/Glib-1.242.tar.gz, XAOC/Glib-1.250.tar.gz,
and XAOC/Glib-1.252_001.tar.gz

--
andreas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.