Skip to content
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

Fix hanging pointers #1158 #1162

Merged
merged 2 commits into from
Dec 9, 2021
Merged

Fix hanging pointers #1158 #1162

merged 2 commits into from
Dec 9, 2021

Conversation

sergeyboyko0791
Copy link

  • Add SharedRc and WeakRc that can be used to debug hanging pointers
  • Move MmCtx::stop to MmArc::stop
  • Replace Arc<MmCtx> with SharedRc<MmCtx>

To run mm2 with pointer tracker, run

cargo build --feature track-ctx-pointer

We also can add a test that checks if all MmArc pointers are released in 30s.

* Add 'SharedRc' and 'WeakRc' that can be used to debug hanging pointers
* Move 'MmCtx::stop' to 'MmArc::stop'
* Replace 'Arc<MmCtx>' with 'SharedRc<MmCtx>'
@sergeyboyko0791
Copy link
Author

@SirSevenG could you please check if you can log in to the same account in 30s?

@artemii235
Copy link
Member

@sergeyboyko0791 "Test MM2" stage failed on CI. Please run tests before opening the PR and track the status afterward to ensure that CI build passed successfully.

@sergeyboyko0791 sergeyboyko0791 changed the title Fix hanging pointers Fix hanging pointers #1158 Dec 7, 2021
Copy link

@SirSevenG SirSevenG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used latest build from here http://195.201.0.6/fix-hanging-pointers/ and add-logout-to-top-menu branch of air dex.

Tested cases:

  1. Switch to and fro 2 different wallets in lees than 30s - failed, database error.
  2. Switch between 2 wallets with the same seed - failed, database error.
  3. Switch to and fro 2 different wallets in 60+ s - worked correctle with no issues.

While 1 and 2 are expected, 3 proves that pointers issue should be fixed now.

Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@artemii235 artemii235 merged commit 6bafa9f into dev Dec 9, 2021
@artemii235 artemii235 deleted the fix-hanging-pointers branch December 9, 2021 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[wasm/bug] Handle error when trying to open already opened database
3 participants