• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #416 (closed defect: fixed)

Opened 2 years ago

Last modified 10 months ago

Race condition on `ServiceFactory.setUmask()`

Reported by: jmoore Owned by: jmoore
Priority: critical Milestone: 3.0-Beta3
Component: Services Version: 3.0-M3
Keywords: Cc:

Description

To set a umask for a particular call, one calls ServiceFactory.setUmask(Permissions). However, between calling SF.setUmask() and service.someMethod() another thread might reset the umask.

  • Document the need for synchronization, or
  • Change the method to ServiceFactory.setUmask( ServiceInterface, Permissions ) and handle the synchronization internally.

Change History

Changed 2 years ago by jmoore

  • milestone changed from Unscheduled to 3.0-M4

Another option would be to use a PrincipalHolder rather than a Principal so that the threads don't compete.

It may also be necessary that new ServiceFactory() NOT return a static instance for similar reasons.

Changed 2 years ago by jmoore

Should also provide a ServiceFactory.getUmask() method so that something of the form:

  Permissions oldPermissions = sf.getUmask();
  try {
      sf.setUmask(newPermissions);
      // do something
  } finally {
      if (sf!=null) sf.setUmask(oldPermissions);
  }

can be done.

Changed 19 months ago by jmoore

  • milestone changed from 3.0-Beta2 to 3.0-Beta3

This needs the new session management code: proposals/SessionsAndMessages

Changed 10 months ago by jmoore

  • status changed from new to closed
  • resolution set to fixed

Merged into #864.

Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/