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

Bleadperl breaks DROLSKY/Fey-0.43.tar.gz on Windows and other OSes #16524

Closed
p5pRT opened this issue Apr 21, 2018 · 15 comments
Closed

Bleadperl breaks DROLSKY/Fey-0.43.tar.gz on Windows and other OSes #16524

p5pRT opened this issue Apr 21, 2018 · 15 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 21, 2018

Migrated from rt.perl.org#133139 (status was 'open')

Searchable as RT133139$

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2018

From @chorny

Worked on 5.26.1 and 5.27.6, fails on 5.27.8. Also fails on 5.26.2RC1​:
http​://www.cpantesters.org/cpan/report/a38b01d5-6c17-1014-a45b-c247befa3bc8

t/SQL/Select-from-clause.t​:

ok 1 - from() without any parameters is an error
ok 2 - from_clause() for one table
ok 3 - from() called with one non-table argument
ok 4 - from_clause() for one table alias
ok 5 - from_clause() with self-join to alias using fake FK
ok 6 - Cannot join two tables without a foreign key
ok 7 - from() called with two args, one not a table
ok 8 - from() called with two args, one not a table
ok 9 - from_clause() for two tables, fk not provided
ok 10 - from_clause() for two joins
Use of freed value in iteration at
C​:/Strawberry2710/perl/site/lib/Test/MockObject.pm line 257.
Attempt to free unreferenced scalar​: SV 0x2615824, Perl interpreter​:
0x3f9fb4 at C​:/Strawberry2710/perl/site/lib/Test/MockObject.pm line
257.

Also reported in this module bug tracker
https://rt.cpan.org/Ticket/Display.html?id=125168

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.27.10:

Configured by strawberry-perl at Mon Apr  2 14:39:04 2018.

Summary of my perl5 (revision 5 version 27 subversion 10) configuration:

  Platform:
    osname=MSWin32
    osvers=5.1.2600
    archname=MSWin32-x86-multi-thread-64int
    uname='Win32 strawberry-perl 5.27.10.1-beta1 #1 Mon Apr  2
14:36:35 2018 i386'
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags =' -s -O2 -DWIN32 -D__USE_MINGW_ANSI_STDIO
-DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields'
    optimize='-s -O2'
    cppflags='-DWIN32'
    ccversion=''
    gccversion='7.1.0'
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=4
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=12
    longdblkind=3
    ivtype='long long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='long long'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='g++'
    ldflags ='-s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'
    libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\i686-w64-mingw32\lib
C:\STRAWB~1\c\lib\gcc\i686-w64-mingw32\7.1.0
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
-lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
    libc=
    so=dll
    useshrplib=true
    libperl=libperl527.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=xs.dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"'



@INC for perl 5.27.10:
    C:/Strawberry2710/perl/site/lib
    C:/Strawberry2710/perl/vendor/lib
    C:/Strawberry2710/perl/lib


Environment for perl 5.27.10:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\Program Files\Far
Manager\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Git\cmd;C:\Strawberry2710\c\bin;C:\Strawberry2710\perl\site\bin;C:\Strawberry2710\perl\bin
    PERL_BADLANG (unset)
    PERL_HASH_SEED=0x11111111
    SHELL (unset)


-- 
Alexandr Ciornii, http://chorny.net

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2018

From @jkeenan

On Sat, 21 Apr 2018 21​:59​:00 GMT, chorny wrote​:

This is a bug report for perl,
generated with the help of perlbug 1.41 running under perl 5.27.10.

-----------------------------------------------------------------
[Please describe your issue here]

Worked on 5.26.1 and 5.27.6, fails on 5.27.8. Also fails on 5.26.2RC1​:
http​://www.cpantesters.org/cpan/report/a38b01d5-6c17-1014-a45b-
c247befa3bc8

t/SQL/Select-from-clause.t​:

ok 1 - from() without any parameters is an error
ok 2 - from_clause() for one table
ok 3 - from() called with one non-table argument
ok 4 - from_clause() for one table alias
ok 5 - from_clause() with self-join to alias using fake FK
ok 6 - Cannot join two tables without a foreign key
ok 7 - from() called with two args, one not a table
ok 8 - from() called with two args, one not a table
ok 9 - from_clause() for two tables, fk not provided
ok 10 - from_clause() for two joins
Use of freed value in iteration at
C​:/Strawberry2710/perl/site/lib/Test/MockObject.pm line 257.
Attempt to free unreferenced scalar​: SV 0x2615824, Perl interpreter​:
0x3f9fb4 at C​:/Strawberry2710/perl/site/lib/Test/MockObject.pm line
257.

