Why is custom inventory reporting a buffer overrun?
|Article:HOWTO5883|||||Created: 2006-11-27|||||Updated: 2007-03-27|||||Article URL http://www.symantec.com/docs/HOWTO5883|
Why is Custom Inventory reporting a buffer overrun?
Custom Inventory can iterate through each file in a directory and if that folder contains too many files, than it may error out with a buffer overrun error. For example, if you scan the temp directory with over 20,000 files, it may error out. You will want to throttle custom inventory in three ways: THROTTLEEVERY, SLEEPMS and most importantly MAXIO.
MAXIO is a way of limiting the number of accesses to a FOREACH object. For example, specifying a MaxIO of 2000 in a wmi FOREACH would tell custinv to break out of the FOREACH loop after 2,000 wmi record accesses had been made. This could be useful when a FOREACH object contains many more (perhaps tens of thousands) records than are desired in the final output.
A buffer overrun error can happen if you are attempting to scan 20,000 into memory before dumping it out to the file. The MAXIO will limit how many are put into memory.
Example XML snippet:
<%foreach file="file1" subdirs="yes" path="%temp%\*.tag" maxio=%MAXIO% throttle="%THROTTLEEVERY%,%SLEEPMS%" %>
If setting the THROTTLEEVERY, SLEEPMS, and MAXIO variables still crashes then you will need to scan only those directories that have fewer than 20,000 files or set the subdirs="NO".
Altiris has found a 'bug' in aexcustinv.exe that causes this to crash if too many files are scanned. The throttleevery, sleepms and maxio settings control how many files are reported - NOT how many files are scanned. This bug stems from scanning too many files. We anticipate that a fix will be released sometimes after Inventory for Windows 6.1 SP2 is released.
Article URL http://www.symantec.com/docs/HOWTO5883