Skip to content

Do Not Use Lock File #1140

Open
Open
@belugabehr

Description

@belugabehr

Describe the bug
The SQLiteJDBCLoader class uses a "lock file" to determine when a process is using a SQLite binary library file. The lock file is unreliable, it may leak the lock file, and therefore may allow many instances of the SQLite binary library files to accumulate in the /tmp directory.

Deletion will be attempted only for normal termination of the virtual machine, as defined by the Java Language Specification.

Note: this method should not be used for file-locking, as the resulting protocol cannot be made to work reliably. The FileLock facility should be used instead.

https://docs.oracle.com/javase/8/docs/api/java/io/File.html#deleteOnExit--

Expected behavior
Unused copies of the SQLite binary files are cleaned up reliably.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions