8000 EncryptionKeyCheck test failure on exfat · Issue #7156 · realm/realm-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
EncryptionKeyCheck test failure on exfat #7156
Closed
@kiburtse

Description

@kiburtse

Expected results

Test pass

Actual Results

test_shared.cpp:2213: ERROR in Shared_EncryptionKeyCheck_3: Unhandled exception after line 2213 realm::InvalidDatabase: Failed to open Realm file at path '...': Realm file decryption failed (Decryption failed)

Steps & Code to Reproduce

Reproduces somewhat often when relevant tests run on exfat fs:

UNITTEST_KEEP_FILES=1 UNITTEST_FILTER=*_EncryptionKey* ./test/realm-tests.app/Contents/MacOS/realm-tests /Volumes/exfat/

CI run with logs but there is nothing other than logged exception

With added logs and additional checks it can be seen where it fails (one such example):

Thread[2]: /Users/user/r/core/test/test_shared.cpp:2197: ERROR in Shared_EncryptionKeyCheck: CHECK_NOTHROW(db = DB::create(path, false, DBOptions(crypt_key(true)))) failed: Did throw realm::InvalidDatabase: Failed to open Realm file at path '/Volumes/SD8/tmp/Shared_EncryptionKeyCheck.1.path.realm': Realm file decryption failed (Decryption failed: 'refresh_page failed: 18, 0, , 16384, 0, 24')                     
Thread[2]: /Users/user/r/core/test/test_shared.cpp:2198: ERROR in Shared_EncryptionKeyCheck: CHECK(db) failed
Thread[2]: /Users/user/r/core/test/test_shared.cpp:2200: ERROR in Shared_EncryptionKeyCheck: CHECK_NOTHROW(db = DB::create(path, false, DBOptions(crypt_key(true)))) failed: Did throw realm::InvalidDatabase: Failed to open Realm file at path '/Volumes/SD8/tmp/Shared_EncryptionKeyCheck.1.path.realm': Realm file decryption failed (Decryption failed: 'refresh_page failed: 8, 0, , 16384, 0, 24')                      
Thread[2]: /Users/user/r/core/test/test_shared.cpp:2201: ERROR in Shared_EncryptionKeyCheck: CHECK(db) failed
FAILURE: 1 out of 3 tests failed (4 out of 15 checks failed).
Test time: 132.56ms
Note: 1576 tests were excluded!

Top 3 time usage:
-------------------------------------
Shared_EncryptionKeyCheck    132.48ms
Shared_EncryptionKeyCheck_3   18.28ms
Shared_EncryptionKeyCheck_2   18.28ms

All three relevant test should run concurrently to trigger the issue from what i can tell. Resulting realm files will be invalid and can't be read after such failure: realm-trawler will report the same DecryptionFailed error. I suspect it's the same type of issue as here #6959 since encrypted mapping also uses file uids.

Core version

Core version: 13.23.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0