Monday, September 14, 2009

OpenBSD and (oops!) NO threads

Wow.

I just found out that OpenBSD only has user-space threads.

User. Space.

This came up because stdout doesn't work quite right, apparently. My friend says that OpenBSD sets it to non-blocking. In general, non-blocking means "try to write to , and what isn't written... try it later." But every program I've ever seen assumes stdout is blocking, so in the OpenBSD environment the unwritten data will just get dropped on the floor. Answer: build as an unthreaded application so stdout will work appropriately. Are you kidding?

How can an operating system claim to be Modern, yet lack something as basic as kernel threads?

Insanity.

5 comments:

Exospaca said...

You're something of a moron, yes? Where do the OpenBSD developers claim to be a modern operating system? They call it a, "FREE, multi-platform 4.4BSD-based UNIX-like operating system." And they, "emphasize portability, standardization, correctness, proactive security and integrated cryptography." I do not see, "modern," anywhere.

The entire system is developed by people in their spare time, you don't like it, you're free to pitch in or fuck off, it doesn't matter which. Look up rthreads.

Devdas said...

I believe that the OpenBSD folks also have security as a prime concern, so anything which makes it harder to make things secure is turned down.

Threads with mutable state and shared acess to resources open up a whole new class of attacks.

To holes in the default install in nearly a decade is quite a good record. I see no issues with giving up kernel space threads for that win.

Greg Stein said...

@Exospaca: heh. Guess I need to read more closely, then. Okay. I'll refer to OpenBSD as "archaic" or "medieval" rather than "modern". And the "put up or shut up"? Sure. I've been contributing to Open Source for a dozen years. Familiar with that. So hey... your comment was, um, educational. Thanks. Yeah.

@Devdas: yeah. I can see that. Threads are a bitch to program properly. A little mistake, and the house of cards falls over. From that angle, I can see how the security philosophy would end with "let's discourage [poor] thread programming by not supplying kernel threads". Great point.

Ian McKellar said...

The combination of @Exospaca's attitude and the kinds of hardcore stupidity like the ones you've discovered are why I've chosen to avoid OpenBSD like the plague.

@Devdas, ultimately offering functionality is what opens you up to security vulnerabilities. Perhaps the best way to keep your system secure is just to turn it off. Or not install any OS. My BIOS has had fewer root holes than OpenBSD :)

Exospaca said...

It's funny you should mention my stupidity Ian, because I only tend to voice my opinion when I see people like Greg being stupid.

Talking shit about the efforts of a bunch of volunteers is stupid, arrogant and low. It has nothing to do with OpenBSD, if Greg had said something similar of Haiku or ReactOS, I'd call him out just as vehemently.