[go: up one dir, main page]

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

Deadlock when calling App::current_user from an App listener #7670

Closed
kraenhansen opened this issue May 2, 2024 · 1 comment · Fixed by #7671
Closed

Deadlock when calling App::current_user from an App listener #7670

kraenhansen opened this issue May 2, 2024 · 1 comment · Fixed by #7671
Assignees

Comments

@kraenhansen
Copy link
Member

Expected results

Absence of deadlocks.

Actual Results

Process locks up waiting for m_user_mutex on

util::CheckedLockGuard lock(m_user_mutex);
when the current_user is accessed from an "app listener callback".

Very similar to #7183 (except this was for User).

Steps & Code to Reproduce

The following JS code reproduce the issue:

import Realm from "realm";

const app = Realm.App.get("realmjstestapp-jjhtf");
const credentials = Realm.Credentials.anonymous(false);

setInterval(() => {
    console.log("Still alive");
}, 1000);

app.addListener(() => {
    console.log("Current user is", app.currentUser);
});

await app.logIn(credentials);

Core version

Core version: 8f96615 (most likely caused by #7300)

Copy link
sync-by-unito bot commented May 2, 2024

➤ PM Bot commented:

Jira ticket: RCORE-2112

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants