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

do not require same sync context for compilation #331

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

AndreiSingeorzan
Copy link
Collaborator

The deadlock is caused by:

  1. Thread A uses the model item in whatever way, so it locks it
  2. There's a Task.Run with VisualBasicDesignerHelper.CreatePrecompiledValueAsync().Result in WorkflowDesigner => Thread B
  3. Thread B will eventually do FindVariable, which enumerates the model item, so tries to lock again => DEADLOCK

This PR will be followed by another PR in WorkflowDesigner, which does not use Task.Run anymore, for this compilation, so the flow will be:

  1. Thread A locks the model item
  2. Thread A does VisualBasicDesignerHelper.CreatePrecompiledValueAsync().Result
  3. Thread A does FindVariable (it will be able to recursively acquire the lock)
  4. Thread A does await GetAllDiagnosticsAsync(), which needs ConfigureAwait(false) (as the thread will be blocked at the earlier .Result now)

https://uipath.atlassian.net/browse/STUD-70986

@aoltean16 aoltean16 requested a review from andreeadumitru July 16, 2024 08:35
@aoltean16 aoltean16 merged commit a6959ad into develop Jul 16, 2024
2 checks passed
@aoltean16 aoltean16 deleted the fix/adv_expr_editor_deadlock branch July 16, 2024 08:35
Copy link

github-actions bot commented Aug 4, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2024
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 this pull request may close these issues.

4 participants