Skip to content

[8.2] MOD-7574: Output Current Thread IndexSpec Information On Crash#8103

Merged
kei-nan merged 18 commits into8.2from
backport-8051-to-8.2
Jan 25, 2026
Merged

[8.2] MOD-7574: Output Current Thread IndexSpec Information On Crash#8103
kei-nan merged 18 commits into8.2from
backport-8051-to-8.2

Conversation

@kei-nan
Copy link
Collaborator

@kei-nan kei-nan commented Jan 20, 2026

Backport #8051


Note

Enhances crash diagnostics and INFO safety.

  • Adds crash-safe current-thread section that reports run_time_ns and embeds index info via IndexSpec_AddToInfo(..., obfuscate, skip_unsafe_ops=true)
  • Refactors IndexSpec_AddToInfo to support obfuscation and skip unsafe allocations/locks; obfuscates filter/prefixes/field names; conditionally skips memory-heavy metrics
  • Introduces CursorList_TryLock and uses it in Cursors_RenderStatsForInfo to avoid deadlocks; reports "locked" if contention
  • Un-gates GC and cursor INFO paths (remove FTINFO_FOR_INFO_MODULES guards); wire GCContext_RenderStatsForInfo/statsForInfoCb
  • Minor API tweaks: add Obfuscate_Prefix, adjust stopwords iterator, reorder CurrentThread_SetIndexSpec usage
  • Adds pytest test_crash.py validating ordered crash-log fragments and metrics

Written by Cursor Bugbot for commit 585e712. This will update automatically on new commits. Configure here.

(cherry picked from commit f1543c7)
(cherry picked from commit 9087a32)
(cherry picked from commit 92df304)
(cherry picked from commit ff44ae8)
…nal safe and obfuscates user data

(cherry picked from commit d3af7bb)
(cherry picked from commit 33cc4d1)
(cherry picked from commit 815cc34)
(cherry picked from commit d5c57f7)
(cherry picked from commit 701b122)
(cherry picked from commit 7ca275b)
(cherry picked from commit 7c6504e)
(cherry picked from commit f600fce)
@kei-nan kei-nan requested a review from GuyAv46 January 20, 2026 15:59
@kei-nan kei-nan self-assigned this Jan 20, 2026
@kei-nan kei-nan changed the base branch from master to 8.2 January 20, 2026 15:59
@jit-ci

This comment has been minimized.

GuyAv46
GuyAv46 previously approved these changes Jan 21, 2026
@kei-nan kei-nan marked this pull request as draft January 21, 2026 12:37
@kei-nan kei-nan marked this pull request as ready for review January 21, 2026 12:37
@jit-ci

This comment has been minimized.

@jit-ci

This comment has been minimized.

GuyAv46
GuyAv46 previously approved these changes Jan 25, 2026
@jit-ci

This comment has been minimized.

@jit-ci
Copy link

jit-ci bot commented Jan 25, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

🚨 Summary

• No critical security issues detected in the PR

• Minor code changes to cursor handling and management

• Updated cursor statistics rendering for INFO command

🔍 Findings

HIGH - 1 finding HIGH
1. Missing '--no-install-recommends' in apt-get install
ID Type Finding File Severity
d8fee7d6d0 DS029 Missing '--no-install-recommends' in apt-get install - The 'apt-get install' command is used without the '--no-install-recommends' flag. This can lead to unnecessary package installations, increasing the image size. Dockerfile (lines 15-19) HIGH

🔍 AI Analysis: While this is a best practice for minimizing container image size, it is not directly related to the code changes in this PR and does not pose an immediate security risk.

🚫 Ignored Findings (1)

HIGH (1)
  • Image user should not be 'root' in Dockerfile — reason: ignored
    ↪ Unignore: @sera unignore b3fd9d3b12

▶️ Advanced Options

Help section with supported ignore actions and syntax.

Need to ignore a finding? Use commands like:

@sera ignore <finding_id> reason:accepted (reason is optional)

@sera ignore all reason:other - this is a test PR (reason is optional)

@sera ignore type:DS002

@sera ignore type:DS029


Security scan by Jit

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

❌ Patch coverage is 3.38983% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.25%. Comparing base (58dc084) to head (585e712).
⚠️ Report is 7 commits behind head on 8.2.

