process:exec memory leak

Bug #1027142 reported by Xiang Gao
6
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://www.zorba-xquery.com/modules/process";
process:exec("ls")

Related branches

Chris Hillery (ceejatec)
Changed in zorba:
status: New → In Progress
assignee: nobody → Chris Hillery (ceejatec)
importance: Undecided → Medium
Revision history for this message
Chris Hillery (ceejatec) wrote :

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).

Chris Hillery (ceejatec)
Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
milestone: none → 2.9
Chris Hillery (ceejatec)
tags: removed: process
Chris Hillery (ceejatec)
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.