But not just on Windows. I just tried to build it on FreeBSD-11.0 at commit 41ed02688 and got a FAIL with the rather uninformative output attached.

Also reported in this module bug tracker
https://rt.cpan.org/Ticket/Display.html?id=125168

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags​:
category=core
severity=low
---
Site configuration information for perl 5.27.10​:

Configured by strawberry-perl at Mon Apr 2 14​:39​:04 2018.

Summary of my perl5 (revision 5 version 27 subversion 10)
configuration​:

Platform​:
osname=MSWin32
osvers=5.1.2600
archname=MSWin32-x86-multi-thread-64int
uname='Win32 strawberry-perl 5.27.10.1-beta1 #1 Mon Apr 2
14​:36​:35 2018 i386'
config_args='undef'
hint=recommended
useposix=true
d_sigaction=undef
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=undef
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
bincompat5005=undef
Compiler​:
cc='gcc'
ccflags =' -s -O2 -DWIN32 -D__USE_MINGW_ANSI_STDIO
-DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields'
optimize='-s -O2'
cppflags='-DWIN32'
ccversion=''
gccversion='7.1.0'
gccosandvers=''
intsize=4
longsize=4
ptrsize=4
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=12
longdblkind=3
ivtype='long long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='long long'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries​:
ld='g++'
ldflags ='-s -L"C​:\STRAWB1\perl\lib\CORE" -L"C​:\STRAWB1\c\lib"'
libpth=C​:\STRAWB1\c\lib C​:\STRAWB1\c\i686-w64-mingw32\lib
C​:\STRAWB1\c\lib\gcc\i686-w64-mingw32\7.1.0
libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
-lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32
libc=
so=dll
useshrplib=true
libperl=libperl527.a
gnulibc_version=''
Dynamic Linking​:
dlsrc=dl_win32.xs
dlext=xs.dll
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags='-mdll -s -L"C​:\STRAWB
1\perl\lib\CORE"
-L"C​:\STRAWB~1\c\lib"'

---
@​INC for perl 5.27.10​:
C​:/Strawberry2710/perl/site/lib
C​:/Strawberry2710/perl/vendor/lib
C​:/Strawberry2710/perl/lib

---
Environment for perl 5.27.10​:
HOME (unset)
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=C​:\Program Files\Far
Manager\;C​:\WINDOWS\system32;C​:\WINDOWS;C​:\WINDOWS\System32\Wbem;C​:\Git\cmd;C​:\Strawberry2710\c\bin;C​:\Strawberry2710\perl\site\bin;C​:\Strawberry2710\perl\bin
PERL_BADLANG (unset)
PERL_HASH_SEED=0x11111111
SHELL (unset)

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2018

From @jkeenan

t/SQL/Select-from-clause.t ..
ok 1 - from() without any parameters is an error
ok 2 - from_clause() for one table
ok 3 - from() called with one non-table argument
ok 4 - from_clause() for one table alias
ok 5 - from_clause() with self-join to alias using fake FK
ok 6 - Cannot join two tables without a foreign key
ok 7 - from() called with two args, one not a table
ok 8 - from() called with two args, one not a table
All 8 subtests passed

Test Summary Report


t/SQL/Select-from-clause.t (Wstat​: 139 Tests​: 8 Failed​: 0)
  Non-zero wait status​: 139
  Parse errors​: No plan found in TAP output
Files=1, Tests=8, 1 wallclock secs ( 0.03 usr 0.01 sys + 0.94 cusr 0.16 csys = 1.14 CPU)
Result​: FAIL

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2018

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

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2018

From @jkeenan

On Sat, 21 Apr 2018 22​:31​:49 GMT, jkeenan wrote​:

On Sat, 21 Apr 2018 21​:59​:00 GMT, chorny wrote​:

This is a bug report for perl,
generated with the help of perlbug 1.41 running under perl 5.27.10.

-----------------------------------------------------------------
[Please describe your issue here]

Worked on 5.26.1 and 5.27.6, fails on 5.27.8. Also fails on
5.26.2RC1​:
http​://www.cpantesters.org/cpan/report/a38b01d5-6c17-1014-a45b-
c247befa3bc8

t/SQL/Select-from-clause.t​:

