Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Complex and reliable signal handling.

by shmem (Chancellor)
on May 31, 2013 at 18:40 UTC ( #1036291=note: print w/replies, xml ) Need Help??


in reply to Complex and reliable signal handling.

perldiag gives a hint:
panic: fold_constants JMPENV_PUSH returned %d
(P) While attempting folding constants an exception other than an "eval" failure was caught.

I guess that your entire program is a bit more complex than the bits you posted.
Perhaps a $SIG{__DIE__} handler would reveal more:

use Carp(); $SIG{__DIE__} = \&Carp::confess;

Replies are listed 'Best First'.
Re^2: Complex and reliable signal handling.
by vsespb (Chaplain) on May 31, 2013 at 19:30 UTC
    I guess that your entire program is a bit more complex than the bits you posted.
    yes, treat it as pseudocode. I can't create proof-of-concept code.
    Perhaps a $SIG{__DIE__} handler would reveal more:
    Yes, yo're right. fold_constants mostly happens, when child terminated with exception. However. All 'die's are inside eval (you can see eval in pseudocode). After eval caught, program executes dump_error() and exits (this way I see all errors) Also I did not see the panic, until I installed signal handlers into "children" code above.
Re^2: Complex and reliable signal handling.
by vsespb (Chaplain) on May 31, 2013 at 19:39 UTC
    I tried $SIG{__DIE__} = \&Carp::confess; It prints nothing. Perhaps because it prints errors only outside eval?

    I don't have own DIE handlers (but LWP, which I use, do, however it should localize it).

    Also, I remember now, most (but not all) lines code lines mentioned in panic message contained eval (or 'require' which calls eval, or even eval{require}).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1036291]
help
Chatterbox?
[Discipulus]: oh and dont miss my last poetry!
[marioroy]: Hello all. After several attempts, am able to move forward and will soon release a Parallel:: ForkManager compatible MCE::Hobo:: Manager, also MCE::Hobo::Simple, and refactored MCE::Hobo engine supporting multiple instances. Wait works beautifully.
[marioroy]: MCE::Shared has been refined that it allows sharing Tie::File and hash objects containing {fh} key.
[marioroy]: It's taken so long to take Hobo to a new level. Threads-like and Parallel:: ForkManager management capaiblities.
[marioroy]: This will complete the 4 years in the making and likely time to move on to something els.
[marioroy]: s/els/else.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2017-05-26 08:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?