[MCOL-5607] PrimProc crashes in json_key_matches Created: 2023-11-10  Updated: 2024-01-10  Resolved: 2023-12-15

Status: Closed
Project: MariaDB ColumnStore
Component/s: PrimProc
Affects Version/s: 23.02.4, 23.10.0
Fix Version/s: 23.10.1

Type: Bug Priority: Critical
Reporter: Rick Pizzi Assignee: Sergey Zefirov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MCOL-5615 Some JSON functions are stateful and ... Open
Problem/Incident
causes MCOL-5350 json data returns differently by same... Closed
Sprint: 2023-11
Assigned for Review: Roman Roman
Assigned for Testing: Kirill Perov Kirill Perov

 Description   

PrimProc crashes when the following query is executed:

SELECT
  DATE(rc_ts) PERIOD,
  pvid,
  moid
 FROM
  temp_cs.codesP149
  JOIN isweb.rilevazione_custom_cs
    ON rc_cd_id = cdid
    AND rc_codice = codice
    AND rc_pv_id = pvid
    AND rc_prezzo > 0
WHERE JSON_VALUE(rc_obs, CONCAT('$.vaid')) IS NOT NULL
  AND JSON_VALUE(rc_obs, CONCAT('$.mostro')) IS NULL
  AND rc_ts >= '2023-11-07'
  AND DATE(rc_ts) BETWEEN '2023-11-07' AND '2023-11-08'
GROUP BY PERIOD,pvid,moid

the stack trace:

Date/time: 2023-11-10 10:35:05
Signal: 11
 
/usr/bin/PrimProc(+0xb74b6)[0x55c9f1f344b6]
/lib64/libpthread.so.0(+0x12cf0)[0x7ff2933c5cf0]
/lib64/libexecplan.so(+0x136809)[0x7ff29431c809]
/usr/bin/PrimProc(+0x1b8cc2)[0x55c9f2035cc2]
/usr/bin/PrimProc(json_key_matches+0x15)[0x55c9f2036cf5]
/usr/bin/PrimProc(json_find_path+0x149)[0x55c9f2036e79]
/lib64/libfuncexp.so(_ZN7funcexp15JSONPathWrapper7extractERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERN8rowgroup3RowERN5boost10shared_ptrIN8execplan9ParseTreeEEESG_+0x213)[0x7ff293f43a13]
/lib64/libfuncexp.so(_ZN7funcexp15Func_json_value9getStrValB5cxx11ERN8rowgroup3RowERSt6vectorIN5boost10shared_ptrIN8execplan9ParseTreeEEESaIS9_EERbRNS7_20CalpontSystemCatalog7ColTypeE+0x4d)[0x7ff293f43d0d]
/lib64/libexecplan.so(_ZN8execplan14FunctionColumn9getStrValB5cxx11ERN8rowgroup3RowERb+0x5b)[0x7ff2942e5c3b]
/lib64/libexecplan.so(_ZN8execplan17PredicateOperator10getBoolValERN8rowgroup3RowERbPNS_14ReturnedColumnES6_+0x6f3)[0x7ff2942f3c93]
/lib64/libfuncexp.so(_ZN7funcexp14FuncExpWrapper8evaluateEPN8rowgroup3RowE+0xa4)[0x7ff293ef7bd4]
/usr/bin/PrimProc(+0x5e213)[0x55c9f1edb213]
/usr/bin/PrimProc(+0x5f681)[0x55c9f1edc681]
/usr/bin/PrimProc(+0x72f90)[0x55c9f1eeff90]
/lib64/libthreadpool.so(_ZN10threadpool14FairThreadPool9threadFcnENS_18PriorityThreadPool8PriorityE+0x713)[0x7ff293166bd3]
/usr/bin/PrimProc(+0xb8f97)[0x55c9f1f35f97]
/lib64/libpthread.so.0(+0x81ca)[0x7ff2933bb1ca]
/lib64/libc.so.6(clone+0x43)[0x7ff291dcce73]



 Comments   
Comment by Kirill Perov [ 2023-12-02 ]

tested on 23.02.4 = reproducible
on latest develop (03.12.2023) = fixed

testing finished ok

Generated at Thu Feb 08 02:59:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.