Skip to content

fix: guard invalid unicode queue payloads#15576

Open
harsh21234i wants to merge 2 commits intokestra-io:developfrom
harsh21234i:fix/invalid-unicode-surrogate-crash
Open

fix: guard invalid unicode queue payloads#15576
harsh21234i wants to merge 2 commits intokestra-io:developfrom
harsh21234i:fix/invalid-unicode-surrogate-crash

Conversation

@harsh21234i
Copy link
Copy Markdown
Contributor

@harsh21234i harsh21234i commented Apr 15, 2026

Hey @loicmathieu

Summary

Updates the fix for invalid Unicode payload handling so malformed Unicode
does not still destabilize the instance.

This follows up on the reopened #14806 report that the issue was still
reproducible and could still kill the instance.

What changed

  • guard DefaultLogEntryEmitter against unsupported queue payloads so
    invalid log entries are dropped instead of letting the async queue failure
    bubble out
  • broaden PostgreSQL JSONB error detection in JdbcQueueClient so lone
    surrogate / invalid Unicode payload failures are converted into
    UnsupportedMessageException
  • keep the worker-controller recovery path that strips outputs and retries
    when queue emission fails with UnsupportedMessageException
  • add regression coverage for:
    • unsupported log-entry emission
    • lone high surrogate payloads
    • lone low surrogate payloads

Why

The previous handling covered some invalid payload cases, but malformed
Unicode could still escape through log emission. That left a crash path
open even after the earlier fix.

Notes:

  • The Postgres queue regression test updates are included, but I could not
    fully run the Postgres-backed test class in this environment because no
    local PostgreSQL instance was available.

Related

@github-project-automation github-project-automation Bot moved this to To review in Pull Requests Apr 15, 2026
@MilosPaunovic MilosPaunovic added area/backend Needs backend code changes kind/external Pull requests raised by community contributors labels Apr 15, 2026
# Conflicts:
#	jdbc-postgres/src/test/java/io/kestra/runner/postgres/PostgresQueueTest.java
@harsh21234i harsh21234i force-pushed the fix/invalid-unicode-surrogate-crash branch from 2aee528 to 04b94da Compare April 15, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/backend Needs backend code changes kind/external Pull requests raised by community contributors

Projects

Status: To review

Development

Successfully merging this pull request may close these issues.

invalid unicode sequence crashes kestra executor pod

2 participants