• ray10k (unregistered)

    Overly dramatic coder wastes a lot of time writing ascii art pentacle. Amusing, but not particularly wtf-y.

  • GWO (unregistered) in reply to ray10k

    You sound fun

  • TheCPUWizard (unregistered)

    Would be more interesting to know WTF he was doing wrong....

  • Quite (unregistered)

    So let me get this: TRWTF is the misuse of the past tense of the verb "to lie". Amirite?

  • gleemonk (unregistered)

    Maybe one out of 100 failed regardless of concurrency but it became noticeable at scale only.

  • Michael P (unregistered) in reply to TheCPUWizard

    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.

  • kitikounel (unregistered)

    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.

  • just me (unregistered) in reply to kitikounel

    If nothing change, ask for help.

    To be fair, he did, as the artfully crafted pentagram attests...

  • Krzysztof Słychań (google)

    A fine example of SDD (Satan Driven Development).

  • Bonkey (unregistered) in reply to TheCPUWizard

    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.

  • (nodebb)

    "When running multiple threads (~500) concurrently"

    Well here's your problem...

  • (nodebb)

    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...

  • (nodebb)

    At least it's documented

  • derp (unregistered)

    500 threads, and presumably heavy on the I/O? What in the world is this abomination?

  • my name is missing (unregistered)

    Goat is very tasty but rarely fixes your bugs.

  • Wrong Gods (unregistered)

    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.

  • Brad Wood (google) in reply to Quite

    Yes, that's what I noticed.

  • Anonymous') OR 1=1; DROP TABLE wtf; -- (unregistered) in reply to Bonkey

    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.

  • Brad Wood (google)

    Variation of the old classic that I used once in production years ago (for use with fixed width font of course):

    {
         *   .=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.    *
         *   |                     ______                     |    *
         *   |                  .-"      "-.                  |    *
         *   |                 /            \                 |    *
         *   |     _          |              |          _     |    *
         *   |    ( \         |,  .-.  .-.  ,|         / )    |    *
         *   |     > "=._     | )(__/  \__)( |     _.=" <     |    *
         *   |    (_/"=._"=._ |/     /\     \| _.="_.="\_)    |    *
         *   |           "=._"(_     ^^     _)"_.="           |    *
         *   |               "=\__|IIIIII|__/="               |    *
         *   |              _.="| \IIIIII/ |"=._              |    *
         *   |    _     _.="_.="\          /"=._"=._     _    |    *
         *   |   ( \_.="_.="     `--------`     "=._"=._/ )   |    *
         *   |    > _.="                            "=._ <    |    *
         *   |   (_/                                    \_)   |    *
         *   |                                                |    *
         *   '-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='    *
         *        LASCIATE OGNI SPERANZA, VOI CH'ENTRATE           *
    }
    

    Addendum 2017-04-18 09:49:

    Neat, stripped my line breaks... [fixed by shadowmod]

  • LM (unregistered)

    I've been around goats. Goats attract lots of bugs.

  • Andrew (unregistered) in reply to Brad Wood

    "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....

  • I dunno LOL ¯\(°_o)/¯ (unregistered)

    Silly developer, everyone knows goat sacrifices are for SCSI problems.

  • W.S.Gosset (unregistered) in reply to Michael P

    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.

    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.

  • Herby (unregistered)

    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!)

  • Physics (unregistered) in reply to Anonymous') OR 1=1; DROP TABLE wtf; --

    The physicist says: "the way of the software may be impenetrable, but nature cannot be fooled."

  • Herby (unregistered) in reply to Brad Wood

    Stripped more than line breaks!

  • Rev. Spaminator (unregistered)

    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.

  • Klimax (unregistered) in reply to W.S.Gosset

    But limits will be different: https://blogs.technet.microsoft.com/markrussinovich/2009/07/05/pushing-the-limits-of-windows-processes-and-threads/

  • WonkoTheSane (unregistered) in reply to ray10k

    Or... you know googled "ASCII art pentagram"

    ....................../´¯/) ....................,/¯../ .................../..../ ............./´¯/'...'/´¯¯`·¸ ........../'/.../..../......./¨¯\ ........('(...´...´.... ¯~/'...') ..........................'...../ ..........''............. _.·´ ..........................( ..............................

  • WonkoTheSane (unregistered)

    Nice to see the formatting issues from the old community server days got ported over :)

  • Derf Skren (unregistered)

    ASCII pentagram stolen for use when I find my next WTF

  • derp (unregistered) in reply to Brad Wood

    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.

  • (nodebb)

    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.

  • Quite (unregistered) in reply to Zemm

    Argh! You are a dead man!

  • 20kdc (unregistered)

    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.

  • Runner #5 (unregistered) in reply to Zemm

    I will run five hundred threads, and I will run five hundred more, just to be the man that runs a thousand threads, to fall down at your OS.

    FTFY

  • I dunno LOL ¯\(°_o)/¯ (unregistered) in reply to 20kdc

    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?

  • Icke (unregistered)

    @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.

  • Kaewberg (unregistered)

    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? :-)

  • David Nuttall (google) in reply to 20kdc

    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.

  • Axel (unregistered) in reply to Quite

    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...

Leave a comment on “The Wrong Sacrifice”

Log In or post as a guest

Replying to comment #475149:

« Return to Article