Race in IndexedDB deleteDatabase

Confirmed Issue #11335118 • Assigned to Ali A.

Details

Author
Jacob T.
Created
Mar 20, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
  • Internet Explorer
Reports
Reported by 2 people

Sign in to watch or report this issue.

Steps to reproduce

There appears to be a race between deleting a database and calling the success callback of the request. It is possible for the onsuccess callback to be invoked before the database is actually deleted. Then if we immediately create a new connection, we will connect to the old database. This causes the onupgradeneeded event to not be called and the old data to sometimes be visible.

This race is extremely flaky and happens less than 1% of the time. Also, if you run the tests a bunch, shortly they will start consistently passing. So if the tests start passing, you will need to wait 30 minutes or more before running the tests again.

Creating a consistent repro is difficult. We seem to get better repro using our selenium network, but here is a way to run our tests locally.

Tests: https://goo.gl/LhzPpC
Code under test: https://goo.gl/2MitBp

The error in this is in the beforeEach block, we delete any old data and then create a new connection. Sometimes this connection is created without getting the onupgradeneeded event.

Steps to Run Tests

Requirements: Git, Python 2.7, node/npm

  1. git clone https://github.com/google/shaka-player
  2. cd shaka-player
  3. git checkout 55b8ef4
  4. python build/test.py --no-build --quarantined --specFilter=DBEngine.* --browsers Edge

This will only run 6 tests. To make the tests run more times, you can edit test/offline/db_engine_unit.js and just put a for loop over the whole file.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Ali A.”

      Changed Status to “Confirmed”

    • Thank you for filing this bug Jacob! I wasn’t able to repro the issue, but based on your explanation, I think that just means it’s unlikely and not impossible! Would you by any chance be able to provide a reduced test case that repros the issue that we can use to investigate the problem?

    • Unfortunately not. I tried to create a consistent repro, but was unable to.

      I noticed that this happened when running on our Selenium grid, but not often when run locally. So it may have something to do with the way Selenium is launching Edge.

    You need to sign in to your Microsoft account to add a comment.

    Sign in