akkadotnet / akka.net

Canonical actor model implementation for .NET with local + distributed actors in C# and F#.
http://getakka.net
Other
4.7k stars 1.04k forks source link

ActorSystem.Create() hangs when debug from VS 2019 #4605

Closed xheox closed 3 years ago

xheox commented 3 years ago

Hi, I am on VS2019. I know this is not an AKKA.NET bug because I can see it work on another machine just fine. So I am posting here to just have more ideas how to fix this

I wanted to test the SimpleCluster (https://github.com/akkadotnet/akka.net/blob/dev/src/examples/Cluster/Samples.Cluster.Simple/Program.cs ) demo so I ran it locally without any modifications. (Just cloned the source and set it as startup project) The creation of the ActorSystem just hangs there with no object returned. var system = ActorSystem.Create("ClusterSystem", config);

The weird part is I tried to just run the project isolated with nuget packages, (Akka 1.4.1 and upgraded the project to net 4.7) Compiles , hits the breakpoint (ActorSystem.Create()) and nothing beyond that. When I just execute the built .exe from command prompt it just works (and I see all events logged to the console). I updated VS to 16.7.7 : nothing cleared all VS cache and user data : nothing When I take the same project and run it on another machine within VS, It just works. I deactivated antivirus, firewall, Vpn, docker ... just to see what would cause such behavior. I still have no clue. This is my second day. I don't want to just flush my PC and reinstall everything from scratch just because of this. Is there anything else I could do to investigate?

I tried debug step by step, the problem happens in TerminationCallbacks.TerminationCallbacks() :

upStreamTerminated.ContinueWith(_ => { _terminationTask = _atomicRef.GetAndSet(null); _terminationTask.Start(); });

Thanks

Aaronontheweb commented 3 years ago

@Arkatufus think you can try to replicate this?

xheox commented 3 years ago

Thanks @Aaronontheweb for the quick reaction. I also have a question but I don't know where to post it. I figured I might just post it here since I got the attention of the founder of Petabridge. I am looking at both Akka (java/scala) and akka.net because for some projects code is Java (and I am a .net guy at heart), I was wondering if you guys have a link that explains what are the differences between both, I know akka.net is a port of the java one but there seem to be more tooling in Java world.

Aaronontheweb commented 3 years ago

@xheox the biggest difference between Akka.NET and the original Akka project is that we're behind in terms of feature parity. Don't have any typed actors yet, Akka.HTTP, and some other features. There's probably others but that's the most "broad strokes" comparison I think I should make.

On the business side, getting professional support / consulting from us is likely a lot cheaper than Lightbend though.

xheox commented 3 years ago

I don't doubt it. Lightbend grew huge these last years and have big customer base. I was actually looking for the Akka.Http and that's why I asked. :)
I will be glad of offer to help, if you guys need more hands. Now back to my issue, I can offer a remote access to you guys to just check it. Because honestly, I don't know how to reproduce it. It might be because any of the software I have installed. I planned a full cleanup of my laptop for this weekend, if the problem persists. May be, this is sign I should do it. :) Also one last curiosity, completely unrelated, on the Proto.Actor website "Proto.Actor was created by Roger Johansson, the original creator of Akka.NET." Weird that I did not see him on the list of the Petabridge team or Akka.net member list. Is his claim true? what do you guys think about Proto.Actor? I know Akka.net uses grpc underneath so to me Proto.Actor using brotobuff is not a selling point. Last but not least, kudos for the youtube videos. Big help 👍

Aaronontheweb commented 3 years ago

I was actually looking for the Akka.Http and that's why I asked. :) I will be glad of offer to help, if you guys need more hands.

Absolutely make sure you join the main Gitter room: https://gitter.im/akkadotnet/akka.net and follow us on Twitter: https://twitter.com/akkadotnet - we're going to be publishing our roadmap for the next ~2 years soon and hosting a public meeting in two weeks, so there will be ample opportunity to contribute then. If you are in either of those channels you'll catch the update.

I planned a full cleanup of my laptop for this weekend, if the problem persists. May be, this is sign I should do it. :)

Please let us know if that helped.

Also one last curiosity, completely unrelated, on the Proto.Actor website "Proto.Actor was created by Roger Johansson, the original creator of Akka.NET." Weird that I did not see him on the list of the Petabridge team or Akka.net member list. Is his claim true? what do you guys think about Proto.Actor?

Roger is not the "original creator of Akka.NET" - it's been a group effort since the beginning. We each had separate efforts to port Akka to .NET and combined those efforts together in February 2014: https://petabridge.com/blog/akkadotnet-one-year-later/ - a detailed history of the early days of Akka.NET.

He stopped contributing to the project four years ago, had a difference of opinion with us, and went his own way. Proto.Actor is his own project and I don't really have an opinion on it - I'm glad that .NET developers have multiple actor framework options to choose from - that was definitely not the case when I needed an actor framework to build our business applications back in 2013.

Last but not least, kudos for the youtube videos. Big help

Happy to help - hope I get a chance to make some more of them this year. I've not been as active much in the marketing / content / technical writing department lately due to a lot of the work we've had going on behind the scenes at Petabridge (i.e. https://sdkbin.com/) - but I enjoy making them.

xheox commented 3 years ago

Sorry forgot to update on this. I formatted my laptop and installed everything from scratch, and the issue is gone but I am still scratching my head as for the reasons it occurred. Now, I guess there is no way to reproduce it. (at least for me) I will join the Gitter room then and will take it from there.
Yes true, we now have the choice: akka.net, orleans (even orleankka), protoAcor, Service Fabric ...

Aaronontheweb commented 3 years ago

@xheox so can I close this issue then?

xheox commented 3 years ago

Yes Sir