Assumptions are the mother of all... failures

It’s a quite well established figure of speech with the average IT company and I hear it on several occasions during the average week. I often take it for granted that assumptions, and the following disasters, are directly related to human failure in assessing the situation correctly. However, today my colleague ran into something where he seemed to make a wrongful assumption, or did he not?

If you worked with Linux it’s pretty likely you have been in contact with the gzip tool which can compress files or data streams. Most will be aware of it’s usage but for completeness’ sake; when you have a file, say big.log you can compress it by executing gzip big.log. After the execution of this command the file big.log will be gone but big.log.gz will have taken it’s (smaller) place on your storage.

You must be asking yourself where I’m going with this… Let say you did your “gzip magic” before and big.log.gz is already there. That magic was weeks ago and big.log has grown substantially in the mean time, so you run gzip big.log

~# gzip big.log
gzip: big.log.gz already exists; do you wish to overwrite (y or n)?

Ow, right, haha! I forgot I did that some time ago, I answer with “n” and check the current files in my directory.

gzip: big.log.gz already exists; do you wish to overwrite (y or n)? n
~# ls big.log*

Where did my big.log go?!


Well you’ve just got bitten by an old gzip bug which has been patched in 2013 but which didn’t seem to make it’s way into Debian 7.

As far as I’m concerned this should have been something I could safely assume to work as expected but today I’ve learned.