r/Protos • u/guillermoamolina • 4d ago
Debugging a rare actor termination race in Protos, a programming language built on GraalVM and Truffle
One of the most interesting challenges in implementing an actor-based programming language is ensuring that suspended computations are correctly released when an actor terminates.
Protos, an experimental prototype-based language built on GraalVM and Truffle, recently encountered an intermittent initialization failure during parallel testing.
Instead of increasing timeouts or reducing concurrency, we created a controlled regression that reproduced the underlying scheduler race.
Two cleanup ordering issues were corrected using the existing runtime infrastructure.
- No new production Java classes.
- No additional scheduling mechanisms.
- No changes to the execution hot path.
- 145 focused tests passed, followed by the complete local test suite.
For developers working with Erlang, Elixir, Pony, Smalltalk, GraalPy or other Truffle languages: how do your runtimes handle termination while an initialization continuation is suspended?
Source and technical details:
https://github.com/guillermomolina/protos/issues/1243