Description
Opening a new bug to track concerns over fixes in TS-2497 causing a memory leak in certain edge cases of POST processing. The original fix in TS-2497 removed a tunnel.deallocate_buffers(). But since tunnel.reset() is called before later tunnel.deallocate_buffers() are called, the original buffer pointers are overwritten with 0's and never deallocated.
shaunmcginnity pointed out the leak in one case (read available <= 0), and the deallocate_buffer() was added in that path.
ffcai identified the other path as a source of a leak for us in production. He added back the deallocate_buffer() in the read avail > 0 case, and the memory leak went away. It has been running in production for that property for over a month without stability issues.
I'm opening this as a new bug rather than resurrecting the other bug. Many other things have changed since January 2014 when TS-2497 was originally identified. Neither briang nor jacksontj could provide a reproduction case. I'll set up the fix as a pull request to give folks time to review before committing.
Attachments
Issue Links
- relates to
-
TS-2497 Failed post results in tunnel buffers being returned to freelist prematurely
- Closed