[Mono-bugs] [Bug 559470] mono webserver2 is eating cpu

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 1 06:01:00 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=559470

http://bugzilla.novell.com/show_bug.cgi?id=559470#c2


--- Comment #2 from Adriaan van Kekem <avkekem at hotmail.com> 2009-12-01 12:01:00 CET ---
i did a code review in the system.web/cache class on the method ExpireItems and
found out that there is a loop in the method. Please add the marked line to the
code.

mcs/class/System.Web/System.Web.Caching/Cache.cs:

        void ExpireItems (object data)
        {   
            DateTime now = DateTime.Now;
            CacheItem item = timedItems.Peek (); 

            while (item != null) {
                if (!item.Disabled && item.ExpiresAt > now.Ticks)
                    break;
                if (item.Disabled)
                {   
+++                 item = timedItems.Dequeue();  //this line was not there. So
if this condition is reached, the while loop goes in an endless loop!!
                    continue;
                }   

                item = timedItems.Dequeue (); 
                Remove (item.Key, CacheItemRemovedReason.Expired, true);
                item = timedItems.Peek (); 
            }   

            ...
        }

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list