Memory leak
|
|
---|---|
Hello, I have a test server which generates signal (a sum of two sin functions and noise) as spectrum of doubles (10000 points). I use two buffers one for signal (it is calculated in write_attr_hardware) and output buffer. These buffers are allocated in init_device() and freed in delete_device(). As follows:
Memory consumption grows 1MB per 10 minutes, when client polling. Unfortunately valgrind doesn't work on out powerpc configuration. Some exercises with __malloc_hook and __free_hook were done and suspicious function was found: Tango::PollRing::force_copy_data(Tango::AttributeValueList_4*) Configuration: CPU powerpc OS debian lenny gcc 4.3.2 Tango 8.1.2 zeromq 4.1.2 omniorb 4.1.6 On x86_64 (kernel 3.13 Ubuntu( Mint), gcc 4.8.2 ) it runs without memory issue. Do you have any suggestion how can I solve this problem? |
|
|
---|---|
Hi Alexs, I will try to help you with my modest experience… Is your signal attribute polled on the server side too? What is the polling frequency on the server side if any? If there is any polling on the server side, what is the value of your poll ring depth? What is your client polling frequency? If I were you, I would try to make only one call to in method.In the code you pasted, if the state is Tango::ON, is called twice in your method.I would suggest to try the following code instead:
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Thank you Reynald. Yes, it seems that multiple calls of set_value could lead to memory leak. But suggested changes did not affect memory usage growth. After some investigation, it was found that when server increases memory consumption, taurus client issues a warning: Dummy-2 WARNING 2015-07-30 18:24:55,560 devhost:10000.simple2/gen/dev1.signal.configuration: "Zombie" object (TangoConfiguration(devhost:10000/simple2/gen/dev1/signal?configuration)) received an event. Unsubscribing it. Taurus client is quite simple. It periodically prints attribute value.
When i run jive as client, memory usage is a constant. It seems to be a interaction problem. Could you suggest the direction of further investigation. |