manticoresearch icon indicating copy to clipboard operation
manticoresearch copied to clipboard

crash on large number at the histogram

Open tomatolog opened this issue 2 years ago • 0 comments

daemon with the version 6.2.13 a28f6e087@231219 dev (columnar 2.2.5 c323cec@231127) (secondary 2.2.5 c323cec@231127) after create table, populate table and flush data into disk chunk q.txt the following query

select id from t where id=7064099163037773392

cause crash on spawning iterators with the following stack

>	HistogramStreamed_T<__int64>::LerpCounter Line 500	C++
 	HistogramStreamed_T<__int64>::GetBucket Line 522	C++
 	HistogramStreamed_T<__int64>::EstimateValues Line 605	C++
 	HistogramStreamed_T<__int64>::EstimateRsetSize Line 554	C++
 	FetchHistogramInfo Line 669	C++
 	SelectIterators Line 1011	C++
 	CSphIndex_VLN::ChooseIterators Line 8152	C++
 	CSphIndex_VLN::SpawnIterators Line 8184	C++
 	CSphIndex_VLN::MultiScan Line 8403	C++
 	CSphIndex_VLN::MultiQuery Line 11162	C++

seems the large numbers cause the double overflow

  | tBucketL.m_tCentroid | 7064099163037773392 | const __int64
  | tBucketR.m_tCentroid | 7064099163037773393 | const __int64
  | fDist | 0.0000000000000000 | double
  | fDistL | 0.0000000000000000 | double
  | fLerp | -nan(ind) | double

tomatolog avatar Dec 20 '23 17:12 tomatolog