Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

panic: leave_scope inconsistency

by davidfilmer (Novice)
on Mar 08, 2014 at 00:21 UTC ( #1077472=perlquestion: print w/ replies, xml ) Need Help??
davidfilmer has asked for the wisdom of the Perl Monks concerning the following question:

Masters -

I have a program which is bombing with the message:

panic: leave_scope inconsistency

It indicates a line number, which is inside a recursive subroutine fetching database info (it is the line that recursively calls the sub).

It works fine when the amount of recursion is low, but when many recursive queries must be made, I get this error.

I'm not asking for help with my code - I just want to understand what this error means. It does not appear to be a resource constraint message (as might be expected in recursion - out of memory, etc). Information about this message seems scarce (and old).

I suspect the answer lies in the reference to "leave_scope" - the underline makes me think this might be some internal subroutine in perl. But I wouldn't know where to begin to investigate.

I seek enlightenment.

System: perl 5.12.1 on server-class AIX hardware

Comment on panic: leave_scope inconsistency
Download Code
Re: panic: leave_scope inconsistency
by kcott (Abbot) on Mar 08, 2014 at 01:34 UTC

    G'day davidfilmer,

    If you search for 'panic: leave_scope inconsistency' in perldiag (which lists Perl's diagnostic messages), you'll find one match with a short description.

    If that's not helpful, you'll probably need to provide more information: the guidelines in "How do I post a question effectively?" should give you an idea of what would be useful to post.

    -- Ken

Re: panic: leave_scope inconsistency
by davido (Archbishop) on Mar 08, 2014 at 02:54 UTC

    You should never be able to get Perl to issue a Panic message using pure-Perl. What XS code is involved?

    (That's not to say it is impossible, but it would indicate a Perl bug. My bet is XS modules.)


    Dave

Re: panic: leave_scope inconsistency
by BrowserUk (Pope) on Mar 08, 2014 at 08:31 UTC
    I suspect the answer lies in the reference to "leave_scope" - the underline makes me think this might be some internal subroutine in perl. But I wouldn't know where to begin to investigate.

    See Scope.c:Perl_leave_scope(), the default case.

    In a nutshell, something has been found on the (Perl) stack that has a type value that is not a real type value. That suggests stack corruption, which could come about in many ways.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-12-20 00:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (94 votes), past polls