Comments (5)
➤ PM Bot commented:
Jira ticket: RCOCOA-2301
from realm-swift.
Are you ever deleting the Realm files? This could happen if you delete the file while it's open and then a new file is created at a different path and it happens to get the same inode number.
There also might be a race condition in InterprocessMutex when a file is reopened while in the process of being closed on another thread. The code appears to have correct locking but it's somewhat complicated and this could definitely happen if the locking is slightly wrong, so I'll review it to see if I can find anything.
from realm-swift.
We do delete Realm files on occasion, but it's quite rare (a few times per year), so I don't think it's the cause of this issue.
The second scenario you mentioned, opening a file that is in the process of being closed is very possible. We have a lot of code paths that open Realm files on different threads (i.e., user interaction, background tasks, and APNs). Most Realm interactions are wrapped in an autoreleasepool block which I imagine causes a lot of Realm file closes.
Looking at our code that handles Realm file management, it's certainly possible that a race condition exists on our end. Moving some of that code into an Actor to force synchronous access might be an option.
from realm-swift.
After looking more into the code producing the assertion failure my conclusion is that we can just delete it entirely as it was a solution to a problem that we have since solved in a much better way.
from realm-swift.
👍
Glad this issue led to the discovery of some unnecessary code, but I wonder if the fact it was being triggered at all means we should take a hard look at our Realm file access code.
from realm-swift.
Related Issues (20)
- Version 10.47.0 AppStore Connect issues: ITMS-91065: Missing signature HOT 11
- Database has an unsupported version (24) and cannot be upgraded. HOT 10
- 'RealmSwiftObject' is not a member type of struct 'RealmSwift.Realm' HOT 2
- Install statically via SPM HOT 17
- Symbol not found: (_objc_claimAutoreleasedReturnValue) HOT 2
- Realm doesn't build when using Swift on Linux HOT 3
- Realm doesn't build when using Swift on Windows HOT 3
- Partition based Sync not supported in new Apps HOT 5
- Update packaging for Xcode 15.4 HOT 4
- AsyncOpen progress does not reflect the bootstrap change sets HOT 2
- Opening Realm files of format version 23 is not supported by this version of Realm (10.25.2) HOT 5
- CocoaPods visionOS support HOT 1
- Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found HOT 10
- Crash on Notification Service Extension (RESOURCE_TYPE_MEMORY) HOT 5
- Crash on Exception "[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]" HOT 6
- Give ability to get notifications not with indexes only, but with keys HOT 2
- Not all notifications did come. HOT 3
- undefined symbol while running realm 10.46.0 HOT 1
- macOS: Realm Environment Injection Crashes Preview HOT 6
- Crash when using RealmSwift with multiple modules (ver 10.49.1) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realm-swift.