[Bug]: Invalid suspension logs a WARN and returns a PENDING result that the service rejects
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- aws, java
- 領域
- backend, testing-qa
調査の方向性
Start with ExecutionManager.preSuspendCheck(), including its callers in deregisterActiveThread and finishCheckpointProcessing, then inspect DurableExecutor's retry path and LocalDurableTestRunner.runUntilComplete. Reproduce case 1 from #752 and trace the PENDING output. Done means invalid suspension is reported with awaited operation details, transient retries remain possible, the no-token path is allowed, and local tests expose invalid output.
索引モデルが issue の本文から書いたものです。
説明
Expected Behavior
When the SDK suspends with no pending operation, it returns an output that the service rejects. The SDK should report this state as an SDK error. The error should name the operations that the suspended threads were waiting for.
The invocation should stay retryable. The race in #370 reached this state, and the execution still succeeded on a later invocation.
Actual Behavior
ExecutionManagercallspreSuspendCheck()before it suspends. It does so inderegisterActiveThreadand infinishCheckpointProcessing.preSuspendCheck()looks for a pending operation: aSTEPinPENDING, aWAITorCALLBACKinSTARTED, or aCHAINED_INVOKEinPENDINGorSTARTED.- If it finds none, it logs one WARN line:
Invalid suspension. No operation is pending. The line does not name an operation or a thread. - The SDK then suspends and returns
Status: PENDINGwith no error. The Lambda invocation succeeds, because the handler returns normally. - The service rejects the output with
InvalidParameterValueException: Cannot return PENDING status with no pending operations. - If the cause is deterministic, every replay reaches the same state. The execution fails, and
GetDurableExecutionreportsStatus: FAILEDwith that error.
The customer sees Lambda invocations that succeed, one WARN line per invocation, and a failed execution. None of these names the operation or the SDK defect that caused the failure.
Steps to Reproduce
-
Run case 1 from #752 with
LocalDurableTestRunner. That handler runs afirstSuccessful()parallel withmaxConcurrency(1), then callsget()on the skipped second branch. -
Each invocation returns status
PENDINGwith no error. No operation is pending. -
Each invocation logs:
WARN software.amazon.lambda.durable.execution.ExecutionManager - Invalid suspension. No operation is pending -
LocalDurableTestRunner.runUntilCompletereturnsPENDING. It does not report that the service would reject the output.
SDK Version
2.2.1. Reproduced on main at ef88276 (2.2.2-SNAPSHOT).
Java Version
21
Is this a regression?
Unknown
Additional Context
Three SDK defects have reached this state. Each ended with the service error above.
- #370: a race between checkpoint completion and a waiting thread. Fixed in #659.
- #736: a race in
allCompleted()branch registration. Fixed in #737. - #752:
get()on aSKIPPEDparallel branch. Open.
A fix needs to handle three things.
- Keep the retry. A transient race can clear on a later invocation, as in #370.
DurableExecutoralready rethrows a retryableUnrecoverableDurableExecutionException. Its comment says this is to "let the backend retry the invocation". An error on that path could keep the retry and name the cause. - Allow the no-token path. #706 proposes a
PENDINGreturn when a checkpoint response has no token. That path abandons in-flight operations, so the state can hold no pending operation. A stricter check must not reject that return. - Report it in local tests.
LocalDurableTestRunnerreturnsPENDINGfor this output. It could report the output as invalid, so that a local test shows the outcome the service produces.
A smaller change keeps the current behavior and logs at ERROR with the ID and name of the awaited operation.
- 主要言語
- Java
- スター
- 28
- フォーク
- 14
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 47
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/aws-durable-execution-sdk-java のほかの issue
-
documentation pkg:sdk
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
aws/aws-durable-execution-sdk-java#645 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws/aws-durable-execution-sdk-java#300 ·
メンテナーはふだん 1 日以内に返信
-
enhancement needs-triage
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
aws/aws-durable-execution-sdk-java#779 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: root handler instrumentation misses the canonical OTel execution context対応中かも @zhongkechen が 5 日前に担当しました。 オープンneeds-triage
難易度 5/5 1週間以上 初心者へのやさしさ 40/100
aws/aws-durable-execution-sdk-java#770 ·
メンテナーはふだん 1 日以内に返信
-
[Feature]: Propagate per-operation trace context for chained invokes対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンenhancement needs-triage
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
aws/aws-durable-execution-sdk-java#764 ·
メンテナーはふだん 1 日以内に返信
aws/aws-durable-execution-sdk-java の issue をすべて見る
似ている issue
-
Add Zammad対応中かも @Arslan-TR が今日担当しました。 オープンrequest
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
endoflife-date/endoflife.date#11298 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
java-native-access/jna#1740 ·
-
Upgrade org.apache.felix.utils to 1.11.10対応中かも @stataru8 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/karaf#2982 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
objectionary/eo#9329 ·
メンテナーはふだん 1 日以内に返信