- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Stop Poking Me!
- Operation Erred Successfully
- A Dark Turn
- Nothing Doing
- Home By Another Way
- Coast Star
- Forsooth
- Epic
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Fristly, time zone of that server should be set correctly. See man 5 crontab
Admin
It would have been more interesting to know what the reason for that cron job was...
Admin
So did they add a signal handler to log that an external signal requested the application to shut down?
Admin
A simple, but apparently effective, form of "chaos monkey".
Admin
Never attribute to malice that which is adequately explained by stupidity.
Admin
What could possibly have come to the mind of the writer of this amazing piece of chaos? Was he bullied by Steve and his co-workers and this was his revenge? Did a program with PID 21342 once shared his pics on internet? Or is he The Dude stuck in the The Grid and 21342 was the PID of Clu? Infinite possibilities. All delicious.
Admin
If the application stays up all the time until the cron kills it, why would its PID suddenly match the one specified on the crontab? tl;dr - PIDS don't change.
Admin
I don't think I would have caught that. Good one on Steve!
Admin
I can see how it could arise.
Someone is testing the signal handling of a process. It's currently 12:15 and he wants to see what happens if it gets an automated signal from a cron job. His process is already running with a pid of 21342, and so he edits a quick entry into crontab - but then forgets to remove it afterwards.
Since there were apparently lots of entries there, all essential to the running of the system, when the code was promoted to live, that entry came along too.
Admin
Admin
Because the author neglected to mention this (other) cron entry:
Admin
I can see how you never heard of the sleep command.
Admin
Chaos Monkey cronscript:
[ $RANDOM -lt 100 ] && killall mysqld
Admin
You meant "22 12 * * * kill 21342", right ? Otherwise this was a really late lunch !
Admin
Admin
Man, now I have to check the email. I'm 99% certain I copied it straight out of the submitter's message that way, but it's still possible I rekeyed it and jacked things up.
Admin
Should have set it to run at 11:22, sleep for an hour, then use the OMGWTF 2 code to randomly determine if it kills the process today or not. Beautiful sabotage.
Admin
That would have worked once in every 274 years. And that's assuming the application gets restarted (i.e. its PID changes) every day. If it stays up for days/weeks, it may take time up to the next ice age until it gets really killed by that.
Admin
But kill normally sends SIGTERM, which can be handled.
Admin
Linux weenie. As opposed to Solaris weenie, who would by the same method shutdown the system to single user mode.
Admin
The original submission didn't explain the mechanisms, but I'm going to assume that we're dealing with something that spawns lots of child processes, and doesn't handle it gracefully when one of the children dies. Just a guess, I don't know.
Also, the actual problem-solving process took over a year before anybody really got annoyed. Presumably, it wasn't happening all that frequently.
Admin
The other possibility being the company operates in multiple timezones with the core being somewhere else.
Admin
I know what happened.
A business manager said, "It's only a matter of time before this application crashes mysteriously," and a development manager wrote it down as a requirement.
Admin
This is the good-old-fashioned sort of WTF for which I come to this site to read. It's not TDPHB or the Daily Dogbert or the Daily Elbonian, but something typed into computer file that causes trouble and makes your head explode trying to think of a good reason for it to have been typed.
Captcha: abbas. "The first ABBA was the best. Now we have a bunch of second-rate abbas."
Admin
Admin
The real WTF is Turkish pizza, amirite?
Admin
The WTF is that Steve's Borek was still hot. He'd left the cafe, got back to the office, fixed the issue and it was still piping-hot!
Admin
Turkish pizza is not worse than failure- it's better than success. My arteries are hardening just thinking about it.
Admin
I'd say TRWTF is ignorant new worlders calling it turkish pizza, because they don't know the word Lahmacun, but they have heard of turkey and pizza.
Admin
Admin
Lahmacun is not the same thing as Turkish pizza. At least in the Turkish places around here, Turkish pizza is someplace between lahmacun and pide. Admittedly, a subtle distinction, but it's nothing like the traditional lahmacun.
It's sort of like getting Chinese food in the US. It's nothing like actual Chinese food. While Turkish pizza is closer to actual Turkish food, it's been deeply Americanized.
Admin
TRWFT is that he thinks a sandwich is healthy.
Admin
TRWTF is the screenshot of Mac OS X: a platform where cron has been deprecated in favour of launchd.
Admin
Sounds exactly like somebody ran
`echo "12 22 * * * kill $(pidof thing_that_needs_to_be_reset)" >> /etc/crontab"'
or somesuch - i.e. when entered the command was something sane, but it got evaluated a bit sooner than expected. Still a WTF on the part of the author of that command, I'd say.
(Of course, this would be a classic 'disgruntled ex-employee' move, too)
Admin
Admin
Admin
The real WTF is that now I'm hungry for Turkish Pizza and Borek but I dont' even know what they are.
Admin
Yeah, but calling it turkish pizza is like calling a curry "Indian Stew", because it's been Anglicized. Anyone who does that needs pain.
Admin
...as demonstrated by the zero-length /etc/crontab :)
Admin
Admin
At least we didn't have to pay for this, nor experience every TV channel in the world telling us it's the best story ever.
Admin
Read the source, Mr. DOS.
Admin
Using cron for that is a WTF, there is tool for running something just once at a specific time, ( at ).
Admin
Small math correction to something that was noted above: on a somewhat regular system, this would have a 1/32768 chance of killing a process with randomly varying PID each day, and thus only have a 50% probability of happening once in
50% = [complement of not happening]^[this many times in a row] ½ = (1−1/2¹⁵)^(365.25⋅{years}) ⇒ ln(½)/ln(1−1/2¹⁵)/365.25 = 62 years.
Either $PIDMAX was set to something much lower (but still higher than 21342, so that is not really plausible), or the process owned a multitude of PIDs that all caused the application to crash on SIGTERM. To crash with 50% certainty every 6 months, it would have to average on 124 vulnerable PIDs at any given (lunch)time.
Admin
Maybe author want us to goggle for the recipe.
Admin
Who uses 82×24?
Admin
Admin
Admin
The name is Börek, you can't spell turkish food without umlauts.
Admin