Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Segfault on second (identical) call to a sub

by BrowserUk (Patriarch)
on Feb 05, 2006 at 00:13 UTC ( [id://528025]=note: print w/replies, xml ) Need Help??


in reply to Re: Segfault on second (identical) call to a sub
in thread Segfault on second (identical) call to a sub

Many thanks for this information.

I've seen various manifestations of this bug ever since upgrading to 5.8.7, but I've been shy of reporting them as my first attempt at the upgrade using the AS 813 msi went belly up at the nth hour and insisted on rolling back, but left my 5.8.6 installed screwed.

I managed to 'recover' by using the quickly available AS815 build, but I was never really convinced that the screw up hadn't left something not quite right in my setup. This time, I completely blew away everything, including all the non-AS core packages which I've previously got away with leaving in place (5.8.0->5.8.1->5.8.2->...->5.8.6), and installed completely clean.

Unfortunately, I am still seeing the same problems which probably means that they are down to 5.8.7 core and all the time I spent rebuilding all my packages was wasted as I'll have to go through it all again for 5.8.8 :(

I think I may just revert to 5.8.6 which seems to have been a very good, stable build.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^3: Segfault on second (identical) call to a sub
by syphilis (Archbishop) on Feb 05, 2006 at 01:04 UTC
    Unfortunately, I am still seeing the same problems which probably means that they are down to 5.8.7 core and all the time I spent rebuilding all my packages was wasted as I'll have to go through it all again for 5.8.8

    Not sure that I understand you correctly ... I don't think you have to re-build any packages when you upgrade. The GD-2.30 that triggers the error on perl 5.8.7 is the very same GD-2.30 that produces no error on perl 5.8.8. It was built probably using perl 5.8.7, or perhaps perl 5.8.6, but I didn't re-build it when I installed perl 5.8.8.

    (I don't think ActiveState have yet released a 5.8.8 build, and I don't know how long it will be before they do.)

    Cheers,
    Rob

      I'll try to clarify :)

      I usually upgrade AS perl builds without rebuilding the packages that don't come with it. That's worked reliably since 5.8.0. However, when I first installed 5.8.7/AS813, the installed failed right towards the end. It didn't tell me what failed, but I am guessing that it was generating the HTMLised POD. It insisted on backing the install off, but left the previous 5.8.6 build broken to the point where perl simply wouldn't start. AS support suggested that I should always uninstall the previous build, (leaving the non-AS packages in place), before installng a new AS build. I attempted this with AS813 but it still failed at the end in the same way.

      I reinstalled 5.8.6 over the top of what was left and things seemed okay. A few days later AS815 became available so I got that, uninstalled 5.8.6, again leaving the non distribution packages in place and attempted the AS815 install. It went through cleanly.

      However, there were various instances of previously working code doing strange things--mostly resulting in a "free to wrong pool". I've seen this message a lot in the past with code that used threads badly, but these were simple non-threaded programs. The latest of which is the subject of the OP. This a highly cut-down version of a program that has worked fine since 5.8.3 and through several upgrades of GD, that suddenly started working one time but not the next. As you can see from the OP and zentara's post above, it is really very obscure when you can call a sub successfully once, or even twice to do exactly the same processing, from different places in the code--but not twice from the same place!

      So, given the immediate preceding history of failed installed and broken restorations, I was unable in good conscience to 'point the finger' at 5.8.7. Hence my need to re-build everything clean to be sure.

      My fear is, that as I have now built all those packages in conjunction with 5.8.7, whatever malady is the root cause of the segfault may now be compiled into, (via errors in the Perl header files?), all the (XS components of) packages that I built in conjunction with it.

      It may be that the problem was unrelated to the header files in any way, but with perl 5.8.7 delta saying

      There has been a fair amount of refactoring of the C source code,

      can I be sure?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        My fear is, that as I have now built all those packages in conjunction with 5.8.7, whatever malady is the root cause of the segfault may now be compiled into, (via errors in the Perl header files?), all the (XS components of) packages that I built in conjunction with it.

        I think that fear is misplaced - I think it would be a rare case that a perl extension will need to be re-compiled (or benefit in any way from re-compiling) when you switch to perl 5.8.8.

        Anyway, time will tell .... :-)

        The error can still arise in perl 5.8.8. If you have a compiler, and Inline::C installed, and you run the Object Oriented Inline example from Inline's C-Cookbook.pod, you should get the "Free to wrong pool ..." error on Windows. That error still persists with perl 5.8.8 - but that's because it's the code in the Cookbook example that's in need of correction.

        Cheers,
        Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://528025]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-03-19 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found