Files with missing lines Patch % Lines
src/spec.c 0.00% 37 Missing ⚠️
src/cursor.c 0.00% 14 Missing ⚠️
src/info/info_redis/info_redis.c 0.00% 3 Missing ⚠️
src/obfuscation/obfuscation_api.c 0.00% 2 Missing ⚠️
src/stopwords.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.2    #8103      +/-   ##
==========================================
- Coverage   89.63%   89.25%   -0.38%     
==========================================
  Files         257      257              
  Lines       41612    41778     +166     
  Branches     3719     3719              
==========================================
- Hits        37298    37289       -9     
- Misses       4265     4440     +175     
  Partials       49       49              
Flag Coverage Δ
flow 82.52% <3.38%> (-0.42%) ⬇️
unit 47.00% <1.69%> (-0.17%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kei-nan kei-nan added this pull request to the merge queue Jan 25, 2026
Merged via the queue into 8.2 with commit 1be1aa1 Jan 25, 2026
28 of 30 checks passed
@kei-nan kei-nan deleted the backport-8051-to-8.2 branch January 25, 2026 17:16
alonre24 added a commit to alonre24/redis that referenced this pull request Jan 26, 2026
**Bug Fixes:**

* [redis#7219](RediSearch/RediSearch#7219) Fix a concurrency issue on Reducer in `FT.AGGREGATE`
* [redis#7255](RediSearch/RediSearch#7255) Fix `BM25STD` underflow wraparound
* [redis#7275](RediSearch/RediSearch#7275) Report used memory as `unsigned long long` to avoid underflows
* [redis#7264](RediSearch/RediSearch#7264) Fix `totalDocsLen` updates
* [redis#6995](RediSearch/RediSearch#6995) Do not fanout `FT.INFO` to replicas
* [redis#7350](RediSearch/RediSearch#7350) Fix `FT.CREATE` failure with LeanVec parameters on non-Intel architectures
* [redis#7384](RediSearch/RediSearch#7384) Fix index load from RDB temporary memory overhead
* [redis#7459](RediSearch/RediSearch#7459) Fix Fork GC potential double-free on error path
* [redis#7458](RediSearch/RediSearch#7458) Fix a GC performence regression
* [redis#7470](RediSearch/RediSearch#7470) Avoid draining worker thread pool from FLUSH callback to avoid deadlocks
* [redis#7554](RediSearch/RediSearch#7554) Handle the case where `SCORE` is sent alone without extra fields (coordinator)
* [redis#7685](RediSearch/RediSearch#7685) Fix cursor logical leak
* [redis#7794](RediSearch/RediSearch#7794) Fix `cmp_strings()` to correctly handle binary data with embedded NULLs in TOLIST reducer in FT.AGGREGATE
* [redis#7873](RediSearch/RediSearch#7873) Handle warnings in empty `FT.AGGREGATE` replies (cluster)
* [redis#7886](RediSearch/RediSearch#7886) Remove non-TEXT fields from the spec keys dictionary
* [redis#7904](RediSearch/RediSearch#7904) Refactor keys dictionary handling
* [redis#7901](RediSearch/RediSearch#7901) Support multiple warnings in reply
* [redis#8083](RediSearch/RediSearch#8083) Fix incorrect FULLTEXT field metric counts
* [redis#8153](RediSearch/RediSearch#8153) Fix configuration registration issues

**Improvements:**

* [redis#7154](RediSearch/RediSearch#7154) `FT.AGGREGATE` can return Background Indexing OOM warnings
* [redis#7083](RediSearch/RediSearch#7083) Add the default text scorer as a configuration option
* [redis#7341](RediSearch/RediSearch#7341) Rename `FT.PROFILE` counter fields
* [redis#7436](RediSearch/RediSearch#7436) Enhance `FT.PROFILE` with vector search execution details
* [redis#7435](RediSearch/RediSearch#7435) Ensure full `FT.PROFILE` output on timeout with RETURN policy
* [redis#7534](RediSearch/RediSearch#7534) Reduce the number of worker threads asynchronously to avoid deadlocks during queries
* [redis#7614](RediSearch/RediSearch#7614) Track timeout warnings and errors in INFO
* [redis#7646](RediSearch/RediSearch#7646) Track `maxprefixexpansions` warnings and errors in INFO
* [redis#7577](RediSearch/RediSearch#7577) Track query syntax/argument errors (basis for query error tracking)
* [redis#7737](RediSearch/RediSearch#7737) Add `Internal cursor reads` metric to cluster `FT.PROFILE` output
* [redis#7759](RediSearch/RediSearch#7759) Extend indexing metrics
* [redis#7710](RediSearch/RediSearch#7710) Support `WITHCOUNT` keyword in `FT.AGGREGATE`
* [redis#7957](RediSearch/RediSearch#7957) Persist query warnings across cursor reads
* [redis#8054](RediSearch/RediSearch#8054) Add logging for index-related commands
* [redis#8151](RediSearch/RediSearch#8151) Fix shard total profile time reporting in `FT.PROFILE`
* [redis#8103](RediSearch/RediSearch#8103) Output current thread IndexSpec information on crash
YaacovHazan pushed a commit to redis/redis that referenced this pull request Jan 26, 2026
**Bug Fixes:**

* [#7219](RediSearch/RediSearch#7219) Fix a
concurrency issue on Reducer in `FT.AGGREGATE`
* [#7255](RediSearch/RediSearch#7255) Fix
`BM25STD` underflow wraparound
* [#7275](RediSearch/RediSearch#7275) Report
used memory as `unsigned long long` to avoid underflows
* [#7264](RediSearch/RediSearch#7264) Fix
`totalDocsLen` updates
* [#6995](RediSearch/RediSearch#6995) Do not
fanout `FT.INFO` to replicas
* [#7350](RediSearch/RediSearch#7350) Fix
`FT.CREATE` failure with LeanVec parameters on non-Intel architectures
* [#7694](RediSearch/RediSearch#7694) Use
asynchronous jobs for GC in SVS to accelerate execution
* [#7384](RediSearch/RediSearch#7384) Fix index
load from RDB temporary memory overhead
* [#7459](RediSearch/RediSearch#7459) Fix Fork
GC potential double-free on error path
* [#7458](RediSearch/RediSearch#7458) Fix a GC
performence regression
* [#7470](RediSearch/RediSearch#7470) Avoid
draining worker thread pool from FLUSH callback to avoid deadlocks
* [#7554](RediSearch/RediSearch#7554) Handle the
case where `SCORE` is sent alone without extra fields (coordinator)
* [#7685](RediSearch/RediSearch#7685) Fix cursor
logical leak
* [#7794](RediSearch/RediSearch#7794) Fix
`cmp_strings()` to correctly handle binary data with embedded NULLs in
TOLIST reducer in FT.AGGREGATE
* [#7873](RediSearch/RediSearch#7873) Handle
warnings in empty `FT.AGGREGATE` replies (cluster)
* [#7886](RediSearch/RediSearch#7886) Remove
non-TEXT fields from the spec keys dictionary
* [#7904](RediSearch/RediSearch#7904) Refactor
keys dictionary handling
* [#7901](RediSearch/RediSearch#7901) Support
multiple warnings in reply
* [#8083](RediSearch/RediSearch#8083) Fix
incorrect FULLTEXT field metric counts
* [#8153](RediSearch/RediSearch#8153) Fix
configuration registration issues

**Improvements:**

* [#7154](RediSearch/RediSearch#7154)
`FT.AGGREGATE` can return Background Indexing OOM warnings
* [#7083](RediSearch/RediSearch#7083) Add the
default text scorer as a configuration option
* [#7341](RediSearch/RediSearch#7341) Rename
`FT.PROFILE` counter fields
* [#7436](RediSearch/RediSearch#7436) Enhance
`FT.PROFILE` with vector search execution details
* [#7435](RediSearch/RediSearch#7435) Ensure
full `FT.PROFILE` output on timeout with RETURN policy
* [#7534](RediSearch/RediSearch#7534) Reduce the
number of worker threads asynchronously to avoid deadlocks during
queries
* [#7614](RediSearch/RediSearch#7614) Track
timeout warnings and errors in INFO
* [#7646](RediSearch/RediSearch#7646) Track
`maxprefixexpansions` warnings and errors in INFO
* [#7577](RediSearch/RediSearch#7577) Track
query syntax/argument errors (basis for query error tracking)
* [#7737](RediSearch/RediSearch#7737) Add
`Internal cursor reads` metric to cluster `FT.PROFILE` output
* [#7759](RediSearch/RediSearch#7759) Extend
indexing metrics
* [#7710](RediSearch/RediSearch#7710) Support
`WITHCOUNT` keyword in `FT.AGGREGATE`
* [#7957](RediSearch/RediSearch#7957) Persist
query warnings across cursor reads
* [#8054](RediSearch/RediSearch#8054) Add
logging for index-related commands
* [#8151](RediSearch/RediSearch#8151) Fix shard
total profile time reporting in `FT.PROFILE`
* [#8103](RediSearch/RediSearch#8103) Output
current thread IndexSpec information on crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants