process:exec memory leak
Bug #1027142 reported by
Xiang Gao
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zorba |
Fix Released
|
Medium
|
Chris Hillery |
Bug Description
Running the following query with valgrind will show some memory leak
import module namespace process="http://
process:exec("ls")
Related branches
lp:~zorba-coders/zorba/bug-1027142-process-leak
- Luis Rodriguez Gonzalez: Approve
- Chris Hillery: Approve
-
Diff: 32 lines (+10/-1)2 files modifiedsrc/com/zorba-xquery/www/modules/process.xq.src/process.cpp (+9/-0)
src/com/zorba-xquery/www/modules/process.xq.src/process.h (+1/-1)
Changed in zorba: | |
status: | New → In Progress |
assignee: | nobody → Chris Hillery (ceejatec) |
importance: | Undecided → Medium |
Changed in zorba: | |
status: | In Progress → Fix Committed |
Changed in zorba: | |
milestone: | none → 2.9 |
tags: | removed: process |
Changed in zorba: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I've fixed the leak in the process module; thanks for the report.
There are still 32 bytes leaked by Zorba itself for the dlopen() handle. I *believe* this is intentional, and that we do not "correctly" close dlopen()'d libs on purpose to support libjvm-based modules - the JVM does not respond at all well if it is started more than once in a single process. Those 32 bytes should be leaked once per module used in the Zorba process, so it does not amount to much (there are only a few dozen modules that could possibly be opened, so the max leakage is less than 2k).