Confusing error with invalid argument: DeterministicRunnerImpl.checkClosed

I have a load test workflow that exponentially creates child workflows (following the same patterns as the rabbit test in the Temporal blog). The parent workflow completes successfully, but has a stacktrace of the following.

3 INVALID_ARGUMENT: java.lang.Error: closed at
io.temporal.internal.sync.DeterministicRunnerImpl.checkClosed(DeterministicRunnerImpl.java:433) at 
io.temporal.internal.sync.DeterministicRunnerImpl.stackTrace(DeterministicRunnerImpl.java:418) at 
io.temporal.internal.sync.SyncWorkflow.query(SyncWorkflow.java:171) at 
io.temporal.internal.replay.ReplayWorkflowExecutor.query(ReplayWorkflowExecutor.java:137) at 
io.temporal.internal.replay.ReplayWorkflowRunTaskHandler.handleQueryWorkflowTask(ReplayWorkflowRunTaskHandler.java:256) at 
io.temporal.internal.replay.ReplayWorkflowTaskHandler.handleQueryOnlyWorkflowTask(ReplayWorkflowTaskHandler.java:257) at 
io.temporal.internal.replay.ReplayWorkflowTaskHandler.handleWorkflowTask(ReplayWorkflowTaskHandler.java:112) at 
io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.handle(WorkflowWorker.java:314) at 
io.temporal.internal.worker.WorkflowWorker$TaskHandlerImpl.handle(WorkflowWorker.java:280) at 
io.temporal.internal.worker.PollTaskExecutor.lambda$process$0(PollTaskExecutor.java:73) at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at 
java.base/java.lang.Thread.run(Thread.java:834)

Looking at the history, nothing jumps out at me, so I don’t know if this is an error I should care about. It sounds worrisome, and I don’t see anything in my worfklow code that is non-deterministic: scenario.kt · GitHub

edit: I’ve also included the history export in the gist.

This trace is from a “__stack_trace” query request. As stack trace is not meaningful for a closed workflow the request failed. So it is benign. I filed an issue to not log an exception in this case.