Uploaded image for project: 'Support'
  1. Support
  2. SUPPORT-84

file locking and semaphore issues

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: SoftHSM 2.x develop
    • Fix Version/s: None
    • Component/s: PKCS#11 Interface
    • Labels:
      None
    • Environment:

      SoftHSM v2 (lib/common and lib/object_store)

      Description

      Many things should be fixed or improved about file locking and semaphores:

      • use different methods to remove files or directories
      • replace the buggy semaphore usage (IPC trigger) by file / directory last changes and generation numbers (I suggest an unsigned long at the beginning of object files)
      • use flock in place of fcntl lock when available
      • store() before commitTransaction (cf the comment...)
      • use a different file for transaction locking (I suggest <uuid>.lock in parallel to the current <uuid>.object) and of course use an exclusive (aka write) lock...
        BTW try to fix the multithreading issue...

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rickard Rickard Bellgrim
              Reporter:
              fdupont Francis Dupont
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: