-
Notifications
You must be signed in to change notification settings - Fork 1k
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 deadlock when calling ActorSelection.ResolveOne from GUI context #2550
Fix deadlock when calling ActorSelection.ResolveOne from GUI context #2550
Conversation
Just adding this one ConfigureAwait fixes this specific case, but I went through and added it to the whole Akka lib (excluding a few contrib and tests). IMO this should be everywhere, and adding an await without ConfigureAwait should fail the build ... |
e96a3c8
to
43ee88c
Compare
Eh, I have set the test to skipped ... should hopefully become green now |
13db376
to
47b4164
Compare
@Aaronontheweb I rebased it on dev, and the current failure is which also fails in my other PR. I assume the CI is just slightly flaky? |
Not in this case. The |
@Danthar No, we have problems with Perf tests in all pull requests |
@alexvaluyskiy But nbench tests should be reported normally in TC right? In this case it times out on invoking the nbench runner itself. |
The failing part seems to be |
so the good news is I was able to reproduce the failure locally: the bad news is I was able to reproduce the failure locally :\ I have executed the failing command
twice, once for 3ae56ba (base) and once for 47b4164 (modified). The first, aborted run (47b4164 ) took 25 minutes, exactly the timeout from build.fsx. It got until The second run for (47b4164) finished between 9:11:42 PM and 9:37:36 PM, so it took about 26 minutes. The third run (3ae56ba) finished between 9:43:19 PM and 10:09:06 PM, so took about 26 minutes and would also have been canceled due to the timeout. So if I didn't mess up anything related to the build, I can't see any difference between dev and my changes. |
The passing test run from here: http://petabridge-ci.cloudapp.net/viewLog.html?buildId=22829&buildTypeId=AkkaNet_AkkaNetWindowsPerformanceTests&tab=buildLog#_state=7528&focus=14984 It ran between [21:48:53] and [22:13:20] , so took 24:27 minutes. So the timeout of 25 minutes is maybe slightly optimistic. Edit: after increasing the timeout, mono failed again but Akka.Tests.Performance.dll succeded in almost exactly 25 minutes. |
250366a
to
6678f41
Compare
@@ -3796,8 +3796,8 @@ namespace Akka.Pattern | |||
public Akka.Pattern.CircuitBreaker OnClose(System.Action callback) { } | |||
public Akka.Pattern.CircuitBreaker OnHalfOpen(System.Action callback) { } | |||
public Akka.Pattern.CircuitBreaker OnOpen(System.Action callback) { } | |||
public async System.Threading.Tasks.Task<T> WithCircuitBreaker<T>(System.Func<System.Threading.Tasks.Task<T>> body) { } | |||
public async System.Threading.Tasks.Task WithCircuitBreaker(System.Func<System.Threading.Tasks.Task> body) { } | |||
public System.Threading.Tasks.Task<T> WithCircuitBreaker<T>(System.Func<System.Threading.Tasks.Task<T>> body) { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @alexvaluyskiy I get that this is an API change, but would removing the async
keyword here result in a break for something that was await
-ing on this task? Or is this just goofery from the API printer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async is used as a function modifier to avoid breaking existing code that use await as a variable (and some other reasons). So basically backwards compat reason on a c# feature level.
Removing or adding it does not influence upstream dependencies at all as far as i know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @Danthar
@Aaronontheweb is it possible to compare two runs of nbench? This does touch a lot of places, so in theory i would need to check every performance spec. Thank you. |
@0x53A this looks good to me, but the do we need to add a license header / third party notice file for the Nito source code? cc @StephenCleary |
Just to be clear, the Nito source is only used in the unit test project. Regardless, credit should be given where credit is due. |
It's all MIT-licensed. No problems. |
thanks @0x53A - I'm satisfied and it sounds like @StephenCleary is too. Thanks for all of your hard work. I'll merge this in once CI runs. I checked the perf numbers and everything looked fine there. |
The first test passes, the second test blocks indefinitely (even though I passed a timeout!).
This is probably an issue with a missing
.ConfigureAwait(false)
.SynchronizationContextHelper
was copied from here: http://stackoverflow.com/questions/14087257/how-to-add-synchronization-context-to-async-test-method