Hi Charles,
I have a BaseX database with a pin-* file in its directory, reporting as locked and unavailable. However, OS-level tools such as fuser report that no programs have open file handles for any processes in this directory.
pin files have been introduced just recently to avoid that databases are simultaneously updated by several clients, using several JVMs [1]. If a pin file remains in a database directory, it seems this database has not been properly closed.
Currently, there is no mechanism yet to detect orphaned pin files, as the first tests I did with channel().lock() etc. haven't been that successful, or too slow.
Christian