Significant memory leaks with recursive queries [CORE3208] #3582
Submitted by: @dyemanov
Recursive queries may leak some amount of memory from the request pool. This may be a big problem if the request is a trigger or a procedure, as this memory never gets deallocated until disconnection (or trigger/procedure recompile). In the test I have at hands (cannot be shared, unfortunately) every insert leaks about 20MB because of this issue (WITH RECURSIVE in the AFTER INSERT trigger).
All the leaked memory chunks are allocated in VIO_record():
I have tried the following solution in RSBRecurse::close():
+ char* p = tmp + inner_size;
and it seems to help (leaks disappear). Maybe a better solution could be suggested instead.
====== Test Details ======
Could not reproduce on 2.5.0 with trivial AI trigger which uses recursive query as source to insert statement.
The text was updated successfully, but these errors were encountered:
Modified by: @pavel-zotov
status: Closed [ 6 ] => Closed [ 6 ]
QA Status: Not enough information
Test Details: Could not reproduce on 2.5.0 with trivial AI trigger which uses recursive query as source to insert statement.