memory leak when doing fleshed Fieldmapper searches from C DB services
Bug #1974195 reported by
Galen Charlton
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
High
|
Unassigned | ||
3.7 |
Fix Committed
|
High
|
Unassigned | ||
3.8 |
Fix Released
|
High
|
Unassigned |
Bug Description
When open-ils.cstore, open-ils.pcrud, and open-ils.rstore do a fleshed Fieldmapper-based search of an IDL class, there is a point where it serializes the fleshed response for the sake of a debug-level log entry. However, the resulting JSON string gets leaked whether or not the log entry is actually sent.
This leak has been observed to significantly waste memory in PCRUD drones that are either long-lived or were tasked with processing a query that includes fleshing and returns a big response.
Evergreen 3.7+
Changed in opensrf: | |
importance: | Undecided → High |
affects: | opensrf → evergreen |
description: | updated |
Changed in evergreen: | |
assignee: | nobody → Jason Stephenson (jstephenson) |
Changed in evergreen: | |
status: | New → Confirmed |
Changed in evergreen: | |
milestone: | 3.9.1 → none |
Changed in evergreen: | |
milestone: | none → 3.9.1 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
A patch is available in user/gmcharlt/ lp1974195_ fix_flesh_ fm_search_ leak / https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ gmcharlt/ lp1974195_ fix_flesh_ fm_search_ leak
The patch simply removes the debug log entry in question, since under normal circumstances the fleshed response is immediately returned anyway. However, if folks feel strongly that it needs to stay in, somethi8ng like this would fix the leak:
char* debug_str = jsonObjectToJSON( cur );
osrfLogDebug( OSRF_LOG_MARK, "%s", debug_str );
free( debug_str );
Marking this as high priority since this has been observed to really chew through memory.