ok 1 - from() without any parameters is an error
ok 2 - from_clause() for one table
ok 3 - from() called with one non-table argument
ok 4 - from_clause() for one table alias
ok 5 - from_clause() with self-join to alias using fake FK
ok 6 - Cannot join two tables without a foreign key
ok 7 - from() called with two args, one not a table
ok 8 - from() called with two args, one not a table
ok 9 - from_clause() for two tables, fk not provided
ok 10 - from_clause() for two joins
Use of freed value in iteration at
C​:/Strawberry2710/perl/site/lib/Test/MockObject.pm line 257.
Attempt to free unreferenced scalar​: SV 0x2615824, Perl interpreter​:
0x3f9fb4 at C​:/Strawberry2710/perl/site/lib/Test/MockObject.pm line
257.

But not just on Windows. I just tried to build it on FreeBSD-11.0 at
commit 41ed02688 and got a FAIL with the rather uninformative output
attached.

Attaching excerpt from running the file through the debugger.

Also reported in this module bug tracker
https://rt.cpan.org/Ticket/Display.html?id=125168

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2018

From @jkeenan

main​::(t/SQL/Select-from-clause.t​:11)​:
11​: my $s = Fey​::Test->mock_test_schema_with_fks();
ok 1 - from() without any parameters is an error
ok 2 - from_clause() for one table
ok 3 - from() called with one non-table argument
ok 4 - from_clause() for one table alias
ok 5 - from_clause() with self-join to alias using fake FK
ok 6 - Cannot join two tables without a foreign key
ok 7 - from() called with two args, one not a table
ok 8 - from() called with two args, one not a table
Signal SEGV at blib/lib/Fey/SQL/Select.pm line 237.

  Fey​::SQL​::Select​::_join(Fey​::SQL​::Select=HASH(0x809edcdf8), Fey​::Table=HASH(0x809ed2af8), Fey​::Table=HASH(0x809ed41b0)) called at blib/lib/Fey/SQL/Select.pm line 206

  Fey​::SQL​::Select​::from(Fey​::SQL​::Select=HASH(0x809edcdf8), Fey​::Table=HASH(0x809ed2af8), Fey​::Table=HASH(0x809ed41b0)) called at t/SQL/Select-from-clause.t line 111

Abort trap (core dumped)

@p5pRT
Copy link
Author

p5pRT commented Apr 21, 2018

From @jkeenan

On Sat, 21 Apr 2018 22​:40​:45 GMT, jkeenan wrote​:

On Sat, 21 Apr 2018 22​:31​:49 GMT, jkeenan wrote​:

On Sat, 21 Apr 2018 21​:59​:00 GMT, chorny wrote​:

This is a bug report for perl,
generated with the help of perlbug 1.41 running under perl 5.27.10.

-----------------------------------------------------------------
[Please describe your issue here]

Worked on 5.26.1 and 5.27.6, fails on 5.27.8. Also fails on
5.26.2RC1​:
http​://www.cpantesters.org/cpan/report/a38b01d5-6c17-1014-a45b-
c247befa3bc8

t/SQL/Select-from-clause.t​:

ok 1 - from() without any parameters is an error
ok 2 - from_clause() for one table
ok 3 - from() called with one non-table argument
ok 4 - from_clause() for one table alias
ok 5 - from_clause() with self-join to alias using fake FK
ok 6 - Cannot join two tables without a foreign key
ok 7 - from() called with two args, one not a table
ok 8 - from() called with two args, one not a table
ok 9 - from_clause() for two tables, fk not provided
ok 10 - from_clause() for two joins
Use of freed value in iteration at
C​:/Strawberry2710/perl/site/lib/Test/MockObject.pm line 257.
Attempt to free unreferenced scalar​: SV 0x2615824, Perl interpreter​:
0x3f9fb4 at C​:/Strawberry2710/perl/site/lib/Test/MockObject.pm line
257.

But not just on Windows. I just tried to build it on FreeBSD-11.0 at
commit 41ed02688 and got a FAIL with the rather uninformative output
attached.

Attaching excerpt from running the file through the debugger.

Also reported in this module bug tracker
https://rt.cpan.org/Ticket/Display.html?id=125168

On Linux, I got​:

