FAQ

Re: FAIL Env-C-0.07 x86_64-linux-thread-multi-ld 2.6.22.10

Imacat
Sep 2, 2008 at 12:09 am
Dear Stas Bekman,

Hi. This is imacat from Taiwan. Regarding to your question,

On Mon, 01 Sep 2008 11:11:06 -0700
Stas Bekman wrote:
Would you be so kind to run the older version (attached) and see if you
have the same issue? Thanks!
You may refer to this:

http://www.cpantesters.org/show/Env-C.html

The test report for version 0.06 is here:

http://www.nntp.perl.org/group/perl.cpan.testers/2008/03/msg1216913.html

If you need information on a specific version that's not listed
above, please let me know.

--
Best regards,
imacat ^_*' <imacat@mail.imacat.idv.tw>
PGP Key: http://www.imacat.idv.tw/me/pgpkey.asc

<<Woman's Voice>> News: http://www.wov.idv.tw/
Tavern IMACAT's: http://www.imacat.idv.tw/
TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug
reply

Search Discussions

5 responses

  • Stas Bekman at Sep 2, 2008 at 12:24 am

    imacat wrote:
    Dear Stas Bekman,

    Hi. This is imacat from Taiwan. Regarding to your question,
    Ok, so 0.06 had the same problem. That's what I needed to check.

    Now, I can't reproduce the problem. So if someone else who can reproduce
    it could look at the issue, that would be great. I think the difference
    is x64, but it could be something else.
    On Mon, 01 Sep 2008 11:11:06 -0700
    Stas Bekman wrote:
    Would you be so kind to run the older version (attached) and see if you
    have the same issue? Thanks!
    You may refer to this:

    http://www.cpantesters.org/show/Env-C.html

    The test report for version 0.06 is here:

    http://www.nntp.perl.org/group/perl.cpan.testers/2008/03/msg1216913.html

    If you need information on a specific version that's not listed
    above, please let me know.
    --
    ___________________________________________________________
    Stas Bekman http://stason.org http://stasosphere.com
    http://www.linkedin.com/in/stasbekman http://chestofbooks.com
    http://i-want-a-better.com http://healingcloud.com
    http://meta-religion.com http://modperl2book.org
    http://mytripjournal.com http://modperlbook.org
  • Imacat at Sep 2, 2008 at 4:56 pm
    Dear Stas Bekman,

    Hi. This is imacat from Taiwan.

    On Mon, 01 Sep 2008 17:24:00 -0700
    Stas Bekman wrote:
    imacat wrote:
    Ok, so 0.06 had the same problem. That's what I needed to check.
    Now, I can't reproduce the problem. So if someone else who can reproduce
    it could look at the issue, that would be great. I think the difference
    is x64, but it could be something else.
    I have digged into your code for that "panic: free from wrong pool
    during global destruction". It seems to be caused by calling setenv()
    at line 75 in your C.xs, which threw out an error in libperl.so in Perl
    5.10. Further investigation turns out that, according to:

    http://search.cpan.org/dist/perl/INSTALL#Environment_access

    Perl write to the memory directly when implementing putenv(), which
    might cause problem. To avoid that and use the safe (but potentially
    leaky) system putenv() you may set PL_use_safe_putenv = 1.

    The above does work for my Perl 5.8.8 and 5.10.0 on x86_64. I do
    not know if there will be any side effect on other platforms. I made a
    simple patch below, in the hope that it helps. Please tell me if you
    need any more information, or if I could be of any help. Thank you.

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    diff -u -r Env-C-0.07.orig/C.xs Env-C-0.07/C.xs
    - --- Env-C-0.07.orig/C.xs 2008-09-01 06:26:13.000000000 +0800
    +++ Env-C-0.07/C.xs 2008-09-03 00:40:50.000000000 +0800
    @@ -72,6 +72,7 @@
    RETVAL = -1;
    }
    #else
    + PL_use_safe_putenv = 1;
    RETVAL = setenv(key, val, override);
    #endif

    --
    Best regards,
    imacat ^_*' <imacat@mail.imacat.idv.tw>
    PGP Key: http://www.imacat.idv.tw/me/pgpkey.asc

    <<Woman's Voice>> News: http://www.wov.idv.tw/
    Tavern IMACAT's: http://www.imacat.idv.tw/
    TLUG List Manager: http://lists.linux.org.tw/cgi-bin/mailman/listinfo/tlug
  • Stas Bekman at Sep 4, 2008 at 5:25 am

    imacat wrote:
    Dear Stas Bekman,

    Hi. This is imacat from Taiwan.
    Thank you for the patch imacat from Taiwan - would please be so kind to
    try the attached version?
    On Mon, 01 Sep 2008 17:24:00 -0700
    Stas Bekman wrote:
    imacat wrote:
    Ok, so 0.06 had the same problem. That's what I needed to check.
    Now, I can't reproduce the problem. So if someone else who can reproduce
    it could look at the issue, that would be great. I think the difference
    is x64, but it could be something else.
    I have digged into your code for that "panic: free from wrong pool
    during global destruction". It seems to be caused by calling setenv()
    at line 75 in your C.xs, which threw out an error in libperl.so in Perl
    5.10. Further investigation turns out that, according to:

    http://search.cpan.org/dist/perl/INSTALL#Environment_access

    Perl write to the memory directly when implementing putenv(), which
    might cause problem. To avoid that and use the safe (but potentially
    leaky) system putenv() you may set PL_use_safe_putenv = 1.

    The above does work for my Perl 5.8.8 and 5.10.0 on x86_64. I do
    not know if there will be any side effect on other platforms. I made a
    simple patch below, in the hope that it helps. Please tell me if you
    need any more information, or if I could be of any help. Thank you.

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    diff -u -r Env-C-0.07.orig/C.xs Env-C-0.07/C.xs
    - --- Env-C-0.07.orig/C.xs 2008-09-01 06:26:13.000000000 +0800
    +++ Env-C-0.07/C.xs 2008-09-03 00:40:50.000000000 +0800
    @@ -72,6 +72,7 @@
    RETVAL = -1;
    }
    #else
    + PL_use_safe_putenv = 1;
    RETVAL = setenv(key, val, override);
    #endif

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)
    --
    ___________________________________________________________
    Stas Bekman http://stason.org http://stasosphere.com
    http://www.linkedin.com/in/stasbekman http://chestofbooks.com
    http://i-want-a-better.com http://healingcloud.com
    http://meta-religion.com http://modperl2book.org
    http://mytripjournal.com http://modperlbook.org
  • Imacat at Sep 4, 2008 at 9:46 am

    On Wed, 03 Sep 2008 22:25:10 -0700 Stas Bekman wrote:
    imacat wrote:
    Dear Stas Bekman,
    Thank you for the patch imacat from Taiwan - would please be so kind to
    try the attached version?
    It works. The terminal log is attached below. Please tell me if
    you need any more information, or if I could be of any help.

    imacat@rinse /tmp % tar xzf /tmp/Env-C-0.08.tar.gz
    imacat@rinse /tmp % cd Env-C-0.08
    imacat@rinse /tmp/Env-C-0.08 % /opt/perl/5.10.0/bin/perl Makefile.PL
    Checking if your kit is complete...
    Looks good
    Writing Makefile for Env::C
    imacat@rinse /tmp/Env-C-0.08 % make
    cp C.pm blib/lib/Env/C.pm
    Please specify prototyping behavior for C.xs (see perlxs manual)
    In file included from C.xs:4:
    /opt/perl/5.10.0/lib/5.10.0/x86_64-linux-thread-multi-ld/CORE/XSUB.h:130:1: warning: "dAX" redefined
    In file included from C.xs:3:
    ppport.h:3771:1: warning: this is the location of the previous definition
    In file included from C.xs:4:
    /opt/perl/5.10.0/lib/5.10.0/x86_64-linux-thread-multi-ld/CORE/XSUB.h:132:1: warning: "dAXMARK" redefined
    In file included from C.xs:3:
    ppport.h:3781:1: warning: this is the location of the previous definition
    In file included from C.xs:4:
    /opt/perl/5.10.0/lib/5.10.0/x86_64-linux-thread-multi-ld/CORE/XSUB.h:136:1: warning: "dITEMS" redefined
    In file included from C.xs:3:
    ppport.h:3775:1: warning: this is the location of the previous definition
    In file included from C.xs:4:
    /opt/perl/5.10.0/lib/5.10.0/x86_64-linux-thread-multi-ld/CORE/XSUB.h:147:1: warning: "dXSTARG" redefined
    In file included from C.xs:3:
    ppport.h:3778:1: warning: this is the location of the previous definition
    In file included from C.xs:4:
    /opt/perl/5.10.0/lib/5.10.0/x86_64-linux-thread-multi-ld/CORE/XSUB.h:169:1: warning: "dUNDERBAR" redefined
    In file included from C.xs:3:
    ppport.h:3764:1: warning: this is the location of the previous definition
    In file included from C.xs:4:
    /opt/perl/5.10.0/lib/5.10.0/x86_64-linux-thread-multi-ld/CORE/XSUB.h:170:1: warning: "UNDERBAR" redefined
    In file included from C.xs:3:
    ppport.h:3768:1: warning: this is the location of the previous definition
    Running Mkbootstrap for Env::C ()
    Manifying blib/man3/Env::C.3
    imacat@rinse /tmp/Env-C-0.08 % make test
    1..5
    ok 1 - getenv matches perl ENV for USER
    # unsetting an env
    # getting it
    ok 2 - USER is no longer set in C env
    # called setenv
    # [USER] expecting 'foobar', got 'foobar'
    ok 3
    # [USER] expecting 'imacat', got 'imacat'
    ok 4
    # 39 env entries
    ok 5
    imacat@rinse /tmp/Env-C-0.08 % echo $?

    imacat@rinse /tmp/Env-C-0.08 %

    --
    imacat ^_*'
    imacat@mail.imacat.idv.tw
    PGP Key: http://www.imacat.idv.tw/me/pgpkey.asc

    Tavern IMACAT's http://www.imacat.idv.tw/
    Woman's Voice http://www.wov.idv.tw/
    TLUG List Manager http://www.linux.org.tw/mailman/listinfo/tlug
  • Stas Bekman at Sep 4, 2008 at 3:44 pm

    imacat wrote:
    On Wed, 03 Sep 2008 22:25:10 -0700
    Stas Bekman wrote:
    imacat wrote:
    Dear Stas Bekman,
    Thank you for the patch imacat from Taiwan - would please be so kind to
    try the attached version?
    It works. The terminal log is attached below. Please tell me if
    you need any more information, or if I could be of any help.
    Thank you for your help, imacat - I'll release the updated version shortly.

Related Discussions

Discussion Navigation
viewthread | post

2 users in discussion

Stas Bekman: 3 posts Imacat: 3 posts