Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Interpreter eval counter out of bounds

by dave_the_m (Monsignor)
on Jan 28, 2011 at 13:39 UTC ( [id://884802]=note: print w/replies, xml ) Need Help??


in reply to Interpreter eval counter out of bounds

Well, the "eval counter" (PL_evalseq) is a 32-bit unsigned integer, so I'd expect crashing and burning, if any, to happen after 4.29E9 evals.

Do you have the ability to log the evals it's executing, in order to see whether the eval compile warnings/errors make any sense?

Dave.

Replies are listed 'Best First'.
Re^2: Interpreter eval counter out of bounds
by moritz (Cardinal) on Jan 28, 2011 at 13:50 UTC
    Do you have the ability to log the evals it's executing

    I think Devel::NYTProf provides that ability. At least it has to capture the eval'ed text internally to profile it; maybe it provides an API, or you can grep for the eval'ed text in the report.

Re^2: Interpreter eval counter out of bounds
by Jeppe (Monk) on Jan 28, 2011 at 14:18 UTC
    Andreas' coworker here!

    The strange thing is that once this error occurs, evals that previously worked all of a sudden fail. Some of the code that is evaled is in fact logged to file (under /tmp), and they are valid:

    username@server tmp$ /opt/perl/bin/perl -c /tmp/agent_code.4561.pl 
    /tmp/agent_code.4561.pl syntax OK
    
    This is code that works for days, and works again after a restart of the application (which of course means we get a fresh interpreter to mess up)
Re^2: Interpreter eval counter out of bounds
by andreas1234567 (Vicar) on Jan 28, 2011 at 13:52 UTC
    Do you have the ability to log the evals it's executing, in order to see whether the eval compile warnings/errors make any sense?
    In theory yes, but I assume impact on performance would be unacceptable as well as the log files themselves would be difficult to manage (log rotation would happen too quickly). I have not been able to reproduce the problem outside of a specific production environment with certain difficult-to-change log requirements.
    --
    No matter how great and destructive your problems may seem now, remember, you've probably only seen the tip of them. [1]

      I have a perl daemon that in principle (unless stopped or restarted) will run forever. . .

      All of our production scripts restart themselves after some time is passed, ( i.e. 4-hours, 24-hours, etc. ).

      If you have 'cron' you might want to restart the process periodically. If you can't use 'cron' then the script can test on how much time has passed and use 'system' to restart itself and then exit.

      Your script will be happy with a fresh start.

      "Well done is better than well said." - Benjamin Franklin

        use 'system' to restart itself and then exit.

        Your script will be happy with a fresh start.

        Except that when using system, the old process doesn't go away; it'll wait for the new one to finish.

        Daemons restarting itself is a classical trick. But you got to use exec, not system. You want to replace yourself with the new instance, not create an additional one.

Re^2: Interpreter eval counter out of bounds
by vkon (Curate) on Feb 05, 2011 at 16:46 UTC
    if this is actually the case - then - fortunately a bug could be fixed, and even a small XS "fix" module could be created to "reset" said variable PL_evalseq (I hope it is exported?)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found