intermitent memory warning

David Shaw dshaw at jabberwocky.com
Fri Dec 10 16:07:49 CET 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Dec 08, 2004 at 02:12:30AM -0500, Atom 'Smasher' wrote:

> i thought i was either going crazy or stupid, but i really am getting 
> intermittent warnings:
>  	WARNING: using insecure memory!
> 
> the test above is unique, because usually in a test of 100, 500, or 1000 
> trials i get either 0% or 100% warnings. before getting that result, i got 
> a bunch of 100% error... after running that test i got a bunch of 0% 
> error.
> 
> i suspect that it might be a bug in FreeBSD 5.3-RELEASE since i haven't 
> noticed it before. now i'm having the same problem with 1.2.6 and 1.3.92. 
> has anyone else noticed this?

I tried to duplicate it on Linux, but without any luck.  It might be a
FreeBSD thing, or it might be something particular to your machine?
I've never heard of this happenening, even on FreeBSD, so I don't know
what to think yet.

> please advise how to trace this problem when it appears... i'm not sure 
> which --debug flag(s) or process-tracking applications (with what options) 
> will be most useful.

If you do C, take a peek at the code in util/secmem.c:lock_pool.  It
is unfortunately quite rich in #ifdefs since locking memory is pretty
platform-specific.  Add some debugging there - say, printing out errno
whenever mlock() returns -1.

David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.93-cvs (GNU/Linux)

iGoEARECACoFAkG5u8UjGGh0dHA6Ly93d3cuamFiYmVyd29ja3kuY29tL2tleS5h
c2MACgkQ4mZch0nhy8lcbgCdFi5ioNdT8EJ+17zKRSIV0l/HLwIAn1EMzmcmIyMl
M7h3oBlwZFtvSpFo
=hC/b
-----END PGP SIGNATURE-----



More information about the Gnupg-devel mailing list