#####
$ bleadperl -Iblib/lib t/SQL/Select-from-clause.t
ok 1 - from() without any parameters is an error
ok 2 - from_clause() for one table
ok 3 - from() called with one non-table argument
ok 4 - from_clause() for one table alias
ok 5 - from_clause() with self-join to alias using fake FK
ok 6 - Cannot join two tables without a foreign key
ok 7 - from() called with two args, one not a table
ok 8 - from() called with two args, one not a table
ok 9 - from_clause() for two tables, fk not provided
perl​: sv.c​:6513​: Perl_sv_clear​: Assertion `SvTYPE(sv) != (svtype)SVTYPEMASK' failed.
Aborted (core dumped)
#####
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2018

From @dur-randir

On Sat, 21 Apr 2018 14​:59​:00 -0700, chorny wrote​:

Worked on 5.26.1 and 5.27.6, fails on 5.27.8. Also fails on 5.26.2RC1​:
http​://www.cpantesters.org/cpan/report/a38b01d5-6c17-1014-a45b-
c247befa3bc8

16ada23 is the first bad commit
commit 16ada23
Author​: Zefram <zefram@​fysh.org>
Date​: Tue Dec 12 09​:47​:41 2017 +0000

  fix GvSV refcounting in sort

  Where a sort operation passes the comparands to a comparison block in $a
  and $b, it wasn't taking account of the fact that the GvSV slots in *a
  and *b are refcounted. It would write the comparands into those slots
  without altering any reference counts, and end by restoring the values
  those slots had to start with. This was all fine so long as nothing
  else touched those slots during the process. But code running during
  the comparison is free to write to them by "*a = \1", which does frob
  the reference counts.

  Fix it by switching sort to manipulate GvSV in a refcount-preserving
  manner, compatible with all other operations on those slots. Fixes
  [perl #92264].

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2018

From @autarch

I took a look at this and I'm not sure exactly what's going on. I narrowed down the failure to this bit of code in Fey​::SQL​::Fragment​::Join​:L

  my @​tables = $self->tables();
  @​tables = sort { $a->name() cmp $b->name() } @​tables
  unless $self->_is_left_or_right_outer_join();

Specifically, the `sort` is blowing up. The values in @​tables are Fey​::Table objects. The `->name` method simply returns a regular string.

This seems to me like a bug in the Perl core that needs to be fixed before 5.28 is released.

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2018

From @khwilliamson

On 04/22/2018 09​:38 AM, Dave Rolsky via RT wrote​:

This seems to me like a bug in the Perl core that needs to be fixed before 5.28 is released.

James Keenan had already added this to the blockers list

@p5pRT
Copy link
Author

p5pRT commented Apr 22, 2018

From @dur-randir

Switching from List​::AllUtils to List​::MoreUtils​::PP makes this crash go away. So, it looks like a #132671 duplicate.

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2018

From @jkeenan

On Sun, 22 Apr 2018 20​:15​:53 GMT, randir wrote​:

Switching from List​::AllUtils to List​::MoreUtils​::PP makes this crash
go away. So, it looks like a #132671 duplicate.

At which points in Fey's codebase would you make such changes?

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2018

From @Grinnz

On Sun, 22 Apr 2018 17​:38​:44 -0700, jkeenan wrote​:

On Sun, 22 Apr 2018 20​:15​:53 GMT, randir wrote​:

Switching from List​::AllUtils to List​::MoreUtils​::PP makes this crash
go away. So, it looks like a #132671 duplicate.

At which points in Fey's codebase would you make such changes?

I think he was stating in terms of diagnosing the issue to be due to List​::SomeUtils​::XS (used by List​::AllUtils) which is a fork of List​::MoreUtils​::XS, which the mentioned issue refers to. Thus it should be fixed in those modules.

@p5pRT
Copy link
Author

p5pRT commented Apr 23, 2018

From @iabyn

On Sun, Apr 22, 2018 at 09​:11​:03PM -0700, Dan Book via RT wrote​:

On Sun, 22 Apr 2018 17​:38​:44 -0700, jkeenan wrote​:

On Sun, 22 Apr 2018 20​:15​:53 GMT, randir wrote​:

Switching from List​::AllUtils to List​::MoreUtils​::PP makes this crash
go away. So, it looks like a #132671 duplicate.

At which points in Fey's codebase would you make such changes?

I think he was stating in terms of diagnosing the issue to be due to
List​::SomeUtils​::XS (used by List​::AllUtils) which is a fork of
List​::MoreUtils​::XS, which the mentioned issue refers to. Thus it should
be fixed in those modules.

So I'll remove this ticket form the 5.28 blockers

--
Nothing ventured, nothing lost.

@xenu
Copy link
Member

xenu commented Oct 20, 2021

This is a duplicate of #16346. Closing.

@xenu xenu closed this as completed Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants