[Mono-bugs] [Bug 74952][Nor] New - Rapid RSA construct-> random number generator -> NullReference

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat May 14 17:55:49 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by harningt at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74952

--- shadow/74952	2005-05-14 17:55:49.000000000 -0400
+++ shadow/74952.tmp.25242	2005-05-14 17:55:49.000000000 -0400
@@ -0,0 +1,81 @@
+Bug#: 74952
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: AMD64 - Gentoo
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System.Security
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: harningt at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Rapid RSA construct-> random number generator -> NullReference
+
+Description of Problem:
+  When rapidly constructing multiple RSA instances, the random number
+generator throws a NullReferenceException for some of the requests.
+Note: This appears to only occur when multi-threading.  When running the
+tests sequentially, the exception does not occur.
+
+
+Steps to reproduce the problem:
+1. Start many threads that calculate RSA keys at the same time
+
+
+Actual Results:
+- Some of the RSA instances fail to construct keys.
+
+Expected Results:
+All RSA instances construct keys successfully.
+
+How often does this happen? 
+Very often, basically whenever at least 10-20 threads are all requesting
+keys simultaneously.
+
+Additional Information:
+
+System.NullReferenceException: A null value was found where an object
+instance was required.
+in [0x00026] (at /extSrc/mono/mcs/class/corlib/Mono.Math/BigInteger.cs:530)
+Mono.Math.BigInteger:GenerateRandom (Int32 bits,
+System.Security.Cryptography.RandomNumberGenerator rng)
+in [0x00006] (at /extSrc/mono/mcs/class/corlib/Mono.Math/BigInteger.cs:555)
+Mono.Math.BigInteger:GenerateRandom (Int32 bits)
+in [0x00001] (at
+/extSrc/mono/mcs/class/corlib/Mono.Math.Prime.Generator/SequentialSearchPrimeGeneratorBase.cs:42)
+Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase:GenerateSearchBase
+(Int32 bits, System.Object context)
+in [0x00003] (at
+/extSrc/mono/mcs/class/corlib/Mono.Math.Prime.Generator/SequentialSearchPrimeGeneratorBase.cs:62)
+Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase:GenerateNewPrime
+(Int32 bits, System.Object context)
+in [0x00003] (at
+/extSrc/mono/mcs/class/corlib/Mono.Math.Prime.Generator/SequentialSearchPrimeGeneratorBase.cs:50)
+Mono.Math.Prime.Generator.SequentialSearchPrimeGeneratorBase:GenerateNewPrime
+(Int32 bits)
+in [0x00008] (at /extSrc/mono/mcs/class/corlib/Mono.Math/BigInteger.cs:932)
+Mono.Math.BigInteger:GeneratePseudoPrime (Int32 bits)
+in [0x00028] (at
+/extSrc/mono/mcs/class/corlib/Mono.Security.Cryptography/RSAManaged.cs:102)
+Mono.Security.Cryptography.RSAManaged:GenerateKeyPair ()
+in [0x00022] (at
+/extSrc/mono/mcs/class/corlib/Mono.Security.Cryptography/RSAManaged.cs:257)
+Mono.Security.Cryptography.RSAManaged:ExportParameters (Boolean
+includePrivateParameters)
+in [0x00023] (at
+/extSrc/mono/mcs/class/corlib/System.Security.Cryptography/RSACryptoServiceProvider.cs:225)
+System.Security.Cryptography.RSACryptoServiceProvider:ExportParameters
+(Boolean includePrivateParameters)
+in [0x0000f] (at /home/harningt/rsaCrash.cs:19) M:ThreadLoad ()
+
+Mono JIT compiler version 1.1.7.99, (C) 2002-2005 Novell, Inc and
+Contributors. www.mono-project.com
+	TLS:           __thread
+	GC:            System Boehm (with typed GC)
+	SIGSEGV      : altstack
+	Globalization: normal


More information about the mono-bugs mailing list