Thread safe



It was my code.

Publicly, the investigators didn't blame me personally, said it was a systematic failure. But I know the game.

At the launch party we watched Glen on the big screen. The corridors were packed with employees; their families and even the general public overflowed into the marquees outside. Everyone stood silent, holding their breath as Glen took his first. A shock of surprise crossed his face, then he grinned.

"Mission control, we have mint. Minty fresh air up here in Habitat one. You guys thought of everything!"

An explosion of applause erupted, folk screaming and punching the air with excitement, journalists yelling into microphones, fighting to be heard over the din.

Their clattering echoes still fill the corridors of my now-hollow soul.



The inflatable habitat had performed superbly.

Initial stress tests were good. After several years of experiments the first tourists reached space. It was a golden age.

As a lead developer I was invited to speak at conferences, I even did a Ted talk. Behind the glaring stage lights, faces looked to up to me as I spoke, savouring every word from their god of code.



The engineers hardened the hardware against radiation. The analysts covered all failure points, ensuring every system was redundant and had failsafes.

All undone by one simple mistake. A single line of code among millions.


Humans are a fragile thing. We inhabit a very narrow band of chemistry, heat, gravity and pressure. To our bodies, space is about as hostile as it gets. You'll suffocate, your insides try to escape, your blood boils and you eventually freeze.


Failsafe programs were supposed to kick in. And they would have too, if the were any free thread space in the kernel.

Usually a thread just does one thing then quits, like measure a sensor to see if it's within limits. But of course I was being clever, keeping threads alive with locks, cross referencing their results before releasing them.

Only I didn't release them, I just deleted the reference and left the threads hanging.

Screw it. I'll take the bottle. Counting shots is like counting references.


So these threads piled up. The kernel limit was a thousand and...

So like there was about nine hundred and ninety nine. Something like that...

Anyway, what was I saying?

Oh right! So these habitats are supposed to fit that narrow band, you know where humans live. And my code did that for almost five years! That's something isn't it?

But slowly, once every day or two, a new thread was made that wouldn't die. My program handled extreme cases see, I designed it to keep working even when it couldn't make new threads. So I did keep the families alive! Even when it should have stopped! That's something? Isn't it?

I mean, it was really engineering's fault. Who builds a relief valve that jams? It's not my fault we pumped too much air into this thing and it popped! The relief valve was supposed to work! My code was complicated and difficult, how do you mess up simple mechanics?

How do they still have their jobs?

Anyway, no one talks to me these days. They didn't fire me, but they have me reviewing tickets in the support queue. You know, the stuff other businesses outsourced decades ago.

Gary came by my desk the other day with another delivery from a "fan", another bunch of balloons ties together with thread and a card with no message, just a sewing pin taped inside. Real funny, guys.
I spend every moment haunted by visions of frozen corpses floating bug-eyed in the blackness.

I can't escape.

There's only one thread left that matters, the one thread that can undo all the pain and maybe set things right for the families of the dead.

That thread is me.

I will terminate this thread.