Archive for the wtf Category

Bizarre bug of the day: I just can’t post the following snippet of code in Wordpress 2.2.1 running in Dreamhost:

        if ((f = fopen(CONFFILE, "r")) == NULL)
                fprintf(stderr, "can't find configuration file\\n"), exit(1);

If I try, the server happily replies with a nice 503 error:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

If I replace fopen with “open” or “fopen” (like I did in the instance above) it works fine. Now can someone please explain me what’s going on?

Update: Ok, so Eduardo explained it. It’s mod_security doing something it shouldn’t, and the error message is totally misleading. Case closed (that was fast!).

As a software maintainer, sometimes you receive very peculiar bug reports ranging from laughable to completely bizarre, yet reproducible. Some of them are so strange they deserve a bit of post-mortem pondering and reflection, like this one. But first, it’s important to remember that the user reports what he sees, a manifestation of the bug — and that can be very different from the real causes of the problem. Ready to go? The next paragraph shows the original bug report, and then you’ll see what the investigations led us into.

Linux fails with a kernel panic on systems with a Celeron processor and 256MB of RAM when an Ext3 filesystem is created on a large partition and you set the number of blocks reserved to the superuser to 0 (mke2fs -j -m0). The problem doesn’t happen if you use a different processor, or in systems with 1GB of RAM.

(more…)