title: SQLiteException in WorkManager's ForceStopRunnable
body: <p>I'm using <code>android.arch.work:work-runtime-ktx:1.0.1-rc1</code> and receiving many SQLiteException which I cannot reproduce.</p>
  
  <p>The exception:</p>
  
  <pre><code>android.database.sqlite.SQLiteException: 
    at android.database.sqlite.SQLiteConnection.nativeOpen (Native Method)
    at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:209)
    at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:193)
    at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:463)
    at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:185)
    at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:177)
    at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:808)
    at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:793)
    at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:696)
    at android.app.ContextImpl.openOrCreateDatabase (ContextImpl.java:652)
    at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:289)
    at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:223)
    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:163)
    at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase (FrameworkSQLiteOpenHelper.java:92)
    at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase (FrameworkSQLiteOpenHelper.java:53)
    at androidx.room.RoomDatabase.endTransaction (RoomDatabase.java:340)
    at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:107)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
    at java.lang.Thread.run (Thread.java:761)
  </code></pre>
  
  <p>Scheduling workers like that: </p>
  
  <pre><code>inline fun &lt;reified T : Worker&gt; schedule(interval: Long,
                                               units: TimeUnit,
                                               tag: String,
                                               networkConstraint: NetworkType? = null) {
              WorkManager.getInstance().apply {
                  if (getWorkInfosByTag(tag).get()
                                  .all { it.state == WorkInfo.State.CANCELLED || it.state == WorkInfo.State.FAILED }) {
                      // Cancel job by tag if the job already scheduled
                      cancelAllWorkByTag(tag)
  
                      // Create job and set tag
                      val job = PeriodicWorkRequestBuilder&lt;T&gt;(interval, units).addTag(tag)
  
                      // Set constraint if networkConstraint != null
                      networkConstraint?.let {
                          val constraints = Constraints.Builder()
                                  .setRequiredNetworkType(networkConstraint)
                                  .build()
  
                          job.setConstraints(constraints)
                      }
  
                      // Enqueue periodic job if no previous job with same tag is scheduled.
                      enqueueUniquePeriodicWork(
                              tag,
                              ExistingPeriodicWorkPolicy.KEEP,
                              job.build())
                  }
              }
      }
  </code></pre>
  
  <p>If it is important, the scheduling of one of the workers is performed once in <code>Application#onCreate()</code> and another worker is scheduled later on after user interactions.</p>
  
  <p>The workers themselves look like this:</p>
  
  <pre><code>internal class SiloWorker(context: Context, params: WorkerParameters)
      : Worker(context, params) {
      override fun doWork(): Result {
          if (isAppInBackground)
              return Result.success()
  
          doIntenseDatabaseAndNetworkIOOperations()
  
          return Result.success()
      }
  }
  </code></pre>
  
  <p>and are scheduled to run every 15 minutes.</p>
  
  <p>Another strange thing is that I receive these exceptions only on "Android Vitals" tab of Google Play Console, but I found none of them in Firebase crashlytics.</p>
  
  <p>I don't know whether these SQLiteExceptions occur in foreground or in background and there are many devices with different Android versions that are affected by this exception.</p>
  
  <p>What are possible reasons of this behaviour and how can I fix it?</p>