History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: UP-931
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Faizan Ahmed
Reporter: Faizan Ahmed
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
uPortal

ChannelRenderer finalizer is causing lots of loitered objects in memory causing a serious memory leak.

Created: 12/Apr/05 10:12 AM   Updated: 03/Jul/07 04:10 PM  Due: 15/Apr/05
Component/s: Rendering architecture
Affects Version/s: 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4, 2.4.1, 2.4.2
Fix Version/s: 2.5.0 RC2, 2.4.3

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: None
Image Attachments:

1. MYR-2-3-2-ChannelRenderer_retainedSet.png
(40 kb)

2. MYR-2-3-2-ChannelRendererGCRoots.png
(30 kb)
Issue Links:
Generic Relation
This issue relates to:
UP-862 BoundedThreadPool infinite loop or de... Major Closed
This issue relates to:
UP-1016 BoundedThreadPool infinite loop or de... Major Closed

Estimated End Date: 15/Apr/05


 Description  « Hide
ChannelRenderer finalizer is causing lots of loitered objects in memory causing a serious memory leak.

The finalizer in this class is basically added to takes care of runaway threads. A badly written channel can cause runaway thread e.g. a channel that goes in infinite loop etc.

We observed during memory snapshots analysis using YourKit that finalizer is getting blame of lot of loitered objects.


 All   Comments   Work Log   Change History      Sort Order:
Faizan Ahmed [12/Apr/05 10:17 AM]
MYR-2-3-2-ChannelRenderer_retainedSet.png reflect the retained objects because of ChannelRenderer.

Faizan Ahmed [12/Apr/05 10:18 AM]
MYR-2-3-2-ChannelRendererGCRoots.png reflect the GC roots to ChannelRenderer. In other words why ChannelRenderer getting blamed.

Faizan Ahmed [12/Apr/05 11:48 AM]
Following fix has been implemented

ChannelRenderer.java
Rename finalizer() as kill().
This method should be explictly called from ChannelManager to kill the runaway threads.

http://www.uportal.org/cgi-bin/viewcvs.cgi/portal/source/org/jasig/portal/ChannelRenderer.java

ChannelManager.java
Modified finishedRenderingCycle() method to explicitly loop thru ChannelRenderers held in ChannelManager.rendererTable and kill each thread in ChannelManager.finishedRenderingCycle() by calling
explictly ChannelRenderer.kill() method.

http://www.uportal.org/cgi-bin/viewcvs.cgi/portal/source/org/jasig/portal/ChannelManager.java



Andrew Petro [14/Apr/05 01:40 PM]
Reopening this issue as this change appears to have introduced a StackOverflowError.

Andrew Petro [14/Apr/05 01:52 PM]
The commit for this issue causes the broken code documented in UP-862 to be actually called.

Andrew Petro [28/Apr/05 02:22 PM]
I believe that under the changes from UP-931, the broken method of BoundedThreadPool is now called, resulting in the StackOverflowError.

Faizan Ahmed [20/May/05 03:39 PM]
This issue has been fixed for portal-2-4-patches after replacing home grown thread pool (Bounded & unbounded) with the backport thread pool