skip to main | skip to sidebar
Showing posts with label errors. Show all posts
Showing posts with label errors. Show all posts

Saturday, April 25, 2009

More Funny Applications Errors From Linux, Unix And Elsewhere

Hey There,

Well, the sunny breezy weather forecast out here in Chicago has turned out to be nothing but oppressive humidity (which almost never happens ;) so I've spent most of my day seeing spots. Thankfully, around these parts, the fall, winter and spring take up a lot more of the year than the summer (or maybe it's just that the winter gets so freezing cold that it seems longer. Whatever it is; I love it and it makes this misery bearable ;)

I ran into another "bad slab magic error" today, installing an older version of RedHat Linux on a freebie junk-pc that a neighbor decided to punt to the curb and it was hard not to crack a smile (I don't know why that error always makes me laugh. It just sounds really really goofy to me, and I love goofy humor :)

Anyway, that error message got me thinking that I haven't scoured the net for funny error messages in a while, but, thankfully, folks are still posting them like they're going out of style (I think, in fact, that the opposite is true and they have yet to come into their own ;)

This batch of funny application error messages below was found on the Waikato Linux Users Group Site, and they deserve all the credit for either collecting these gems or (I'm not here to judge) making them up. If it sounds reasonably credible (which most incomprehensible error messages do, nowadays), I'll put aside whatever I'm doing to chuckle for a moment or to. Even if I'm only chuckling on the inside ;)

They (Reader's Digest ;) say that laughter is the best medicine. If that's true, this page will do you some good. If you've gone and severed a limb, you may need to go see a doctor. That's one of the ailments they almost never misdiagnose and, although they can cure it, there's rarely any laughter involved.

It's a backward, upside-down, topsy-turvy world ;)

Cheers,



Messages reported by applications and OperatingSystems


These are some of the funny, sarcastic, or just plain stupid error messages that you might see. If you are looking for "proper" error messages from applications, and how to resolve them, look at ApplicationErrorMessages.


Keyboard not found. Hit F1 to continue


Many BIOSes will report this error if a keyboard is not found at boot time.


lp on fire


The Linux lp# driver says this when your printer signals an error, but doesn't signal which error. Usually this means the printer is offline. (This message was copied from much earlier line printer daemons from Unixes of old.)


Update: Kernel 2.4.20 contains the following change from 2.4.19:



diff -urN linux-2.4.19/drivers/usb/printer.c
linux-2.4.20/drivers/usb/printer.c
--- linux-2.4.19/drivers/usb/printer.c Fri Aug 2 17:39:45 2002
+++ linux-2.4.20/drivers/usb/printer.c Thu Nov 28 15:53:14 2002
@@ -257,7 +257,7 @@
* Get and print printer errors.
*/

-static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };
+static char *usblp_messages[] = { "ok", "out of paper", "off-line", "unknown error" };

Q276304 - Error Message: Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords


A Microsoft Windows error message as reported by comp.risks 21.37


You don't exist. Go away.


This message appears for certain unix programs when an entry can't be found for you in /etc/passwd (or these days, via PAM). This might be because you've not logged in via login(1) (this can happen if /etc/inittab specifies a program that doesn't log you in, instead of getty(8)), if your machine can't retrieve the data from the network (if you are using NIS or LDAP or some other network user administration system) or if you've made a mistake editing /etc/passwd (or friends).


Curse on you, wizard, before you recurse on me.


bibtex(1) style files use an undocumented language called BST (or that's the file extenstion, which is the closest it has to a name). In this language recursion is prohibited, and this is the message you get if you try it.


I refuse to debug myself!


If you tell GDB to try to attach to its own process. (It can't run it and breakpoint it and the same time.)


The devil is in the details: zero number of heads or sectors


Seen from the mdir(1) command.


MicrosoftWindows MSI Installer


Software Installation encountered an unexpected error while reading from the MSI file \\mlc1\deploy\FireFox-1.0.1-enUS.msi.


The error was not serious enough to justify halting the operation.


The following error was encountered: The operation completed successfully.



sudo(1)


If the insults flag is set in /etc/sudoers, sudo(1) will return one of the following errors when an invalid password is entered:


  • Just what do you think you're doing Dave?

  • It can only be attributed to human error.

  • That's something I cannot allow to happen.

  • My mind is going. I can feel it.

  • Sorry about this, I know it's a bit silly.

  • Take a stress pill and think things over.

  • This mission is too important for me to allow you to jeopardize it.

  • I feel much better now.

  • Wrong! You cheating scum!

  • No soap, honkie-lips.

  • Where did you learn to type?

  • Are you on drugs?

  • My pet ferret can type better than you!

  • You type like i drive.

  • Do you think like you type?

  • Your mind just hasn't been the same since the electro-shock, has it?

  • Maybe if you used more than just two fingers...

  • BOB says: You seem to have forgotten your passwd, enter another!

  • stty: unknown mode: doofus

  • I can't hear you -- I'm using the scrambler.

  • The more you drive -- the dumber you get.

  • Listen, burrito brains, I don't have time to listen to this trash.

  • I've seen penguins that can type better than that.

  • Have you considered trying to match wits with a rutabaga?

  • You speak an infinite deal of nothing

  • You silly, twisted boy you.

  • He has fallen in the water!

  • We'll all be murdered in our beds!

  • You can't come in. Our tiger has got flu

  • I don't wish to know that.

  • What, what, what, what, what, what, what, what, what, what?

  • You can't get the wood, you know.

  • You'll starve!

  • ... and it used to be so popular...

  • Pauses for audience applause, not a sausage

  • Hold it up to the light --- not a brain in sight!

  • Have a gorilla...

  • There must be cure for it!

  • There's a lot of it about, you know.

  • You do that again and see what happens...

  • Ying Tong Iddle I Po

  • Harm can come to a young lad like that!

  • And with that remarks folks, the case of the Crown vs yourself was proven.

  • Speak English you fool --- there are no subtitles in this scene.

  • You gotta go owwwww!

  • I have been called worse.

  • It's only your word against mine.

  • I think ... err ... I think ... I think I'll go home


(Taken from ins_*.h in the source for sudo 1.6.6)





, Mike




Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only . See our Mission And Policy Statement for further details.

Wednesday, April 15, 2009

Having Fun With Other Solaris Sys Admins

Hey There,

Today I'm speeding around, working my arse off so that I can work all weekend (When does it end? ...oh yeah; with the worms ;) and I wrote this little shell script (in Solaris' /bin/sh) to lighten the mood a little.

It's another in a string of a thousand fake error messages, but it worked pretty well for my purposes. I made sure to install it up front in the /etc/rc2.d directory (from JumpStart) so that any admin watching a new installation come up for the first time (to verify its integrity) would be guaranteed to see it. Man, it was fun until I had to fix the problem and pretend I had no idea what happened ;)

Enjoy the video of the script output and, hopefully, you can have some fun with this shell script (or a variation of it) on your own!

Please note that the only fun thing other than the error message are the traps set on the interrupts. It's a reboot-a-thon in the making ;)



[フレーム]




Creative Commons License


This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License

#!/bin/sh

#
# bad_news.sh - OMFG
#
# 2009 - Mike Golvach - eggi@comcast.net
#
# Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
#

trap 'tput rc' 0 1 2 3 15
echo
echo "EXCEPTION: kern.alert !!!"
echo "SYSTEM BOOT ERROR!"
sleep 1
echo "SYSTEM BOOT ERROR!"
echo "Resampling Solaris Boot Loader ..."
sleep 2
echo "Extracting libC boot loader kernel modules"
sleep 1
echo
echo "Fixing /usr/platform/"`uname -i`
echo "This should just take a moment before resuming..."
echo
echo "YOU WILL NEED TO REBOOT THE SYSTEM WHEN THIS PROCESS COMPLETES!"
sleep 1
echo
echo "RUN PHASE 1: Removing files from /usr/platform/"`uname -i`"/ ...\c"
tput sc
while :
do
echo "| \c"
tput rc
echo "/ \c"
tput rc
echo "- \c"
tput rc
echo "\\ \c"
tput rc
done


Cheers,



Discover the Free Ebook that shows you how to make 100% commissions on ClickBank!



Please note that this blog accepts comments via email only. See our Mission And Policy Statement for further details.

Thursday, August 7, 2008

Programming PHP - Implicit OO In Error Catching Structure

Hey There,

Today, I'm proud to be putting up my first "guest post" and would like to thank Herschel Cohen for his outstanding contribution!

BTW, this page looks a lot better when it's not trapped in a blog post ;)

Without further ado, but some padding to keep the title from wrapping around...

Here's to your enjoyment :)



Web Site
Developers





Programming PHP: Implicit OO Code in Error Catching Structure



Learning from Errors



I have written on other occasions, you can learn more seeing errors others commit, whatever their cause, which can be more instructive than simply spelling out how to do it correctly. It simply might be the relief of not finding oneself trapped in the same predicament that makes the lesson more likely to stick. This time it was the try / catch code syntax that trapped me. It seemed too transparent and too easily understood, which resulted in my missing a critical aspect. That is today's topic of discussion.



I will make no attempt to explain my reasoning, it's just too unique to my background and to my warped mind. Nonetheless, I am sure others could find themselves in the same predicament. So I will focus on how I was fooled and my circuitous route towards enlightenment. See this too as my filing in the holes I left in my last article on catching the missing file error where I used the afore mentioned syntax.



Impression of try {} catch {} Code Syntax



When I was on a programming contract [1.], I took part in Java code reviews. I had the impression I could read and understand [2.] Java code. I was attracted to the try / catch code syntax, which appeared quite straight forward. That is, place the code you wish to run within the try section and if it fails it is automatically shifted to the catch section. There given enough specified exceptions the possibility existed to save the program from an ignominious crash. Moreover, in Java [3.], I thought that the ending "finally" section could allow full recovery. Nonetheless, many of my perceptions were fallacious.



Mistaken Impressions - How it Started



My mistakes began early, with the popping up of fairly complete descriptions of encountered errors I saw when testing methods to display missing menu names. In the attempt to redirect the error to a separate page, I mentioned seeing a ephemeral error message that was fired well within the template at the readfile() line for the menu listing. Moreover, later when I was explicitly testing for the file missing error it was painted onto the page in the location the menu listing should have appeared:



 Automatic Error Message

Figure 1. Automated Error Message


If you look closely at the content of the message above, it appears nearly identical to Example #3 The Built in Exception class. So while I knew an instance of the class had to be present, the error messages seemed to confirm the exception object was both present and functioning. Nonetheless, my try / catch code was not working properly. Below, I am repeating the outline of the code I used in other articles. Here is the section where the menu listing is read into the template:



 <div id="central-col-bst">
<?php
if ($if_error==false) { // adding new error catching code 5/31/2008

try {
readfile($menus . "/menu-list-".$get_it.".txt");

} catch (move_onException $e) {

$if_error = true;

// only action flips the variable
}
} else {
$gohome = $_SERVER['DOCUMENT_ROOT']."/page-content/navigation";
readfile($menus."/messages/menu-not-known.txt");
readfile($gohome."/home-button.txt");

}

if ($if_error==true) {
// This is were the email is sent when the
// text file is missing, then the error
// message is painted where the menu
// listing would have fallen.
} else {
echo "\n\n Code has run by email";
}

?>

</div?> <!-- End of central Product News column --?>

Listing 1 Code Structure to Catch readfile() errors


So I inserted additional code within the try section to determine why my code was failing:



 <div id="central-col-bst">
<?php
if ($if_error==false) { // adding new error catching code 5/31/2008

try {
readfile($menus . "/menu-list-".$get_it.".txt");
$level = error_reporting();
$val = error_reporting(E_WARNING);
print "Error value $level <br />";
print "Warning error value is $val <br />";


} catch (move_onException $e) {

$if_error = true;

// only action flips the variable
}
...

Listing 2 Modified Code in try section


Now look at the output when this version was run:



 Exception Object Not Functioning

Figure 2. Exception Object Not Functioning


Note the last line, "Code has run by email" indicating the variable was not flipped to true. Thus, the catch part of the code was never entered. Something is badly amiss with the object that is firing.



Java Explanation



Once I began to read [4.] about the object model of Java it became clear the object that was live and printed the messages was an instance of the Error class not the Exception(s). Below I have a graphic that is a modified version of the one in the book (cited in footnote 4). The Error class object was the one posting the error messages. The code failed to fire on the catch section, because no instance of the Exception object was available for use:



 Exception Object Not Functioning

Figure 3. Java Object for Errors & Exceptions


Therefore, it is obvious that object orientated code is an implicit part of the try / catch syntax, which might not be immediately obvious if the documentation were not studied.



Revised Error Catching Code



I am going to do little other than exhibit a simpler version of the code I showed in the last article. This time I will not use a subclass of the Exception class, hence, there is no need to store the class definition on the page. Creating an instance of the Exception suffices, because I am not using for any reason than reaching the catch section of the code. Here is the skeleton of the code that enhances Listing 1 slightly:



 <div id="central-col-bst">
<?php
if ($if_error==false) { // adding new error catching code 5/31/2008

try {
$file_exists = file($menus . "/menu-list-".$get_it.".txt");
if ($file_exists === FALSE) {
throw new Exception($e);
} else {
readfile($menus . "/menu-list-".$get_it.".txt");
}
} catch (move_onException $e) {

$if_error = true;

// only action flips the variable
}
} else {
$gohome = $_SERVER['DOCUMENT_ROOT']."/page-content/navigation";
readfile($menus."/messages/menu-not-known.txt");
readfile($gohome."/home-button.txt");

}

if ($if_error==true) {
// This is were the email is sent when the
// text file is missing, then the error
// message is painted where the menu
// listing would have fallen.
} else {
echo "\n\n Code has run by email";
}

?>

</div?> <!-- End of central Product News column --?>

Listing 3 Working Code Structure to Catch Missing File Errors


Extending Exception Object Model



I mentioned my dissatisfaction with the increasing volume of code where similar processes that differ slightly are appearing in multiple location on the page template. I have not tested out these ideas, however, it is not a great stretch to use a subclass of the Exception class to contain new methods that email differing messages to the webmaster based upon a variable determined by the error type. The same might work for a customized error message that is painted on the page. For those that like to compress their code, the try / catch syntax and printing of either the menu listing or error messages could be buried within a method in a new subclass. However, if you go that route, be prepared to document your intentions so that anyone that follows can maintain your site in your absence.



Summary



Once the object model operating characteristic are understood as part of the try / catch exceptions, indeed the syntax is relatively straight forward. Moreover, there are multiple exceptions be tested with all residing in a common subclass that is used repeatedly throughout an application. Such use should deflate the overall size of the application's code and increase its reliability.



Corrections, suggested extension or comments write: H. Cohen. If the mailto does not work, use this: hcohen[-At-]bst-softwaredevs.com.



© Herschel Cohen, All Rights Reserved



Return B/ST Home or Dynamic Menu Page


____________________________________________________________________

1. Mostly writing stored procedures for Sybase on Unix and
associated financial reporting. Return

2. I had not written a line of Java code.
Return

3. Not part of the php syntax.Return

4. See the same numbered footnote in my last article.
Chapter 11 in "Core Java 2; Volume 1 - Fundamentals" has a
version of the graphic I display in the text. Error
objects have an existing instance and fire when needed to
stop the program. The Exception object has to be created.
Return









References



[フレーム]



[フレーム]





, Mike

Friday, December 14, 2007

Why Horrible Sun Boot Problems Aren't Always All That Bad

I had an experience at work recently that had me shaking me head (and wishing I'd left for home a few minutes earlier ;) One of our v490 servers, that was already racked,cabled up and ready to have the OS built and put on the network the following day, decided it just wasn't going to boot up; not even to an ok> prompt!

Without the keyswitch set to run extended diagnostics, the situation looked pretty severe. This is about all I saw before it would power back down to nothing:

1:0>Waiting for master in slave_spin() CPU=0:0, timeout in 29 seconds...
2:0>Waiting for master in slave_spin() CPU=0:0, timeout in 29 seconds...
3:0>Waiting for master in slave_spin() CPU=0:0, timeout in 29 seconds...
1:0>
1:0>ERROR: TEST = Slave Spin
1:0>H/W under test = CPU, Motherboard/Centerplane, I/O board, (system init)
1:0>Repair Instructions: Replace items in order listed by 'H/W under test' above.
1:0>MSG = ERROR :Timeout waiting for master, doing re-config reset.
1:0>END_ERROR


And "nothing!" Anyway, as is our company's policy, I placed a call to Sun Support and their suggestion, as is suggested plainly by the error above, was to have a Field Engineer come out and replace the CPU boards (including the CPU's and memory - which is actually faster), and if that didn't work, replace the motherboard, the centerplane and the I/O board, progressively, until the error went away. You can see why I wasn't too happy, right? We're talking about a potential 10 extra hours of work doing parts replacement, followed by diagnostics, followed by possible extra parts orders, replacements, diagnostics, add infinitum (if not ad naseum ;)

Here's the kicker. After hooking up a laptop to the ALOM port, we started the system up with extended diagnostics. It wasn't looking much better. In fact, it gave a lot of confusing errors, like (and I'm paraphrasing here, because I stopped logging my diag output after a while):

FATAL ERRORS:
This version of v490/890 servers only support Ultra IV Processors
CPU's Online:
cpu #0 - Ultra IV 1500
cpu #2 - Ultra IV 1500


What?? That seemed contradictory to me. So we did what isn't generally a good idea (unless your machine appears to be in a state of complete ruination anyway) and pulled the plug, let it idle and powered it back on with the diagnostic keyswitch set. This time it gave us a little more information, and - lo and behold - in between the thousands of diagnostic messages (in between the FATAL ERRORS and the "slave_spin" errors) this line popped up:

OBP/Flash version 4.16.4 does not support part number ##### (Which happened to be the part number of both of our CPU boards).

This was great news! But how to fix it? Of course, replacing the centerplane (which, if you've ever done it - or even watched it being done - understand that it can be a painstaking and extended process) would fix the problem. On the v490 server, the OBP resides on the centerplane, so that was one option (If we'd have followed Sun's advice, of course, we would have already gone through replacing both CPU boards and, possibly, the motherboard before getting to that point!)

Our system OBP/Flash version was 4.16.4, and for the 1500 CPU - Ultra IV CPU boards, we needed to be up to OBP/Flash version 4.18.1. Clearly the CPU boards had been put in the v490 without regard to whether or not they were actually compatible ;)

Our next step was to take an old CPU board and replace the two new ones with it (just to test) and, magically, the machine booted perfectly. None of the system components listed were in a state of failure, or on their way to failing. The 1350 CPU board we put in only required OBP/Flash version 4.15.6 to be supported, and our centerplane OBP exceeded that level.

Our options boiled down to, as we saw it then, installing the OS on disk while we had the one 1350 CPU board installed, downloading the latest OBP/Flash and installing it, and then shutting down and booting up with the two new 1500 CPU Ultra IV boards (While this was a perfectly workable solution, it seemed like there must be a faster way to do it). Net booting was also an option, but that would require modifying our net boot server and might also cause other unforeseen complicatons. We also didn't want to have to have Sun replace the centerplane, as this wasn't any more guaranteed to work than our system-install method.

We eventually ended up bringing a Sun FE on site and got the surprise of our lives (or at least our present days ;) Luckily, Sun FE's have a CD/DVD (So far as I know, it's been around for about a year and is only available to Sun personnel) called SUE (which stands for Sun Utility Environment - or something like that - I was sneaking peaks). This is a tool that's time came a long while ago. With it, the FE was able to boot us to the ok> prompt (using the 1350 CPU board) and run the OBP/Flash upgrade directly from CD!

That's stretching the truth somewhat - SUE actually creates a mini-boot environment in on-board memory and sets up a temporary alias so that you can reboot and upgrade the OBP/Flash. So, instead of having to install the OS, boot the machine into network mode, download the latest OBP/Flash and then reboot with the new flash file, like so (somewhat abbreviated):

init 0
ok> boot disk /flash-update-v490
<--- or whatever the OBP/Flash upgrade file was called.

We were able to update the OBP/Flash by just booting off of the SUE CD, picking the OBP/Flash upgrade from the list available on the CD and letting it do a :

reboot -- cdrom /flash-update-v490

That was a "huge" time savings! Hopefully, Sun will make this CD, or a CD utility like it, available to users (or, at least, contract holders) in the near future.

So, as it turned out, that absolutely horrible boot problem wasn't really all that bad. Rather than replacing every single piece of hardware on the system until we found the one that was bad, all we had to do was upgrade the OBP/Flash on the system!

Sometimes the most complicated problems have the simplest solutions :)

Best wishes,

, Mike




affiliate program

Monday, October 15, 2007

Capturing Errors With Apache's Internal Handler

Howdy, Late nighters :)

Here's a tip if you're looking to capture any old error message with apache and want to do something creative with it.

The default server action is usually good enough, but, sometimes you might want to do something extra (like redirect to a script that does a little something extra on your backend, redirect to internal or external links that will show up in reports or just make your error messages fun ...Is that possible?)

The "ErrorDocument" keyword is used for exactly this purpose. Here are a few examples below (all scripts, sites, paths, etc, are purely made up and probaby don't reflect your server configuration)

The syntax is: ErrorDocument ErrorNumber Action(First is plain text, next two are internal redirects, last is external)
ErrorDocument 301 "You got an error 301. Awesome!"
ErrorDocument 301 /public_html/errors/error_301.html
ErrorDocument 301 /cgi-bin/someErrorHandlingProgram.pl
ErrorDocument 301 http://www.errrors.com/error301.html


If there's interest, there might be something to doing some real custom whiz-work in a perl/cgi script to really "handle" errors :P

, Mike




affiliate program

Subscribe to: Comments (Atom)
 

AltStyle によって変換されたページ (->オリジナル) /