Tuesday, October 21, 2025
The actual root cause of yesterday's bug were laid over twenty years ago
Yesterday,
I found the root cause of a bug but I did not go into details about how that bug slipped into production
(so to speak).
That's easy—the configuration of mod_blog
differ between my development server and public server.
On my public server, I have the following bit of code in the configuration:
process = require("org.conman.process") -- -------------------------------------------------------------------- -- process limits added because an earlier version of the code actually -- crashed the server it was running on, due to resource exhaustion. -- -------------------------------------------------------------------- process.limits.hard.cpu = "10m" -- 10 minutes process.limits.hard.core = 0 -- no core file process.limits.hard.data = "20m" -- 20 MB -- -------------------------------------------------------- -- We now resume our regularly scheduled config file -- --------------------------------------------------------
I load a module to configure bits of the environment that mod_blog
runs in.
The configuration file on the development server does not have such code.
So when I compiled the email notification program,
the fact that I did not include the -rdynamic
compiler option was not an issue when I ran my tests.
Yes,
a case where there was a difference between development and production that allowed a bug to slip through.
So I decided to dig a bit deeper.
A few days ago I explained why I had such directives in my configuration file when
I was asked why didn't I use Apache's RLimitMEM
directive.
I answered that the cause of adding the process limits happened pretty early in the use of mod_blog
and that I didn't recall seeing such a directive in Apache at the time.
But I did get curious as to when Apache might have added the RLimitMEM
directive.
I started this site using Apache 1.3
(when that was the current version of Apache—I've been blogging for quite a long time)
and I was thinking that the RLimitMEM
directive may have been added around version 2.0.
In my archives,
I found a copy of Apache 1.3.9 and wouldn't you know it—RLimitMEM
existed!
Sigh.
I could have avoided yesterday's issue had I only read a bit further into the Apache documentation back in the day.