jemc changed the topic of #ponylang to: Welcome! Please check out our Code of Conduct => https://github.com/ponylang/ponyc/blob/master/CODE_OF_CONDUCT.md | Public IRC logs are available => http://irclog.whitequark.org/ponylang | Please consider participating in our mailing lists => https://pony.groups.io/g/pony
aturley has quit [Quit: aturley]
erip has quit [Remote host closed the connection]
erip has joined #ponylang
erip has quit [Remote host closed the connection]
acarrico has quit [Ping timeout: 245 seconds]
endformationage has quit [Quit: WeeChat 2.3]
srenatus has joined #ponylang
profetes has joined #ponylang
sheerluck has joined #ponylang
<profetes> hi Sean, I know there are no outboxes, so i put the word in quotes, I wanted to indicate that someone might have gotten message from such actor recently. I think GC should free LetterFilter after it run out of scope in https://github.com/plprofetes/advent_of_code/blob/master/2018/aoc5/lib/lib.pony#L591, because there's no explicit reference to it. LetterFilter is conceptually my unit of work.
<profetes> And "out of scope" I mean when those actors cease to work (indicated logically by promise `job` being fulfilled). All references to that list of 50k actors are inside that LetterFilter. The only remaining thing out of `be go(...)` are promisese: p (to collect results from all the letter filters) and job (that triggers another go() on being accepted https://github.com/plprofetes/advent_of_code/blob/master/2018/aoc5/lib/lib.pony#L
<profetes> 536)
<vaninwagen> profetes: what i can see by looking at your code, is that the Units, the LetterFilter and the ReactionWatcher are forming a pretty dense circle (referencing each other)
<vaninwagen> there is a lot going on in there
<profetes> true, but disjoint from one another. and they stop sending messages at some point. and hence I expect that those disjoint, "reacted", not active groups can be GCed
<vaninwagen> i didn't mean this as bad.
<vaninwagen> true, they should be
<profetes> I admit I complicated this on purpose :) I wanna test Pony before I can use it on my production - and data structures consisting of actors (like graphs) must be reliable.
<profetes> I just dont know how to debug that, so i know if it's a bug. If so - I can create more, more minimal case and file an issue. Can I debug GC some how? Can I force GC to free something?
<vaninwagen> you cannot force it to free something in particular afaik
<vaninwagen> be aware that each promise is also an actor
<profetes> okay, maybe can I access reference counters, used by ORCA, from Pony?
<vaninwagen> this i don't know tbh
<vaninwagen> it would be nice if we'd have some GC stats available
<vaninwagen> i think there are some dtrace probes around to help you see sth. slfritchie might know a little more about that
<profetes> Promises are my suspects for blocking GC. They should not be, because promise gets accepted and actor accepting it can go away - message is delivered to Promise and it will be consumed some time later. It's like acyclic graph. You cannot go back, so GC might be able to figure that out.
<profetes> There's rarely a situation when actor cooperating with other actors loose all the references to them. Rather - they stop to exchange messages. GCing actors is far more complex that GCing objects :)
<vaninwagen> indeed
<vaninwagen> damn, no dtrace for me :(
<profetes> Microsoft Orleans do that safely - they serialise actors in some DB and sweep actors out of active memory, freeing it. If anyone ever needs that actor again - it's restored from DB. In Pony one would never resurrect GCed actor, so it's *reasonable* to prevent actors from GCing as long as possible.
* vaninwagen is sadly using linux
<profetes> I'm in an even worse situation - Docker only here ;)
<vaninwagen> can you ensure, you have no ping-pong messaging around in your actor-circles?
<profetes> 99.8% since I can pass Result fully through only if all items in a list are stable. And then I do nothing. And list does nothing.
<vaninwagen> aye
<profetes> and when i just run part1() program ends normally, after passing Result has succeeded. No delay. If there was something lingering - I presume runtime would prevent program from exiting.
<profetes> And _final() for actors are called before the very end
<vaninwagen> the runtime is actually finalizing all actors on shutdown
<vaninwagen> at least that's how i read it
<vaninwagen> runtime is not my field at all :/
<profetes> Thanks for being helpful - look at that, just a few lines down: https://github.com/ponylang/ponyc/blob/master/src/libponyrt/gc/cycle.c#L745
<profetes> I wanna call that :) now I need a way to call that
<vaninwagen> you'd need to make that not static and then use ffi
<profetes> and have pony runtime in debug build
<profetes> another idea: since CPU is starved there may not be enough time for GC to find the cycles: https://github.com/ponylang/ponyc/blob/e26540ec7021977eb303686adc1ca79be43a6ddf/src/libponyrt/gc/cycle.c#L909
<profetes> because disjoint part if 50k+ actors is too big. Does that sound probable?
<vaninwagen> yeah, that could be
<profetes> but I might be reading that wrong, cycle detector is spawned every 10..1000ms, but it's lifetime is not limited. So it might create too many of them? And stress the runtime even more?
<profetes> I dont know, I'll wait for someone with more expertise in that matter. I'll try to extract minimal case in the evening for easier debugging.
<profetes> vaninwagen: thank you for your continuous support!
<vaninwagen> thanks for your stresstest :)
xcombelle has joined #ponylang
<xcombelle> hi
<vaninwagen> hi. what's up?
aturley has joined #ponylang
aturley has quit [Client Quit]
aturley has joined #ponylang
<xcombelle> still like pony actors
acarrico has joined #ponylang
<vaninwagen> yes, good ensemble
profetes has quit [Quit: Leaving]
sheerluck has quit [Quit: Leaving]
endformationage has joined #ponylang
acarrico has quit [Ping timeout: 246 seconds]
acarrico has joined #ponylang
profetes has joined #ponylang
profetes has quit [Quit: Leaving]
_andre has quit [Quit: leaving]
srenatus has quit [Quit: Connection closed for inactivity]
enilsen16 has quit [Ping timeout: 252 seconds]
enilsen16 has joined #ponylang
aturley has quit [Quit: aturley]
aturley has joined #ponylang
erip has joined #ponylang