There is a new module I'd like to introduce called Debug.Rapidlog. When you inherit it, it overrides werror(), and allows for logging that interferes minimally with timing (it logs into a buffer, which then is emptied from a different thread at idle times).
The idea behind this module is that it allows logging timing sensitive code. I find that when I add logging to (e.g. pgsql) to chase rare bugs, the logging itself often causes the nature of the bug to change (or disappear).
Any objections/suggestions? I committed it to 8.1 for now, but I need the module in 8.0 as well eventually, since I have to run it in production systems at times. So please also evaluate fitness for inclusion in 8.0 (no rush though, it does not need to be in the latest release).
On Tue, May 15, 2018 at 2:27 PM, Stephen R. van den Berg srb@cuci.nl wrote:
Any objections/suggestions? I committed it to 8.1 for now, but I need the module in 8.0 as well eventually, since I have to run it in production systems at times. So please also evaluate fitness for inclusion in 8.0 (no rush though, it does not need to be in the latest release).
When I need new features in Pike 8.0, I simply branch off, backport the changes, and then occasionally merge 8.0 back into my branch as required. I actually believe this to be common practice, as this is a simple and workable approach that is in line with our commit policy for the stable branch both in words and in spirit.
Tobias S. Josefowitz wrote:
When I need new features in Pike 8.0, I simply branch off, backport the changes, and then occasionally merge 8.0 back into my branch as required. I actually believe this to be common practice, as this is a simple and workable approach that is in line with our commit policy for the stable branch both in words and in spirit.
Well, for internal uses I already did this, of course. However, the Debug.Rapidlog module: - Allows for better testing which improves stability. - Is small. - Has no external dependencies.
So, committing it to 8.0 would improve stability for 8.0, hence the suggestion to consider it for inclusion there. Then again, it's just a suggestion, I'll keep using a forked 8.0 for as long as I need to improve 8.0's stability (basically hunting for race conditions in Sql.pgsql and Stdio.Buffer; they happen once per 24 hours on average on a busy server).
pike-devel@lists.lysator.liu.se