(Windows, ipmiutil-2.9.5)
Hi,
I have the following task: I need to write the information about the CPU temperature, motherboard temperature and so on to the database. In my project I have included ipmicmd.h isensor.h isensor.c. I link it with ipmiutil.lib.
At the beginning, I get sdr cache and save it in the buffer for each sensor. Then every second I call the GetSensorReading() function from isensor.c. All works fine, but there is a significant memory leaks. After running an application just for 1-2 minutes, there is about 1MB leak. The application that just calls this function after a month of work takes 90 MB of RAM (7 MB at the start)! It do nothing except calling this function.
You can very easy check it even with your examples. Just run impiutil.exe sensor -g temp -j dump -s -w -L 50 or ipmi_sample2.exe -i 1 -l 50 and you will be able to watch how your memory is eaten up in real time.
Any suggestions to fix it?
Thank you for your help.
Best regards,
Aleksey
It seems to me that the same problem has been already discussed in this topic. But the attached fix is not working for me because it's for Linux.
Hmmm. I'm guessing that it might be reallocating the sdr cache, but I don't see it right away. I'll have a closer look. When you run 'ipmiutil sensor ...' without -j does the leak go away?
No, it doesn't.
-j option just decrease the cpu usage.
Anyway even without this option the leak doesn't go away.
Aleksey,
Sorry for the delay in responding, but I have had trouble reproducing this on my systems.
The link you referenced in the original description related to the openipmi Linux driver, so perhaps it is not in ipmiutil but the driver in this case as well.
In Windows, there are two drivers supported: Microsoft ipmidrv.sys and Intel imbdrv.sys.
The Microsoft driver comes with Windows, but does not work on all platforms.
The main test platforms I am using have the Intel imbdrv, and I do not see the leak either in Linux or in Windows (with imbdrv), so that leads me to look at the driver.
I'm guessing that you are using the Microsoft ipmidrv (shown via 'driverquery')?
If so, we can hopefully find something that can be fixed in how it is being called, because Microsoft has not fixed any bugs in that driver for a very long time.
The output of a session showing the leak, adding the debug '-x' parameter may help.
Andy
Thank you for your reply!
Yes, I used the Microsoft driver. Now I have installed the Intel imbdrv and all leaks are gone. Thank you again!
FYI. I have been able to reproduce the leak using the Microsoft
driver, and am investigating this further to see if I can work around
the WBEM access method to eliminate the leak for MS ipmidrv.sys.
On Fri, Jan 16, 2015 at 1:56 AM, Aleksey renzzo@users.sf.net wrote:
Related
Support Requests:
#11Memory leak was in Microsoft ipmidrv.sys. Problem report to Microsoft received no response. Switching to Intel driver resolved the problem.