Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #1855 (closed)

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

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)

NeoOfficeScreenSnapz001.png (26.2 KB) - added by jmoore 14 years ago.
Hourly graph of file descriptor counts over 5 days.

Download all attachments as: .zip

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

Hourly graph of file descriptor counts over 5 days.

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: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

comment:8 Changed 14 years ago by cneves

(In [6853]) No longer creating a new thumbnail store for each rendered thumb. see #1855.

comment:9 Changed 14 years ago by cneves

(In [7030]) Fix #2347 - No longer creating a new thumbnail store for each rendered thumb. see #1855.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.66199 sec.)

We're Hiring!