Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362854 - Continuation implementations may deadlock
Summary: Continuation implementations may deadlock
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.5.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 9.0.0.RC1   Edit
Assignee: Simone Bordet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-03 19:14 EDT by Simone Bordet CLA
Modified: 2013-02-13 10:03 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Bordet CLA 2011-11-03 19:14:02 EDT
Continuation implementations may deadlock because they call listener callbacks with the continuation lock held.
If the listener callback performs some method call on the continuation, a deadlock may happen.

A case for this is available here for FauxContinuation: http://groups.google.com/group/cometd-users/browse_thread/thread/a5cef9c0af7ec577

However, AsyncContinuation is not immune: scheduleTimeout() is called with the continuation lock held, and it may call expired() for blocking endpoints, which notifies listeners.
Comment 1 Simone Bordet CLA 2013-02-13 10:03:39 EST
In Jetty 9, HttpChannelState (that replaced AsyncContinuation) is now free of the deadlock problem, because listeners are notified outside synchronized blocks.