Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: Unresolved Async Callback Keeps Execution Idly Running

未关闭
#734 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@zhongkechen 已经在做这个了。

开始于 2026年9月25日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
aws, java

调研方向

Start by tracing DurableFuture.anyOf(...), waitForCallbackAsync(...), and ExecutionManager.validateRunningThreads() using the two-callback reproduction. Add regression coverage showing that completing one callback does not leave the execution idly running, and that the losing branch cannot block teardown or the execution suspends until it resolves.

由索引模型根据 Issue 内容生成。

描述

bug pkg:sdk

Expected Behavior

DurableFuture.anyOf(cb1, cb2)with async callbacks should not block the overall execution from completing when the first callback settles, but the second does not. See reproduction example below.

Once one callback succeeds or fails, the other unresolved callback should not keep the Lambda invocation alive or gate the final workflow result. The execution should either complete or suspend itself until all callbacks resolve.

Actual Behavior

After one callback settles, but the other still pending, the Durable Execution is blocked from completing and continuously re-invokes itself until all branches settle.

In the callback repro, cb1 is completed, but the execution keeps re-invoking and timing out while teardown waits for the unresolved cb2 branch:

Waiting for operation to complete before shutting down: d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35

d4735e3a... is the losing branch operation ID. The workflow eventually succeeds only when the losing callback times out. If the losing branch has no timeout, the hang can be unbounded.

This is distinct from #707's original suspension bug.

Steps to Reproduce

  1. Deploy a durable handler that creates two unresolved callbacks and returns DurableFuture.anyOf(cb1, cb2).
  2. Complete only cb1.
  3. Observe that the execution does not complete promptly or suspend. It runs idly until invocation times out, re-invokes after some time, times out again, and repeats.
  4. Check Lambda logs and execution history.

Example repro shape:

var f1 = context.waitForCallbackAsync("cb1", String.class, callbackSubmitter, config);
var f2 = context.waitForCallbackAsync("cb2", String.class, callbackSubmitter, config);
return String.valueOf(DurableFuture.anyOf(f1, f2));
Screenshot

Note the repeated invocation timeouts/failures after the first callback resolves:
Image

Still Need to Confirm
  • Still need to confirm if the issue is unrelated to DurableFuture.anyOf()
  • It could be the case that any pending async callback in the background will prevent the execution from completing or suspending

Java Version

21

Is this a regression?

No

Additional Context

Local triage identified two distinct defects in the anyOf path:

  • Defect A: anyOf skipped the durable wait/deregister path and never suspended. This is tracked by #707 and addressed by PR #730.
  • Defect B: anyOf does not cancel or abandon the losing branch, so teardown waits for it in ExecutionManager.validateRunningThreads().

The fix should add regression coverage that asserts:

  1. A Durable Execution is not kept idly running when there is an unresolved async callback in the background
  2. The losing branch is cancelled, deregistered, or otherwise prevented from blocking teardown. Either that or the Durable Function is suspending until the callback resolves.
主要语言
Java
星标
28
派生
13
平均合并
2 天 3 小时
30 天内合并 PR
44

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/aws-durable-execution-sdk-java 的其他 Issue

查看 aws/aws-durable-execution-sdk-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。