EDIT: please note that even if this bug is fixed in Taurus, there is still a possibility of being affected by a mem leak from the underlying Qwt library if one customises the lines of a plot to be thicker than 1pt. See commit 26dd3450
How to reproduce (it can be reproduced both using tango or using eval):
For example launching:
taurustrend 'eval://sin(rand())' -r 10 -b 1000
or launching:
taurustrend sys/tg_test/double_scalar -r 10 -b 1000
and then monitoring the memory of the taurustrend process (use your own pid of the taurustrend process instead of 12000):
ps u -p 12000 | awk '{sum=sum+$6}; END {print sum}'
--
The leak appears after some minutes (from 1 to 10 minutes).
To be noted:
Bug appears in suse 11.1 and 12.1 (in 32 and 64 bits).
Bug does NOT appear on suse 13.2
Reproduced on a debian 9 using:
Many thanks for the effort!
Sergi
On 07/01/2015 02:45 PM, Carlos Pascual wrote:
Related
OLD Tickets:
#171mrosanes reports that the mem leak also apears using TaurusPlot (so we can rule out problems with the trends circular buffers).
I am now trying to reproduce with pure qwtplot
It can be reproduced in debian9 and suse11 with:
while the following code using just PyQwt does not yield any leak in the same systems:
Conclusions: the problem seems to come from TaurusPlot (neither TaurusTrend, nor QwtPlot)
Problem located. The memory leak is in the Qwt library. More specifically, in the QwtScaleEngine.transformation() method. It can be reproduced with the following code:
Possible solution:
The problematic call is used in several parts of taurus to get the type of scale. Among them, in each update of the data. I will try to send a patch that puts the transformation type in a cache to avoid calling the leaking method repeteadly.
Patches proposed by Carlos Pascual were integrated in the develop branch.
Diff:
Please note that, while the main cause of mem leak was the scale issue and that has been fixed, we found another memleak related to thick lines which we can only work around by making the default line width=1, but which will be triggered if you customise the line width to be thicker