-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGSEGV when attempting to resume a Puased syncSession #6558
Comments
➤ PM Bot commented: Jira ticket: RJS-2762 |
@muddy-alex There is no API to force sync as the sync client works mostly autonomously. If it is possible, please share the stack trace. |
No stack trace, unfortunately. Pause/Resume seems to work before the initial sync has been completed. However, once it has (based on the This is all I get...
|
Could be related to realm/realm-core#7349? It is possible for you to downgrade? If it works with an earlier version (12.4.0 or older), it could be an indication for us. |
We were originally testing with |
Let me get this straight - initial sync is happening, but you have created some data offline and don't want to wait for initial sync to complete before that data gets uploaded, which is why you're pausing and resuming the session? As Kenneth said, even though this is likely not the intended flow, we shouldn't be crashing. But understanding the circumstances around the crash will allow us to repro it. |
We only have specific time windows on internet access, which is why we need some kind of 'force-sync' feature as we've found that the NodeJS Client doesn't seem to do any further synchronisation during the lifetime of the process (tested over 2 days). We've found that the initial sync seems to be restricted to 10MB upload, taking the short time window of internet access into account, we would like this 'force-sync' feature to keep pushing up the 10MB chunks until all offline data has been uploaded. |
Thanks for that context - I'll chat with our sync team and see what they say. |
Hey, so following that conversation, here's a few more questions.
|
@muddy-alex There is no way currently to force-sync the local data: we first download any data from the server, and then we start uploading the local data. Pausing and resuming the session does not change this behavior in any way. We could add a config option to change that though. If you only have asymmetric tables in the schema, then there is nothing to download so upload would start immediately. |
@kneth I can replicate the SIGSEGV here...
|
@danieltabacaru it was the documentation here that lead me to believe that this might be possible |
@nirinchev When I mention to 'initial sync', I am referring to when Realm uploads offline data for the first time the process starts. Based on my reproduction above, when you see
We've found that when this initial sync runs, only a chunk (I can't remember why I assumed it was 10MB) is uploaded - rather than all of the offline data. This meant that we had to restart the process a few times before all data was pushed up to AppSync, hence the reason we are looking for a 'force-sync' solution. |
@muddy-alex I believe the documentation is correct. Forcing sync in that context is forcing connecting to the server, but the behavior is as I described it. I wrote a similar test and I see no issues with it. I cannot see where class Point is declared in your example. The one you have there looks like a schema. Maybe @kneth can have a look. |
Is there any code following the resume? Maybe something is not cleaned-up properly. You can try to wait for upload completion. |
@danieltabacaru Nothing follows the |
@muddy-alex You are mixing class-based models ( |
I couldn't find a documented way of using Embedded objects with the Class syntax. Updating the above example to just use JS schemas still results in the SIGSEGV. |
@muddy-alex Thank you to getting back. I'll bring up the issue at the next team meeting. |
How frequently does the bug occur?
Always
Description
I'm trying to force Realm to perform a sync of all offline changes (it's an asymmetric table).
According to the documentation, we should be able to call
realm.syncSession.pause()
andrealm.syncSession.resume()
to perform this operation, however, when callingresume()
a SIGSEGV error is thrown.Is this the correct way to force Realm to perform a sync with AppSync?
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
12.6.2
What services are you using?
Both Atlas Device Sync and Atlas App Services
Are you using encryption?
No
Platform OS and version(s)
OSX/Linux
Build environment
NodeJS
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: