Cache writer thread is not started for security database.
SInce fb3, any database could be used as security database (for itself, for example) therefore engine check user name (passed on attachment request) in current database. This check used special short-lived attachment with isc_dpb_sec_attach specified. Therefore engine marks corresponding database as security database (in memory of course).
The fix is to move this mark from database (DBB_security_db) to the attachment level (ATT_security_db) and make correcponding adjustments.