[Mono-devel-list] Patch for NullReferencException in System.Web.Caching

Gonzalo Paniagua Javier gonzalo at ximian.com
Tue Apr 26 15:21:24 EDT 2005

On Tue, 2005-04-26 at 20:23 +0300, Eyal Alaluf wrote:
> Hi.
> We have seen recently in several applications that use System.Web.Caching that
> they have an occasional NullReferenceException. This was also reported a few
> times to the mono-list.
> After investigation and creation of a test we found the problem to be related
> to use of Sliding-Window expiration in the cache (as opposed to use of
> abslute time expiration).
> Attached is a stress test and a patch for System.Web.Caching that makes the
> test pass.
> During the test I found out that the ReaderWriterLock was unstable so I am
> attaching a patch for that. I am less sure about the completeness of this
> patch (it takes more time and care to fix these type of issues) but using
> it I was able to well test the System.Web.Caching fixes. If you will get
> an ApplicationException from the ReaderWriter lock complaining that the thread
> does not have the lock (read or write) then apply this patch and retry.
> The test application gets three arguments:
>   <number of threads>
>   <expiration time in millis>
>   [<optional argument to specify sliding-window expiration>]
> For example: 'mono CacheStress 100 10 1'
> will run the test using 100 threads and a 10 mills sliding expiration window.
> and 'mono CacheStress 100 10'
> will run the test using 100 threads and a 10 mills abosolute expiration window.

Nice! There's a bug report on this but I could never reproduce the same

I'll test test this later today.



More information about the Mono-devel-list mailing list