Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1375

Jest test segfaults when closing Realm on Node 12

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • Q4-22FY
    • Affects Version/s: None
    • Component/s: None
    • None

      Our Jest test segfaults when closing the Realm when running on Node 12 in certain conditions (specifically, it seems like a timing issue which can be triggered by running `npm install` before running the tests). This started happening since https://github.com/realm/realm-core/pull/4892.

      It seems that the Node environment is possibly being torn down before the Realm is fully closed. See referenced doc for investigation notes.

      We have worked around this in https://github.com/realm/realm-js/pull/4025 by calling `setTimeout` with a timeout of 0 at the end of the test. We are assuming that this is an edge case caused by a very specific timing issue on a specific Node version (which will end LTS in May 2022), rather than a real issue in the code, but it may warrant further investigation if we see other possibly related issues.

            Assignee:
            Unassigned Unassigned
            Reporter:
            tom.duncalf@mongodb.com Tom Duncalf (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: