-
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)
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...
- relates to
-
SOFTHSM-37 Re-design file storage for compatibility and scalability
-
- Closed
-