Skip to content

logsql: fix pattern match infinite loop bug#759

Merged
valyala merged 1 commit into
masterfrom
pattern-match-infinity-loop
Oct 13, 2025
Merged

logsql: fix pattern match infinite loop bug#759
valyala merged 1 commit into
masterfrom
pattern-match-infinity-loop

Conversation

@func25
Copy link
Copy Markdown
Member

@func25 func25 commented Oct 13, 2025

Fix non-progress loop in pattern_match(...) filter when the pattern starts with a literal separator that occurs multiple times in the target string and the rest of the pattern doesn't match. Previously this could make queries spin indefinitely.

Reported by @hagen1778

Checklist

The following checks are mandatory:

@func25 func25 force-pushed the pattern-match-infinity-loop branch from 167889f to 146a5c9 Compare October 13, 2025 12:44
@func25 func25 force-pushed the pattern-match-infinity-loop branch from 146a5c9 to 982a3db Compare October 13, 2025 12:45
@valyala valyala merged commit 5f882ff into master Oct 13, 2025
8 checks passed
@valyala valyala deleted the pattern-match-infinity-loop branch October 13, 2025 14:12
@valyala
Copy link
Copy Markdown
Contributor

valyala commented Oct 13, 2025

@func25 , thank you for the bugfix!

@valyala
Copy link
Copy Markdown
Contributor

valyala commented Oct 30, 2025

FYI, this pull request has been included in VictoriaLogs v1.37.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants