-
Notifications
You must be signed in to change notification settings - Fork 42
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
UTF-8 and threads #271
Comments
I will try to answer some of these as best I can: On Sat, Jul 6, 2013 at 8:09 PM, Michael-Adams notifications@gh.neting.ccwrote:
No idea, needs investigation
So of the issues 1 is known, but not fixed (utf8/fork issues) Not sure if |
Ok, so... On 2013-07-06 23:58, Chad Granum wrote:
Understood, I keep tripping over the rather awful utf8 issues in perl
Will await the new release, and they're just depreciation warnings, so
Thanks! If I can help by testing or supplying any other info for any of Michael Adams |
On Sat, Jul 6, 2013 at 10:22 PM, Michael Adams notifications@gh.neting.ccwrote:
|
On 2013-07-07 17:04, Chad Granum wrote:
use strict; my $child = Child->new( sub { my $proc = $child->start; It dies in Child.pm on line 61: if ( my $pid = fork() ) { If one comments out the "use utf8::all;" line, it goes to completion. Not quite sure where to go from here... It's looking like maybe a p5p Michael Adams |
http://www.nntp.perl.org/group/perl.perl5.porters/2012/12/msg196821.html On Sun, Jul 7, 2013 at 5:08 PM, Michael Adams notifications@gh.neting.ccwrote:
|
https://rt.perl.org/rt3//Public/Bug/Display.html?id=31923 On Sun, Jul 7, 2013 at 5:19 PM, Chad Granum exodist7@gmail.com wrote:
|
This really is not a perl5i bug. It is a bug with threads and utf8. It is Perl5i has a choice between utf8-all and broken fork, or working fork w/o However, If utf8all is scoped, it might be possible to have Child.pm On Sun, Jul 7, 2013 at 5:22 PM, Chad Granum exodist7@gmail.com wrote:
|
Looks like it is lexical, I am going to see if I can find a solution. On Sun, Jul 7, 2013 at 5:26 PM, Chad Granum exodist7@gmail.com wrote:
|
On 2013-07-07 19:29, Chad Granum wrote:
Traipsed through the Perl source code involved, took Ibuprofen... If you can turn the utf8 off for Child.pm, it may be the only fix until There seems to be more than one possibly dodgy stack Later on this week I'll try digging into the other 2 items. Michael Adams |
I was not able to find a way to lexically tun it off in Child. I was able I think perl5i should probably not include utf8 on windows. I say this At the same time I am hesitant to suggest we remove utf8-all because if We could also skip the child.pm tests in win32 under perl5i, but then On Sun, Jul 7, 2013 at 6:14 PM, Michael Adams notifications@gh.neting.ccwrote:
|
So the possibilities are a "$^O" test in perl5i startup code that :
|
Actually. Maybe a better solution in perl5i would be to override On Sun, Jul 7, 2013 at 7:01 PM, Michael Adams notifications@gh.neting.ccwrote:
|
I think I'd +1 the CORE::GLOBAL::Fork solution for win32 installs of perl5i. And of course I must'a been all goofy from reading "sv.c"; threads and utf8 are contraindicated on seemingly all systems... |
I would prefer to have Schwern and others weigh in on this, I don't think On Sun, Jul 7, 2013 at 7:29 PM, Michael Adams notifications@gh.neting.ccwrote:
|
On 2013-07-07 22:13, Chad Granum wrote:
True, thus the /"I t//hink I'd +1"/part:) and anyway Schwern being more Michael Adams |
I do not relish having some features that only work on some platforms. I chose Child for perl5i not just because it provides a nice interface to |
Making Child use threads on windows would be sane, and would solve many problems. That said it will not solve this problem :-( https://rt.perl.org/Public/Bug/Display.html?id=31923 is the rt ticket that covers the problem in perl itself. Basically "PerlIO::encoding isn't thread safe." There is a workaround I use in Test2: Which uses Note that linux also has this problem, the reason we only notice on windows is because fork on windows is actually threads under the hood. If you used perl5i with threads you would likely encounter the same issue on linux, |
Hmm, another option would be to require a newer version of perl, it appears the issue was fixed in blead last October, but I think that means depending on 5.24.0+. |
If threads + :encoding(utf8) is as broken as that perlbug thread says, I think I'll have perl5i use just :utf8. |
@schwern I agree that is probably the most sane option. |
doherty/utf8-all#43 should fix this problem. Once it's in utf8::all we'll depend on the new version. |
Damn, that didn't fix it. But it got us further along.
I've seen that "free to wrong pool" before when trying to free memory using Perl's free() that was allocated using the system's malloc(). |
I haven't had any real issues from doing a "force install perl5i" show up yet. But I notice that all the Windows smoke test results on CPAN Testers share the failures listed below.
Please note that Child-0.009 installed without a hitch, not sure why it's failing your test in t/Child.t... I've attached (at the end) output of "perl -V". I'm using Citrus Perl 5.16018 and the mingw64 package they provide.
Thank you and I have been (so far) enjoying perl5i!
cpan[15]> test perl5i
Running test for module 'perl5i'
Running make for M/MS/MSCHWERN/perl5i-v2.12.0.tar.gz
Checksum for C:\Opt\bin\perl\cpan\sources\authors\id\M\MS\MSCHWERN\perl5i-v2.12.0.tar.gz ok
CPAN.pm: Building M/MS/MSCHWERN/perl5i-v2.12.0.tar.gz
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'perl5i' version 'v2.12.0'
Building perl5i
-->8-->8--snipped out some pod linking issue stuff-->8-->8---
MSCHWERN/perl5i-v2.12.0.tar.gz
C:\Opt\bin\perl\bin\perl.exe ./Build -- OK
Running Build test
t/ARGV.t ..................... ok
t/ARGV_twice.t ............... ok
t/CLASS.t .................... ok
t/Child.t .................... Dubious, test returned 5 (wstat 1280, 0x500)
All 1 subtests passed
t/English.t .................. ok
t/File-stat.t ................ ok
t/List-MoreUtils/all.t ....... ok
t/List-MoreUtils/any.t ....... ok
t/List-MoreUtils/false.t ..... ok
t/List-MoreUtils/mesh.t ...... ok
t/List-MoreUtils/minmax.t .... ok
t/List-MoreUtils/none.t ...... ok
t/List-MoreUtils/true.t ...... ok
t/List-MoreUtils/uniq.t ...... ok
t/List-Util/first.t .......... ok
t/List-Util/max.t ............ ok
t/List-Util/maxstr.t ......... ok
t/List-Util/min.t ............ ok
t/List-Util/minstr.t ......... ok
t/List-Util/reduce.t ......... ok
t/List-Util/shuffle.t ........ ok
t/List-Util/sum.t ............ ok
t/Meta/ISA.t ................. ok
t/Meta/checksum.t ............ ok
t/Meta/class.t ............... ok
t/Meta/id.t .................. ok
t/Meta/is-equal.t ............ ok
t/Meta/linear_isa.t .......... ok
t/Meta/methods.t ............. ok
t/Meta/reftype.t ............. ok
t/Meta/super.t ............... ok
t/Meta/symbol_table.t ........ ok
t/Want.t ..................... ok
t/alias.t .................... ok
t/as_hash.t .................. ok
t/autobox.t .................. ok
t/autodie.t .................. ok
t/autovivification.t ......... ok
t/caller.t ................... ok
t/can.t ...................... ok
t/capture.t .................. ok
t/carp.t ..................... ok
t/center.t ................... ok
t/chdir.t .................... ok
t/command_line_wrapper.t ..... 1/? "blib\script\perl5i.bat" unexpectedly returned exit value 255 at (eval 95) line 13.
at t/command_line_wrapper.t line 25
Tests were run but no plan was declared and done_testing() was not seen.
t/command_line_wrapper.t ..... Dubious, test returned 255 (wstat 65280, 0xff00)
All 2 subtests passed
t/commify.t .................. ok
t/datetime.t ................. ok
t/die.t ...................... ok
t/diff.t ..................... ok
t/dump/array.t ............... ok
t/dump/code.t ................ ok
t/dump/formats.t ............. ok
t/dump/hash.t ................ ok
t/dump/obj.t ................. ok
t/dump/scalar.t .............. ok
t/each.t ..................... eech is deprecated, use hmap instead at C:\Opt\bin\perl\cpan\build\perl5i-v2.12.0-E7oIvh\blib\lib/perl5i/2/HASH.pm line 15.
t/each.t ..................... 1/? eech is deprecated, use hmap instead at C:\Opt\bin\perl\cpan\build\perl5i-v2.12.0-E7oIvh\blib\lib/perl5i/2/HASH.pm line 15.
eech is deprecated, use hmap instead at C:\Opt\bin\perl\cpan\build\perl5i-v2.12.0-E7oIvh\blib\lib/perl5i/2/HASH.pm line 15.
eech is deprecated, use hmap instead at C:\Opt\bin\perl\cpan\build\perl5i-v2.12.0-E7oIvh\blib\lib/perl5i/2/HASH.pm line 15.
eech is deprecated, use hmap instead at C:\Opt\bin\perl\cpan\build\perl5i-v2.12.0-E7oIvh\blib\lib/perl5i/2/HASH.pm line 15.
eech is deprecated, use hmap instead at C:\Opt\bin\perl\cpan\build\perl5i-v2.12.0-E7oIvh\blib\lib/perl5i/2/HASH.pm line 15.
eech is deprecated, use hmap instead at C:\Opt\bin\perl\cpan\build\perl5i-v2.12.0-E7oIvh\blib\lib/perl5i/2/HASH.pm line 15.
eech is deprecated, use hmap instead at C:\Opt\bin\perl\cpan\build\perl5i-v2.12.0-E7oIvh\blib\lib/perl5i/2/HASH.pm line 15.
t/each.t ..................... ok
t/equal.t .................... ok
t/everything_is_an_object.t .. ok
t/flip.t ..................... ok
t/foreach.t .................. ok
t/github164.t ................ ok
t/grep.t ..................... ok
t/hash-diff.t ................ ok
t/hash-intersect.t ........... ok
t/hash-merge.t ............... ok
t/intersect.t ................ ok
t/io-handle.t ................ ok
t/is_module_name.t ........... ok
t/lexical.t .................. ok
t/list-trim.t ................ ok
t/list.t ..................... ok
t/load_together.t ............ ok
t/map.t ...................... ok
t/method_leaking.t ........... ok
t/modern_perl.t .............. ok
t/module2path.t .............. ok
t/no_indirect.t .............. ok
t/number.t ................... ok
t/perl5i.t ................... 1/? "C:\Opt\bin\perl\bin\perl.exe" unexpectedly returned exit value 255 at (eval 95) line 13.
at t/perl5i.t line 14
Tests were run but no plan was declared and done_testing() was not seen.
t/perl5i.t ................... Dubious, test returned 255 (wstat 65280, 0xff00)
All 3 subtests passed
t/pick.t ..................... ok
t/popn.t ..................... ok
t/require.t .................. ok
t/require_message.t .......... ok
t/say.t ...................... ok
t/scalar.t ................... ok
t/shiftn.t ................... ok
t/signature.t ................ ok
t/signatures.t ............... ok
t/skip.t ..................... ok
t/taint.t .................... ok
t/time_compat.t .............. ok
t/true.t ..................... ok
t/try-tiny.t ................. ok
t/uniq.t ..................... ok
t/utf8.t ..................... ok
t/version_0/00_compile.t ..... skipped: Needs Time::y2038
t/version_1/00_compile.t ..... skipped: Needs Time::y2038
t/vs_listmoreutils.t ......... ok
t/wrap.t ..................... ok
t/y2038.t .................... ok
Test Summary Report
t/Child.t (Wstat: 1280 Tests: 1 Failed: 0)
Non-zero exit status: 5
Parse errors: No plan found in TAP output
t/command_line_wrapper.t (Wstat: 65280 Tests: 2 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
t/perl5i.t (Wstat: 65280 Tests: 3 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
Files=100, Tests=1177, 59 wallclock secs ( 0.50 usr + 0.31 sys = 0.81 CPU)
Result: FAIL
Failed 3/100 test programs. 0/1177 subtests failed.
MSCHWERN/perl5i-v2.12.0.tar.gz
C:\Opt\bin\perl\bin\perl.exe ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MSCHWERN/perl5i-v2.12.0.tar.gz
Failed during this command:
MSCHWERN/perl5i-v2.12.0.tar.gz : make_test NO
Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
Platform:
osname=MSWin32, osvers=6.0, archname=MSWin32-x64-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_RELOCATABLE_INCPUSH -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -mms-bitfields',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='4.6.3', gccosandvers=''
intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
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:\Opt\bin\perl\lib\CORE" -L"C:\Opt\bin\perl\mingw64\x86_64-w64-mingw32\lib"'
libpth=C:\Opt\bin\perl\mingw64\x86_64-w64-mingw32\lib
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=libperl516.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -s -L"C:\Opt\bin\perl\lib\CORE" -L"C:\Opt\bin\perl\mingw64\x86_64-w64-mingw32\lib"'
Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_PRESERVE_IVUV
PERL_RELOCATABLE_INCPUSH PL_OP_SLAB_ALLOC
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
USE_SITECUSTOMIZE
Built under MSWin32
Compiled at Apr 3 2013 00:54:02
@inc:
C:/Opt/bin/perl/site/lib
C:/Opt/bin/perl/vendor/lib
C:/Opt/bin/perl/lib
.
The text was updated successfully, but these errors were encountered: