[Bug]: Invalid suspension logs a WARN and returns a PENDING result that the service rejects
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 48/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- aws, java
- Bereich
- backend, testing-qa
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Java
- Sterne
- 28
- Forks
- 16
- Ø Merge
- 2 T. 59 Min.
- Gemergte PRs (30 T.)
- 62
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus aws/aws-durable-execution-sdk-java
-
bug pkg:conformance
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
aws/aws-durable-execution-sdk-java#844 ·
Maintainer antworten meist innerhalb von 1 Tag
-
documentation pkg:sdk
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
aws/aws-durable-execution-sdk-java#645 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
aws/aws-durable-execution-sdk-java#300 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs-triage pkg:sdk
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
aws/aws-durable-execution-sdk-java#859 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug needs-triage pkg:otel
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
aws/aws-durable-execution-sdk-java#858 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in aws/aws-durable-execution-sdk-java
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 3 Tagen
-
A proxy that fails to start logs a RejectedExecutionException stack trace from its shutdown hookOffenfollow-up
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Sanne/incus-spawn#1953 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Shweit/EtherealPortals#30 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 70/100
checkstyle/checkstyle#22398 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Typo in jakartaee-bom 12.0.0-SNAPSHOT with cdiEvtl. vergeben @ElectLive hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
jakartaee/jakartaee-api#205 · 1 Kommentar ·