I've got an intermittent exception that occurs roughly once every 80
hours, (once per 14 million calls of this routine).
I had the following line throwing on me:
objectResult = m_queue.Dequeue();
I broke up the lines into two:
object o = m_queue.Dequeue();
objectResult = o;
And saw the exception coming from the second line.
I added a retry loop around the assignment to objectResult, and I've
since reproduced the problem once, and the first retry failed again,
the second retry worked.
WTF?
Dual CPU machine w/ HT-enabled, 4 logical processors.
Running the "normal", non-server version of the CLR (bad idea?)
The out parameter exists on the client side like this:
object oResult;
WaitForResult( out oResult );
The out parameter gets passed through 4 functions which delegate to
other functions passing the out along the way. I've reproduced this in
both debug and release mode.
Thanks a ton,
-ken
rlander [MSFT] - 16 Dec 2004 22:36 GMT
I sent a link to this post the the CLR Stress team. They are going to
take a look at this. It will be at least 80 hours before I hear back
from them ;) Seriously, I'm not sure when I'll hear from them. If there
is a problem here, it will be fixed in the Whidbey product.
thanks -- rich
flaming asparagus - 27 Dec 2004 11:15 GMT
Thanks,
After switching to Server CLR this problem has not occured in 200+
hours.
Also, the NullReferenceException which is thrown sometimes re-throws a
NullReferenceException when ToString is called on it. I've seen this
before with exceptions coming out of unmanaged code, so I never call
ToString on exceptions directly, but I thought it might be indicative
of something.
-ken
Ravichandran J.V. - 17 Dec 2004 10:02 GMT
It could possibly be due to so many references to the Out parameter that
may have something to do with Garbage Collection because the object is
being allocated memory on the heap.
with regards,
J.V.Ravichandran

Signature
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com