microsoft / microsoft/Forge

Action Responses not persisted in ForgeState when two parallel actions complete their execution at the same time intermittently

Open
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
Dominant language
C#
Stars
334
Forks
61
PR merge metrics
No merged PRs in 30d

Description

We are noticing an intermittent issue where we have two actions within the same node and whenever the two actions finish their execution at the exact same time, the action response is not getting persisted in the forge state and our schema failures at GetOutput with exception System.NullReferenceException:Object reference not set to an instance of an object

Upon retry the issue goes away..

Here is the first attempt where it failed.

2024-05-20 10:01:08.5802526 The Action response for action : ********* is {"StatusCode":1,"Status":"True","Output":""}
2024-05-20 10:01:08.5802528 The Action response for action : ******** is {"StatusCode":1,"Status":"True","Output":"
"}

Next attempt where it passed

2024-05-20 10:01:58.3472478 The Action response for action : ***** is {"StatusCode":1,"Status":"True","Output":""}
2024-05-20 10:01:58.4162777 The Action response for action : ***** is {"StatusCode":1,"Status":"True","Output":"
"}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the case with two actions in one node completing simultaneously, then trace how their responses are persisted in ForgeState before GetOutput. Done means both action responses remain available in ForgeState and the schema no longer fails with a NullReferenceException; add regression coverage if the existing test structure is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.