Repository navigation
Closed
Description
Query Information
PPL Command/Query:
POST {{baseUrl}}/_plugins/_ppl/
Content-Type: application/x-ndjson
{
"query": "source=sso_logs-nginx-prod-2024.05.08 | where ISPRESENT(code) | join type=inner left=SUCCESS right=FAILED on SUCCESS.remote = FAILED.ClientIP [ source=sso_logs-nginx-prod-2024.05.08 | where ISPRESENT(log) | parse log '.+client: (?<ClientIP>.+?),.*'] | dedup ClientIP, agent"
}
Actual Result:
OpenSearch crashed with OOM
=== Standard error of node `node{:opensearch-sql-plugin:integTest-0}` ===
» ↓ last 40 non error or warning messages from /Users/penghuo/oss/os-sql/plugin/build/testclusters/integTest-0/logs/opensearch.stderr.log ↓
» WARNING: Using incubator modules: jdk.incubator.vector
» WARNING: Unknown module: org.apache.arrow.memory.core specified to --add-opens
» fatal error in thread [opensearch[integTest-0][scheduler][T#1]], exiting
» java.lang.OutOfMemoryError: Java heap space
» at org.opensearch.common.util.concurrent.ThreadContext.preserveContext(ThreadContext.java:558)
» at org.opensearch.threadpool.ThreadPool.schedule(ThreadPool.java:602)
» at org.opensearch.threadpool.Scheduler$ReschedulingRunnable.onAfter(Scheduler.java:266)
» at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.onAfter(ThreadContext.java:953)
» at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:56)
» at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
» at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
» at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
» at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
» at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
» at java.base/java.lang.Thread.runWith(Thread.java:1596)
» at java.base/java.lang.Thread.run(Thread.java:1583)
Expected Result:
no crash
Dataset Information
Dataset/Schema Type
- OpenTelemetry (OTEL)
- Simple Schema for Observability (SS4O)
- Open Cybersecurity Schema Framework (OCSF)
- Custom (ngix)
Follow doc to prepare index and data.
Bug Description
Issue Summary:
Environment Information
OpenSearch Version: 3.3
Screenshots
n/a
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
LantaoJin commentedon Oct 14, 2025
@penghuo with the PR of restriction on
join.subsearch_maxmerged. can you try the test again with main branch?yuancu commentedon Jan 20, 2026
In the latest build, the query still fails.
RCA
source=sso_logs-nginx-prod-2024.05.08 | where ISPRESENT(code), has 9510 rows, where every row has the same remote10.0.1.151source=sso_logs-nginx-prod-2024.05.08 | where ISPRESENT(log) | parse log '.+client: (?<ClientIP>.+?),.*', has 490 rows, where every row has the same ClientIP10.0.1.151| join type=inner left=SUCCESS right=FAILED on SUCCESS.remote = FAILED.ClientIP, it produces 4,659,900 rows, because every row in the left table matches every row in the right table,.dedup, which is translated to the following physical plan, is a memory-intensive operation (it contains window functions):This leads to the OOM. If the dedup command is removed, the query returns fairly quickly.
I think this is a hardware limitation. Two ways I can come up with to solve it are:
further optimize$$1$$ (can be simplified with dedupfor cases where the max duplication isSELECT DISTINCT)LantaoJin commentedon Jan 20, 2026
@yuancu thinks for confirming, let me close this since the OOM is not related to join. OOM caused by
dedupoperation in memory. For circuit breaker mechanism, we do have a health monitor, can you help to check why it doesn't work as expected in your testing.LantaoJin commentedon Jan 20, 2026
@yuancu can you try query
The max=1 is the default value in SPL, but we use max=0 as default.
yuancu commentedon Jan 20, 2026
@LantaoJin when setting
max=1, i.e.the query instantly returns with one record (as the values on of condition key are the same across the two tables). Yet when using the default setting, it leads to cluster crash with OOM error.