billroper: (Default)
[personal profile] billroper
As you saw yesterday, we've been concerned about the virtual memory hole in our Server. It's not a leak, because the memory was eventually being cleaned up when you closed the Server, but the memory was being stuffed into a side pocket until then and not let loose. This was a Bad Thing (TM).

Bob, the new boss, has been running memory tests with BoundsChecker and had noticed that a particular function was opening a number of documents that weren't being closed. My initial assumption was that this was because of a failure in reference counting the document that was preventing the destructor from being called, so I dropped a bunch of TRACE statements into the code so I could watch files opening, closing, and being destroyed.

At the end of the run, I closed the Server normally and 33 unnamed (presumably temporary) files were closed. *ick*

So we went and looked at the function that Bob had located. It turned out that the function opened a temporary document and never asked for it to be closed. However, the document was being correctly registered with the document template, so when the application was closed, it was found and killed.

I added a bunch of try/catch logic to make sure that the document died on schedule. And things appear to be better now.

Apparently, though, my first assumption should have been that the person who wrote the code would forget to close the document. Not an assumption I like to make, but it would have saved some time...
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

Profile

billroper: (Default)
billroper

May 2025

S M T W T F S
     1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 30th, 2025 06:10 pm
Powered by Dreamwidth Studios