in reply to Prevent Perl Command Line Interpreter Popup From Appearing On Perl Crash

First of all, what you are asking is not something I condone nor encourage. It is on a par with removing the battery from the smoke-alarm because it 'false positives' to much when you are cooking bacon. Don't disable the alarm, fix the ventilation on the kitchen!

There is the concept of "Defensive Programming" that you really need to think about here. Why are your scripts cratering? What can you do to code around those conditions? Why aren't you?! Shooting the Messenger is very short sighted....

That said, If it were I in this pickle, I'd start by analyzing the kinds of 'Perl crashes' that cause the flower-box to appear and see if there is a common thread that I can check for. Ideally, you will discover something that you can set a %SIG trap for, and bail out gracefully once you receive the signal. This will require changes in the scripts you are running under the service.

A more heavy weight solution is to install a Monitor Program (I am very fond of Nagios) and have it check your problem-children's metrics (say CPU time consumed, memory foot-print, and log-file size). If the appropriate metric stabilizes for too long (and that's a judgment decision you have to make), have the Monitor kill() the process.

I really can't over-emphasize how dumb/dangerous the idea of disabling the pop-up on crash is.

Consider the following scenario (names changed for obvious reasons):

----
I Go Back to Sleep, Now.

OGB

  • Comment on Re: Prevent Perl Command Line Interpreter Popup From Appearing On Perl Crash

Replies are listed 'Best First'.
Re^2: Prevent Perl Command Line Interpreter Popup From Appearing On Perl Crash
by BrowserUk (Patriarch) on Dec 06, 2006 at 18:17 UTC
    I really can't over-emphasize how dumb/dangerous the idea of disabling the pop-up on crash is.

    Actually, not. It is a common and normal thing to do for applications that are intended for unattended operations.

    Disabling the popup simply removes the requirement for operator intervention when such errors occur. It does not however, stop the error being logged to the Application event log.

    Which, for the deliberately induced error perl -e"'x' x 1e10", records the following event log message:

    Event Type: Error Event Source: Application Error Event Category: None Event ID: 1000 Date: 2006-12-06 Time: 17:58:57 User: N/A Computer: XXXXXXXXX Description: Faulting application perl.exe, version 5.8.6.811, faulting module perl +58.dll, version 5.8.6.811, fault address 0x0008775c. For more information, see Help and Support Center at http://go.microso +ft.com/fwlink/events.asp. Data: 0000: 41 70 70 6c 69 63 61 74 Applicat 0008: 69 6f 6e 20 46 61 69 6c ion Fail 0010: 75 72 65 20 20 70 65 72 ure per 0018: 6c 2e 65 78 65 20 35 2e l.exe 5. 0020: 38 2e 36 2e 38 31 31 20 8.6.811 0028: 69 6e 20 70 65 72 6c 35 in perl5 0030: 38 2e 64 6c 6c 20 35 2e 8.dll 5. 0038: 38 2e 36 2e 38 31 31 20 8.6.811 0040: 61 74 20 6f 66 66 73 65 at offse 0048: 74 20 30 30 30 38 37 37 t 000877 0050: 35 63 0d 0a 5c..

    Further, if you have core dumping enabled, disabling the popup doesn't stop the coredump being created.

    It's simply not necessary to use a third party monitoring tool for this.


    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.
      Thank you BrowserUK. In one of my posts I talked about this running as a service, but I guess I didn't provide enough detailed information as to what that really means so it was unclear to others. This is a very complex system that has been running successfully for over 4 years. It would have taken a couple of pages of details to understand how it works so I always find it difficult when I ask what I think is a simple question and get a lecture on how to write code (something I have been doing for over 25 years). I truly appreciate posts from individuals like you who answer the question that is ask.. I believe I know how to handle this situation Thanks Again