Archive for the 'Linux balkanization' Category

More Linux Distributions Please! Balkanization Improves Oracle IT!

Sometimes small problems really upset me. I have a test harness that nests shell scripts deeply. Why not—that is why fork() and exec() exist after all. I was getting odd failures deep down in the bowels of the harness that were a bit tricky to track down.

This particular test harness was failing with Segmentation fault on SuSE SLES 9 and Memory fault on Red Hat Enterprise Linux RHEL4. Same problem just different error text. When I found the problem I started to look into it on another test system that happened to be Fedora Core 5. I was frustrated to find that the problem did not happen on Fedora, but did on 32 and 64 bit releases of both RHEL4 and SLES9. Ugh.

The problem rested in the first 2 lines of a simple shell script. What was the offending code? Get this:


Wow, frightening stuff! In the first line of some stupid shell script I happened to execute the shell built-in time without timing anything, which was a goof on my part.  But really, bash seg faults because the time built-in doesn’t have an arg and only when that is the first line of the script? As long as time is the first command in the script it causes bash to freak out—regardless of what follows. Notice in the following screen shot how simply putting the shell built-in : as the first line of code—after forcing bash—alleviates the problem. Notice also that the problem didn’t happen on Fedora.

Oh how I hate problems like this—simple, stupid little shell scripts behaving differently on one Linux distro than on another. Yes, I know it isn’t the shell script that is technically behaving differently—it’s the implementation of bash. And if there were symbols in /bin/bash (it’s stripped) I’d tunnel-rat my way through gdb to see why it is freaking out, however, with limited information I can only determine the routine, which is called execute_command_internal().

I also know this is not technically a Linux issue since bash is just GNU stuff. To that end, some googling reveals that this bug has been reported in the Solaris camp in Open Solaris Bug 6328339 which was opened back in 2005. Even though this is technically a GNU issue I still get varying behavior from different Linux distributions which I believe is a by-product of balkanization.

I thought Linux was going to save us from all the balkanization we supposedly suffered under Unix rule. This is just a simple example of balkanization. We endured much worse side-affects of Linux balkanization with the pre-2.6 Kernel virtual memory fiasco. Some my recall the ill-fated clash of the virtual memory titans featuring the Archangelites opposing the Van Rielians—a war with a large number of customer casualties. Going back further, I recall plenty of workloads (most notably The Tens) that would completely crush one Linux distribution but function just fine with the other. Indeed, during that project we tested both RH2.1 and SLES7 and stayed with the one that could hold up under pressure—and if you read the paper you can envision the pressure!

How many Linux distributions are there now? Does Linux balkanization make life better for the average Oracle IT shop?


I work for Amazon Web Services. The opinions I share in this blog are my own. I'm *not* communicating as a spokesperson for Amazon. In other words, I work at Amazon, but this is my own opinion.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 2,935 other followers

Oracle ACE Program Status

Click It

website metrics

Fond Memories


All content is © Kevin Closson and "Kevin Closson's Blog: Platforms, Databases, and Storage", 2006-2015. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Kevin Closson and Kevin Closson's Blog: Platforms, Databases, and Storage with appropriate and specific direction to the original content.

%d bloggers like this: