Should be noticed, the semantics of SQLite behavior in multithreaded mode is pretty cryptic, even to its long-term users (and others just silently give up, and hand-roll coarse-grained locks, I suspect):
http://sqlite.1065341.n5.nabble.com/think-I-need-better-erro...