| Summary: | Excessive memory usage (RAService.exe) | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Curtis d'Entremont <curtispd> |
| Component: | Hyades | Assignee: | Dave Smith <smith> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 2000 | ||
| Whiteboard: | |||
|
Description
Curtis d'Entremont
This looks like a memory leak. It's possible that if the memory usage gets too high, that eventually a shared memory connection between the java profiler and the RAC cannot be created, which will result in no data appearing in the views. (See bug 56183, where this was also discussed). Not a memory leak. This is the shared memorychannel lingering. Dave, It looks like the shared memory is not being cleaned up when some exit condition occurs. We need to make sure these puppies get cleaned up in all conditions as they are 64MB each by default. I couldn't reproduce this problem with the 3.0.M8_20040331_1118 hyades data collection engine. Can you please try that version. When you said "then terminate the app", what did you mean by that?
I couldn't find the driver mentioned on hoplite4, so I re-tested using a more
recent one (3.0_20040419_0915). I'm using the following sample application that
repeatedly just calls a method:
public class SimpleTest {
public static void main(String[] args) throws Exception {
while (true) {
call();
Thread.sleep(300);
}
}
public static void call() {
for (int i=0;i<10;++i)
doSomething(i + "");
}
public static void doSomething(String arg) {
for (int i=0;i<arg.length();++i)
;
}
}
Here's how I'm launching it:
- First, note the memory usage of the RAService process.
- In the profiling & logging perspective, click on the profile toolbar icon
menu -> Profile...
- Double click "External Java Application".
- Specify the SimpleTest app shown above.
- In the Profiling tab, select the Execution History profiling set.
- Click Run.
- After the agent shows up in the profiling monitor and has collected some
data, right click on it and select Terminate.
- Note the memory usage of RAService is now ~60M higher than it was.
Found in Curtis' scenario, ra_flushShmToFD returns an error code to the shared memory flusher function shmFlusher in RACommS.c. The function then ended without releasing the shared memory. I changed the code to always execute the cleanup code, even if the flushing ended with an error code. The code will now issue a warning message to the log if flushing ends with an error. Committed change to Head stream. Verified in 3.0_20040427_0845. Win2k Fixed in M9 |