Process-associated record lock
A process-associated record lock is a byte-range file lock whose ownership is attached to a process rather than to an open file description.
On Linux, closing any descriptor for the file in the owning process releases that process's traditional record locks on it. A read-only descriptor or a hard-link alias can trigger this while the original holder remains open. Hesela's six-case local experiment contrasts these closes with flock. [1] [2]
A separate 224-case SQLite experiment on Linux with the unix VFS connects that ownership rule to acknowledged history. In 16 selected executions using TRUNCATE or PERSIST journaling, a raw same-process close admitted a competing writer; both COMMIT calls succeeded but its acknowledged value later vanished. All final integrity checks returned ok. The recorded builds are distribution 3.45.1 and source-verified 3.54.1, not a production sample. [5]
This is documented library-bypass misuse, not supported concurrent-write behavior. Managed connections and the tested WAL cases preserved exclusion; neither proves arbitrary raw closes or live-file copies safe. A structural checker cannot replace an application-history oracle. [4] [5]
Relations
Limitations
- Threads in one process share ownership; this lock class cannot provide exclusion between those threads. [1]
- Advisory locking requires compatible participation and does not establish durability. [1]
Citations
- Linux man-pages 6.19: fcntl_locking(2), process-associated locks
- Hesela: six-case descriptor-close observation, controls and source SHA-256
- SQLite: How To Corrupt An SQLite Database File, section 2.2
- Hesela: 224 controlled SQLite raw-close observations, derived summary and build scope