Closed MichaelJCaruso closed 7 years ago
Crud. This cycle garbage collection was introduced because it fixed a memory leak in the datafeeds that rendered Interface BatchFeedManager
's batching ineffective. Without the cycle detection the batching actually doesn't conserve memory; without the cycle detection uploads using Interface BatchFeedManager
have the same memory consumption as if it weren't used.
We can put this into master as an incremental step but I hesitate to put it into a release branch; it will break most necessary uses of Interface BatchFeedManager
.
Could not know that, but that sounds like a great production test case.
Now that you mention it, I'm almost certain I baked a reproducer into the ivr test suite
Does this pull request allow bootstraps to be built where they otherwise fail to build? Or does it succeed with a warning?
The former. Without it, bootstrap fails. With it, bootstrap quietly and correctly succeeds.
Is this meant to be a "pure" refactor now? I didn't see the mark()
-> startMark()
change to the Cycle Detection visitor so I thought you might be pull requesting the refactor that isn't meant to change or fix functionality?
This is a pure re-factor at the moment with no functionality changes except for the two bug fixes mentioned in the updated pull request. I'll submit the change you mention now.
Building a bootstrap database on the Mac uncovered a bug in the release 8.1 version of the garbage collector. Note that this is a logic issue and NOT a MacOS specific problem; however, it does not manifest itself in similar fashion on other platforms. In all likelihood that is the result of timing differences in the re-use of reclaimed memory but that hypothesis has not been confirmed.
Current Status
The goal of this pull request is to address this and whatever other issues prove to be related. Currently, the changes found here do not yet do that. They do, however:
Relative to the primary bug fix goals of this request, the following changes are currently present as well:
Problem Analysis
In a nutshell, it appears that the 8.1 garbage collector is failing to retain containers indirectly referenced by handle alone. The following structure exposes the problem:
There are a couple of different things going on that jointly conspire to cause a problem:
Without going into too much detail regarding the discovery algorithm, here's what appears to be happening: