Dunc's programming and sysadmin blog

I'm an experienced C and Perl programmer and systems administrator, interested in large scale ruthless automation of systems. These are random musings about stuff I'm doing or thinking about.

Started writing a followup Professional Software Development article about my datadec tool (which generates an ANSI C module to implement a set of Recursive Data Types of your choosing), may take a few days to get this written.  When it’s finished, it’ll be linked in on my PSD page:

  www.doc.ic.ac.uk/~dcw/PSD/

Posted 182 weeks ago

Released an ElasticSearch Tutorial showing a way of using our private cloud to create a fleet of short-lived (Ephemeral) cloud VMs to run a distributed computation as an experiment.

Posted 182 weeks ago

Eric Raymond has recently written a guide called The Lost Art Of Structure Packing which describes how C compilers (portably) lay out fields in structures, with padding to preserve alignment constraints etc. (Thanks to Latency McLaughlin of LinkedIn for sharing this link).

Posted 182 weeks ago

Stimulated by a LinkedIn discussion a few weeks ago, I’ve just finished a new article in my occasional Practical Software Development pages: Article 7: Import Cool Features #1: Simulating OO in C

Posted 183 weeks ago

Really like Matt Trout’s talk on"Architecture Automation: One Alligator at a Time" from YAPC NA in 2013:

  https://www.youtube.com/watch?v=3xQqLNBeokc

Posted 183 weeks ago

LinkedIn (Plain Old C group) update: Unions in C

Yesterday, I added a (long) explanation of using Unions in C for implement variant record/inductive data types on the LinkedIn Plain Old C discussion group.  Link here:

https://www.linkedin.com/groups/union-in-C-1627067.S.5904592360947355652

Posted 183 weeks ago

Just experienced Ubuntu bug 1347147 in kerberos propagation hang

Just building a new kerberos slave KDC (Key Distribution Centre) on Ubuntu 14.04LTS, and experienced a bug - when propagating a large kerberos database from the master to the new slave the kdb5_util load hangs.

My colleague Giuseppe Mazza reported this about a month ago to the kerberos mailing list, now it’s confirmed as a kerberos/gcc/Ubuntu bug that’s been fixed in 14.10 unstable as described here:

https://bugs.launchpad.net/ubuntu/+source/krb5/+bug/1347147

Apparently the bug is caused by a broken GCC pointer alias optimization in gcc-4.8 and 4.9, but also some kerberos library support code could have been written using different macros to avoid the problem.

Updated kerberos packages don’t seem to have yet been released for Ubuntu 14.04, and as this was biting us, as a temporary workaround, I grabbed the package sources for “krb5” 1.12.1+dfsg-7 (latest version) from 14.10, and rebuilt them locally on an Ubuntu 14.04 box.  Manually installed them on our experimental slave KDC, now kdb5_util load finishes in under a second!

Posted 183 weeks ago

My first blog post

Ok, let’s try this out. I’m going to add blogs about random computing/programming/systems administration stuff here.

Posted 183 weeks ago