This problem is reported from time to time and is an issue with the DB_File module, not SpamAssassin itself.
There are two possible reasons for this bug:
In either case, re-installing DB_File (either via CPAN or, preferred, your distribution's package system) normally fixes the problem.
See also: OutOfMemoryProblems