Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Debugger problem in 5.10

by duoxi (Initiate)
on Jan 02, 2009 at 15:01 UTC ( [id://733772]=perlquestion: print w/replies, xml ) Need Help??

duoxi has asked for the wisdom of the Perl Monks concerning the following question:

Hope you had a great New Year!

I have been working on a perl application for a number of years, most recently under perl 5.8 Yesterday I installed a new Ubuntu system on my laptop which came with perl 5.10.

Now I experience that the debugger core dumps when it invokes Storable. When the application is run without the debugger (this is a CGI script) everything works fine, but in effect, working under the debugger is now impossible.

The debugger also core dumps in other situations, such as when it is trying to write a file that is write protected (which did not cause this error before).

I wonder if anybody could point me to how to solve or work around this problem. Do you experience the same problem with debugging under perl 5.10? Or could the problem be with the ubuntu installation?

Any guidance is greatly appreciated.

Cheers, D.

Replies are listed 'Best First'.
Re: Debugger problem in 5.10
by borisz (Canon) on Jan 02, 2009 at 15:14 UTC
    I guess you thaw/retrieve data that was freezed/storedwith another perl or another architecture. Just remove all old data that was serialized with the other computer and use the portable nfreeze/nstore instead of freeze/store next time.
    Boris
      Boris,

      thanks. I did think of this and deleted all previously created archives. Also, I am not using freeze/thaw. I am using the following calls:
      Storable::lock_store Storable::lock_retrieve
      Again, the code works fine when run in normal mode. But when I get to lock_store in the debugger, it core dumps (actually, somewhere inside the Storable routine)...
        Then use lock_nstore and do not rely on any data stored another way, ported to your new computer. Not in a config file not via a database ,... and so on.
        Boris
Re: Debugger problem in 5.10 (replace)
by tye (Sage) on Jan 03, 2009 at 05:55 UTC

    It is possible that Storable was installed such that the 5.8 version of the compiled part of the code was attempted to be used by the 5.10 version of Perl? Nah, that seems unlikely to happen and unlikely to be the cause of your complaint.

    In trying to reproduce your problem, I did notice a bug in the 5.10 debugger. The handling of "constant" subroutines appears to have changed in 5.10 and they now cause the code that looks for subroutine names to die:

    > perl5.10 -del Loading DB routines from perl5db.pl version 1.3 DB<1> o die=0 DB<2> use Storable DB<3> m Storable Not a subroutine reference at /usr/lib/perl5/5.10/perl5db.pl line 7934 +. Debugged program terminated. ...

    But I was unable to reproduce any of the problems you complained of (but this was on cygwin -- not having a 5.10+Ubuntu combination handy).

    The standard route when you run into core dumps is to upgrade or downgrade the item that is core dumping. In this case, I would probably build and install my own copy of Perl from source (since it is standard wisdom to let Linux have whatever version of Perl it wants and to give yourself a separate version of Perl that you can mess with without surprising the parts of Linux that expected the shipped-with Perl to be there).

    - tye        

      I believe I traced the problem down to line 380 in my version of Storable.pm (2.18):
      eval { $self = pretrieve(*FILE) };
      which based on the comments in the file is a call to a C routine.

      I found other issues, such as that the taint checking does not always seem to work correctly, and variables are considered tainted under the debugger even when they are properly untainted (and they are not considered tainted when the code is run without the debugger).

        That would make me more interested in installing my own copy of Perl (from source) and using that.

        I would probably also try a bit to see if I could resolve the problem with the system's Perl (since these seem serious enough that the system might run into problems when it goes to use this flakey install of Perl). Perhaps forcing a re-install as a first step.

        - tye        

Re: Debugger problem in 5.10
by andreas1234567 (Vicar) on Jan 02, 2009 at 17:18 UTC
    It would probably be helpful if you posted some relevant code.
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]
Re: Debugger problem in 5.10
by trwww (Priest) on Jan 03, 2009 at 04:20 UTC

    Hello,

    Obviously perl 5.10 is a version of perl 5, but from my research, personally I wouldn't expect a 5.8 application of any substance to work unmodified on perl 5.10.

    What I do in your situation is install perl 5.8 in an isolated location (perhaps /home/me/myapp/extern) and then set up an environment with that perl (/home/me/myapp/extern/bin) in the $PATH just for that app.

    Regards,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-26 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found