Mismatched locking protocols?
Section 2.3 of the SQLite FAQ on corruption seems like a likely candidate:
2.3 Two processes using different locking protocols
The default locking mechanism used by SQLite on unix platforms is
POSIX advisory locking, but there are other options. By selecting an
alternative sqlite3_vfs using the sqlite3_open_v2() interface [...].
...
It is important that all connections to the same database file use the same locking protocol. [...] ... possibly leading to database corruption..
In your position I'd run the mystery "3rd party software" under strace
or (more detailed) ltrace
to see what it was doing in detail if I couldn't get the info I needed from detailed SQLite logging.
Unsafe file manipulation
Another possibility is that the 3rd party app is being "clever" and doing some kind of copy, update, swap trick that's safe for normal files but guarantees serious corruption of an open database. Again, you'll be able to see this in strace
output. Be prepared to do some learning in the process of analysing the strace output, though...
Mismatched versions
If the 3rd party app embeds a different SQLite database engine version you might be seeing issues caused by mismatched versions. See in particular the FAQ entry on 3.7.0 vs 3.6.x:
7.5 Corruption following alternating writes from 3.6 and 3.7.