hi,
with the introduction of the new plugin, the Torrus collector started to experience memory corruption:
http://torrus.cvs.sourceforge.net/torrus/plugins/rawexport/RawExport.pm?revision=1.4&view=markup
The customer is running perl-5.8.8 under Sun Solaris 10, with the following module versions. Unfortunately I don't have direct access to their server:
# perl -e 'use threads; printf("%s\n", $threads::VERSION)'
1.67
# perl -e 'use threads::shared; printf("%s\n",
$threads::shared::VERSION)'
1.15
Have there been any important bugfixes in the threads modules since those versions? In the changelogs, I found only minor improvements and new features.
The code is structured as follows:
Line 62: initThreads() is called when the collector process starts up.
Line 155: setValue() is called by the collector to store the collected value
Line 171: storeData() processes the stored values and pushes them into $thrUpdateQueue (Line 281)
The value that is pushed into the queue is a shared hashref, and its key 'values' points to a
shared arrayref.
Lines 270-273: here I fill in some values in the shared hash from non-shared values. I
guess they should be copied into the shared memory by values.
Line 289: this is a background thread that pops the values from the queue and stores them in files.
Line 297: time manipulation functions might call non-threadsafe system calls
Line 299: Is it safe to use IO::File, or it's better to just open() instead?
thanks |