Task #1855 (closed)
Possible file descriptor leak
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | n.a. | Milestone: | OMERO-Beta4.2 |
Component: | n.a. | Version: | n.a. |
Keywords: | n.a. | Cc: | cxallan, cneves |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.0d |
Sprint: | 2010-03-05 (4) |
Description (last modified by jmoore)
Needs significant testing to find where the leak could be.
Results:
- The usage which led to this being discovered:
- Web application (JCB DV) uses detached sessions
- Each of 5 processes use the session at the same time
- After an hour, the session's timeToLive times out
- close() is never call on services to facilitate reuse
- Other observations
- 3 PixelsBuffers are created for a single call to TB.getThumbnail().
- All are closed on TB.close() and/or closeSession()
- NB: the last file descriptor seems to be left open until the next one is opened. Seems like a Java oddity.
- Attempts to call TB.close() on session destruction lead to further SessionTimeoutExceptions internally, so that close() never gets called.
Attachments (1)
Change History (10)
comment:1 Changed 14 years ago by jmoore
- Cc cxallan added
comment:2 Changed 14 years ago by wmoore
- Sprint changed from 2010-02-19 (3) to 2010-03-05 (4)
Changed 14 years ago by jmoore
comment:3 Changed 14 years ago by jmoore
- Cc cneves-x added
- Remaining Time changed from 1 to 0.75
- Status changed from new to assigned
This is very likely being caused most directly by not actively closing stateful services (thumbnail stores, etc.) in the JCB application, but on session death, they should go away.
Next phase: find out whether or not, when and how thumbnail services are not getting reaped.
comment:4 Changed 14 years ago by jmoore
- Remaining Time changed from 0.75 to 0.5
(In [6234]) rem #1855:0.5d - timed-out sessions now correctly close services
Previously, on session timeout, ServiceFactoryI.doDestroy()
couldn't successfully call the wrapped services to perform
cleanup. This has been re-arranged such that interceptors are
now aware of the "close" method, and behave differently. Also:
- Refactored all stateful methods to AbstractAmdServant
- Added preClose() callback
- Passing current SessionContext back in SessionTimeoutException
comment:5 Changed 14 years ago by jmoore
(In [6235]) rem #1855:0.5d - timed-out sessions now correctly close services
Previously, on session timeout, ServiceFactoryI.doDestroy()
couldn't successfully call the wrapped services to perform
cleanup. This has been re-arranged such that interceptors are
now aware of the "close" method, and behave differently. Also:
- Refactored all stateful methods to AbstractAmdServant
- Added preClose() callback
- Passing current SessionContext back in SessionTimeoutException
original-svn-id: file:///home/svn/omero/branches/Beta4.1@6234 05709c45-44f0-0310-885b-81a1db45b4a6
comment:6 Changed 14 years ago by jmoore
- Description modified (diff)
comment:7 Changed 14 years ago by jmoore
- Remaining Time changed from 0.5 to 0
- Resolution set to fixed
- Status changed from assigned to closed
Hourly graph of file descriptor counts over 5 days.