Skip to content

[BUG] WITHOUTCOUNT crash - [MOD-6306] #4224

@keithchew

Description

@keithchew

Testing on v2.8.9, I experienced a crash:

7:79:M 16 Dec 2023 22:44:45.685 # <search> successRatio == 1 means heap is full

from OPT_Rewind() in optimizer_reader.c:

    RS_LOG_ASSERT(successRatio < 1, "successRatio == 1 means heap is full");

I don't think this is a heap issue, and adding some logging, we can see below OPT_Rewind is called for the first time:

7:79:M 16 Dec 2023 22:44:45.685 # <module> qOpt->limit [24] qOpt->nf->limit [2]
7:79:M 16 Dec 2023 22:44:45.685 # <module> oi->offset [0]
7:79:M 16 Dec 2023 22:44:45.685 # <module> rc1 [0], break...
7:79:M 16 Dec 2023 22:44:45.685 # <module> heap_size(it->heap) [24] heap_count(it->heap) [2] it->offset [0] it->childEstimate [80]
7:79:M 16 Dec 2023 22:44:45.685 # <module> OPT_Rewind nf->offset [75]
7:79:M 16 Dec 2023 22:44:45.685 # <module> successRatio [1.000000] resultsCollectedSinceLast [2] optIt->lastLimitEstimate [2]
7:79:M 16 Dec 2023 22:44:45.685 # <search> successRatio == 1 means heap is full

lastLimitEstimate was initialized to 2 in NewOptimizerIterator() and when OPT_Rewind() is called for the first time, resultsCollectedSinceLast is the same as lastLimitEstimate, causing the assertion. This does not happen all the time, so I am still testing to see what conditions trigger this bug.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions