Comments (13)
Could this also cause my locks to never be entered anymore? Worked with 1.1.2 .
var entityLock = new EntityInstanceId("SomeLock", somekey);
await using (await context.Entities.LockEntitiesAsync(entityLock))
{
...
}
from durabletask-dotnet.
I'm also facing the same issue.
Another way to reproduce it, would be to take the sample project in this repo "AzureFunctionsApp" and add the following lines to the "Greetings" function as below:
Here the relevant code for easy copy paste:
ILogger logger = context.CreateReplaySafeLogger("LogCategory");
var entityId = new EntityInstanceId(nameof(Counter), "MyCounter1");
await context.Entities.CallEntityAsync(entityId, nameof(Counter.Add), 1);
int count = await context.Entities.CallEntityAsync<int>(entityId, nameof(Counter.Get));
logger.LogInformation("Current count: {count}", count);
This is the exception I get after updating to 1.1.3
[2024-05-27T06:09:08.898Z] TaskEntityDispatcher-77616bd5b75544688820d8e5bd31621d-0: Unhandled exception with work item '@counter@MyCounter1': DurableTask.Core.Exceptions.EntitySchedulerException: The entity with instanceId '@counter@MyCounter1' received an unexpected event type of type 'OrchestratorStarted'. This is not a valid entity message. This is a framework-internal error, please report this issue in the GitHub repo: 'https://github.com/Azure/durabletask/'
[2024-05-27T06:09:08.906Z] at DurableTask.Core.TaskEntityDispatcher.DetermineWork(OrchestrationRuntimeState runtimeState, SchedulerState& schedulerState, Work& batch) in /_/src/DurableTask.Core/TaskEntityDispatcher.cs:line 568
[2024-05-27T06:09:08.909Z] at DurableTask.Core.TaskEntityDispatcher.OnProcessWorkItemAsync(TaskOrchestrationWorkItem workItem) in /_/src/DurableTask.Core/TaskEntityDispatcher.cs:line 241
[2024-05-27T06:09:08.913Z] at DurableTask.Core.TaskEntityDispatcher.OnProcessWorkItemAsync(TaskOrchestrationWorkItem workItem)
[2024-05-27T06:09:08.921Z] at DurableTask.Core.TaskEntityDispatcher.OnProcessWorkItemSessionAsync(TaskOrchestrationWorkItem workItem) in /_/src/DurableTask.Core/TaskEntityDispatcher.cs:line 122
[2024-05-27T06:09:08.922Z] at DurableTask.Core.WorkItemDispatcher`1.ProcessWorkItemAsync(WorkItemDispatcherContext context, Object workItemObj) in /_/src/DurableTask.Core/WorkItemDispatcher.cs:line 373
[2024-05-27T06:09:08.924Z]
[2024-05-27T06:09:08.924Z] Backing off for 10 seconds until 5 successful operations
[2024-05-27T06:09:08.925Z] DurableTask.Core: The entity with instanceId '@counter@MyCounter1' received an unexpected event type of type 'OrchestratorStarted'. This is not a valid entity message. This is a framework-internal error, please report this issue in the GitHub repo: 'https://github.com/Azure/durabletask/'.
from durabletask-dotnet.
We just made a hotfix release: https://github.com/microsoft/durabletask-dotnet/releases/tag/v1.2.4. Is this issue persisting for you all with this release?
cc/ @nytian
from durabletask-dotnet.
We just made a hotfix release: https://github.com/microsoft/durabletask-dotnet/releases/tag/v1.2.4. Is this issue persisting for you all with this release?
cc/ @nytian
@davidmrdavid
Confirmed resolved for me.
from durabletask-dotnet.
@netsharpdev, @th3ragex: do y'all have minimal repros you could share?
@netsharpdev: I looked at your repro but it seemed a bit complex, so I'm curious if there's a more minimal version of it that demonstrates the problem. I'm not able to reproduce this with a "hello world"-level entity app
from durabletask-dotnet.
@davidmrdavid Sure, minimal repo with LockEntitiesAsync demo: https://github.com/th3ragex/durabletask-dotnet-bug-315 (Currently with 1.1.2 which works, after update to 1.1.3 and a proper rebuild it's stuck)
from durabletask-dotnet.
@th3ragex: Thanks. Strangely, your repro worked for me again after upgrade to 1.1.3
. It could be something on my machine though - so let me try to engage some other crew members. @bachuv does the repro linked above, after changing the .NET isolated extension to 1.1.3, work for you, or does it get stuck?
from durabletask-dotnet.
@davidmrdavid, I tried the repro and it also worked for me after upgrading the .NET isolated extension version to 1.1.3.
from durabletask-dotnet.
Thanks for confirming. @th3ragex: When using 1.1.3 and a brand new taskhub name, does it still fail for you? Since it works for @bachuv and myself, I wonder if the reason for your lock's "stuckness" is that there's some actual deadlock in your storage account, not sure. A brand new task hub should help validate that theory.
from durabletask-dotnet.
@davidmrdavid thank for taking your time and testing
When using 1.1.3 and a brand new taskhub name, does it still fail for you?
yes, I have also tested with azurite local storage and a gen2 azure storage with new task hub names. I am testing locally with the VS debugger attached, didn't try how it behaves as deployed azure function. I have also updated my machine to the latest azure function host and VS version.
After playing with my sample code a bit I discovered that building the function after upgrading to the new nuget version occasionally didn't use the new assembly version. I have changed my code to return the loaded assembly version to make it clear.
Sorry to bother you, could you please update and try my repo again and double check that your test run actually used 1.1.3?
from durabletask-dotnet.
@davidmrdavid works for me too, thanks!
from durabletask-dotnet.
@davidmrdavid locking works now. Thank you!
from durabletask-dotnet.
Closing this issue as it is resolved in hotfix release durabletask-dotnet v1.2.4.
from durabletask-dotnet.
Related Issues (20)
- Roslyn Analyzer: System.TimeProvider
- Roslyn Analyzer: document how orchestrations are analyzed and the method probing is executed.
- The filter passed to _PurgeAllInstancesAsync(PurgeInstancesFilter filter, CancellationToken cancellation)_ on the DurableTaskClient, is not used, instead a new instance is created HOT 1
- Any documentation on how to build the project? HOT 1
- RaiseEventAsync with a given taskhubname is missing compared to in process HOT 4
- Investigate state sharing between different Roslyn analyzers
- RpcException - PurgeAllInstancesAsync operation was canceled - HttpClient.Timeout of 100 seconds elapsing HOT 6
- Improve environment variable analyzer to catch dotnet configuration APIs
- Keep getting "Error connecting to subchannel." errors when running on Azure HOT 1
- `CleanEntityStorageAsync()` does not clean entities (likely 'transient' ones)
- Roslyn Analyzer should detect calling non-existent functions (due to name mismatch)
- Roslyn Analyzer should alert against using a non-contextual logger
- Roslyn Analyzer must report System.DateTimeOffset.Now|UtcNow HOT 1
- Include HelpLinkUri in Roslyn analyzer diagnostics
- Roslyn Analyzer could suggest input parameter binding instead of ctx.GetInput<T>()
- PurgeAllInstancesAsync - Durable SQL Provider - Deletes only 1000 instances maximum HOT 2
- [Feature] Consider Adding API to DurableTaskClient for Fetching Task Hub Metadata
- TaskOrchestrationContext WaitForExternalEvent doesn't support overload without event data
- orchestration stuck in Running when waiting on external event with event sent HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from durabletask-dotnet.