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

Key: UP-862
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Michael Ivanov
Reporter: Scott Battaglia
Votes: 0
Watchers: 0
Operations

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

BoundedThreadPool infinite loop or deadlock

Created: 09/Mar/05 04:53 PM   Updated: 23/Mar/07 08:43 PM
Component/s: Rendering architecture
Affects Version/s: None
Fix Version/s: 2.5.0 RC1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Generic Relation
This issue relates to:
UP-1016 BoundedThreadPool infinite loop or de... Major Closed
UP-861 move to mainstream thread pool impl Major Closed
This issue relates to:
UP-931 ChannelRenderer finalizer is causing ... Major Closed
UP-946 Restore safety to channel rendering Major Closed


 Description  « Hide
No one calls destroyThread() or stopWorker(). If someone were to call these methods, we'd either get deadlock or infinite recursion.

In looking through the Worker class in search of performance issues, Faizan and I noticed Worker.that stopWorker currently calls ThreadPool.destroyThread(this).

Currently the portal is using BoundedThreadPool and its destroyThread(Worker worker) implementation calls worker.stopWorker() which in turn calls destroyThread(this).

On top of that destroyThread is synchronized. There appears to be an opporunity here for either deadlock or StackOverflows (or whatever is thrown with those types of infinite loops) or both! Currently, stopWorker and destroyThread appear to call each other so this code is never actually executed. However, if executed accidentally it could have some adverse affects.


 All   Comments   Work Log   Change History      Sort Order:
Andrew Petro [09/Mar/05 04:54 PM]
Changing away from uPortal custom thread pool code would resolve this issue.

Andrew Petro [14/Apr/05 04:18 PM]
BoundedThreadPool version 1.9 and AbstractPool version 1.17 resolve the StackOverflowError infinite recursion problem.

Andrew Petro [19/Apr/05 10:32 AM]
I don't really understand the deadlock issue, but it doesn't look like that portion of this issue has been resolved for the milestone. Carrying issue forward against the RC.

Scott Battaglia [19/Apr/05 10:36 AM]
This is a moot point with the introduction of the backport concurrency library.

Can uPortal threadpool library be deprecated or removed entirely?


Susan Bramhall [19/Apr/05 11:07 AM]
Actual infinite loop was corrected by commit to BoundedThreadPool and Worker 4/14

Michael Ivanov [19/Apr/05 11:17 AM]
There is no deadlock issue:
Worker.stopWorker() is never called from Worker.run() so threads never kill themselves

Andrew Petro [28/Apr/05 02:29 PM]
This issue is resolved in HEAD but not in 2-4-patches.