[Bug]: Unresolved Async Callback Keeps Execution Idly Running
I maintainer di solito rispondono entro 1 giorno
@zhongkechen ci sta già lavorando.
Dal 25/9/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- aws, java
- Ambito
- backend, cloud, testing-qa
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Deploy a durable handler that creates two unresolved callbacks and returns
DurableFuture.anyOf(cb1, cb2). - Complete only
cb1. - 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.
- 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:
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:
anyOfskipped the durable wait/deregister path and never suspended. This is tracked by #707 and addressed by PR #730. - Defect B:
anyOfdoes not cancel or abandon the losing branch, so teardown waits for it inExecutionManager.validateRunningThreads().
The fix should add regression coverage that asserts:
- A Durable Execution is not kept idly running when there is an unresolved async callback in the background
- The losing branch is cancelled, deregistered, or otherwise prevented from blocking teardown. Either that or the Durable Function is suspending until the callback resolves.
- Lingua principale
- Java
- Stelle
- 28
- Fork
- 14
- Merge medio
- 2g 19h
- PR unite (30g)
- 43
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws/aws-durable-execution-sdk-java
-
documentation pkg:sdk
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
aws/aws-durable-execution-sdk-java#645 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
aws/aws-durable-execution-sdk-java#300 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
aws/aws-durable-execution-sdk-java#779 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 40/100
aws/aws-durable-execution-sdk-java#770 ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Propagate per-operation trace context for chained invokesForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaenhancement needs-triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
aws/aws-durable-execution-sdk-java#764 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di aws/aws-durable-execution-sdk-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NationalSecurityAgency/ghidra#9748 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
spring-mcp-tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
explyt/spring-plugin#591 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
jenkinsci/build-monitor-plugin#1367 ·
I maintainer di solito rispondono entro 1 giorno
-
waiting-for-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
spring-cloud/spring-cloud-openfeign#1443 ·
I maintainer di solito rispondono entro 1 giorno