- Feature Articles
- CodeSOD
- Error'd
- 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
Overly dramatic coder wastes a lot of time writing ascii art pentacle. Amusing, but not particularly wtf-y.
Admin
You sound fun
Admin
Would be more interesting to know WTF he was doing wrong....
Admin
So let me get this: TRWTF is the misuse of the past tense of the verb "to lie". Amirite?
Admin
Maybe one out of 100 failed regardless of concurrency but it became noticeable at scale only.
Admin
Probably running afoul of process limits. Under Linux, the "maximum number of simultaneous processes" resource (RLIMIT_NPROC) includes threads, which is probably why the comment mentions it requires a lot of threads. At least a few common distributions gave a default that to 1024 threads/processes.
Admin
One thing I learnt in 8 years of programming is that if something does not work as expected, it is often your fault. The OS or the lib is rarely in cayse. You have surely done something wrong. Take a little break or a long break and check your code. If nothing change, ask for help.
Admin
To be fair, he did, as the artfully crafted pentagram attests...
Admin
A fine example of SDD (Satan Driven Development).
Admin
Yup ... I want ot see the source code. He was probably concurrently trying to do something in the OS that you can't. he could probably have two threads going and have a failure rate that you rarely notice like 0.00001%. The failure rate just got exponentially worse.
Admin
"When running multiple threads (~500) concurrently"
Well here's your problem...
Admin
Ok. I am in favor of this as goat population is on rise in Hyderabad. Artificial inseminal practices and people want to eat too much goat biryani. Hmm. Biryani...
Admin
At least it's documented
Admin
500 threads, and presumably heavy on the I/O? What in the world is this abomination?
Admin
Goat is very tasty but rarely fixes your bugs.
Admin
Clearly he is appealing to the wrong pantheon for help. Only when you have surrendered to Code-thulhu will you see the answer. Granted reality will no longer be involitile because of the insanity, but your out of threads problem will be resolved.
Admin
Yes, that's what I noticed.
Admin
The application developer says, "It must be a bug in the library." The library developer says, "It must be a be a bug in the kernel." The kernel developer says, "It must be a bug in the hardware." The hardware developer says, "It must be a bug in physics."
And then they were all enlightened.
Admin
Variation of the old classic that I used once in production years ago (for use with fixed width font of course):
Addendum 2017-04-18 09:49:
Neat, stripped my line breaks... [fixed by shadowmod]
Admin
I've been around goats. Goats attract lots of bugs.
Admin
"Abandon all hope, ye who enter here"
Nice. Ominous. Perfect comment block to see starting a build. No doubt inspired by a close encounter with somebody's brillant solution somewhere....
Admin
Silly developer, everyone knows goat sacrifices are for SCSI problems.
Admin
Sounds by far the most reasonable of the suggestions(/wannabe-righteous abuse) offered here.
Consider that he explicitly referenced "OS commands", rather than calls etc. Strongly implies: OS commands (...)
Which, depending on his approach but implied by his language, implies not just another process (and depending on architecture a further subsidiary thread), but a further wrapper process, used as subsidiary framework if not API: the shell.
So ~500 calls blows out to ~1,000 threads/processes and voila, limit achieved.
Same fundamentals apply for most OSs, not just POSIX-derivs, regardless of nomenclature.
Admin
If you miss the thread I'm on
You will know that I am gone
You can hear the whistle blow
A hundred threads
A hundred threads
A hundred threads
A hundred threads
A hundred threads
You can hear the whistle blow a hundred threads
Lord I'm one
Lord I'm two
Lord I'm three
Lord I'm four
Lord I'm five hundred threads from my home
(If you remember the 60's you weren't there!)
Admin
The physicist says: "the way of the software may be impenetrable, but nature cannot be fooled."
Admin
Stripped more than line breaks!
Admin
We've all had days like this. I usually appeal to BoB Dobbs instead.
BTW, swinging a dead cat over your head is only good for warts and won't help your code.
Admin
But limits will be different: https://blogs.technet.microsoft.com/markrussinovich/2009/07/05/pushing-the-limits-of-windows-processes-and-threads/
Admin
Or... you know googled "ASCII art pentagram"
....................../´¯/) ....................,/¯../ .................../..../ ............./´¯/'...'/´¯¯`·¸ ........../'/.../..../......./¨¯\ ........('(...´...´.... ¯~/'...') ..........................'...../ ..........''............. _.·´ ..........................( ..............................
Admin
Nice to see the formatting issues from the old community server days got ported over :)
Admin
ASCII pentagram stolen for use when I find my next WTF
Admin
I actually got scolded for putting this in an abomination of a class that I had to spend a couple of weeks getting my head around. It somehow felt fitting to put it there, but the architects disagreed.
Admin
I will walk five hundred threads, and I will walk five hundred more, just to be the man that walks a thousand threads, to fall down at your OS.
Admin
Argh! You are a dead man!
Admin
To be fair, failing silently with no indication of error is a fault of the OS. No matter what happens, the user has to receive an error if possible. Having 500 threads in the first place is solely on the user, though.
Admin
FTFY
Admin
What are the chances that somewhere in the WTF stack that is used to start the threads, something ignores/hides the error return code? How many times here have we seen try blocks with empty catches, swallowing exceptions like Deep Throw... I mean Deep Throat?
Admin
@ray10k : yeah well, if you don't like it, tough luck. I for my part enjoyed this story a friggin' lot.
@TDWTF: I just LOVE you guys. Keep up the good work, you make a (sometimes) hard job bearable.
Admin
Been there, done that. We had a policy of checking every single error condition... There was one, in an important part of the code that was plainly impossible to trigger. So on a lark I added code to dump "It is the second coming. All bow before the returning son of man". On the aging line printer. And email everyone. Guess three times what happened just one month later. Those line printers sure can chew through a hell of a lot of paper. Oh wait, I should have submitted that, right? :-)
Admin
To be fair, failing silently with no indication of error is a fault of the OS.
If you did not check the return value from the API/library call, that falls back on the application programmer.
Admin
You don't understand. His dabbling in the occult has changed him physically. He's going home and laying [an egg] on the shower floor. He's turned into a chicken-goat!
The warm shower water should incubate the egg nicely...