Details
- 
    
Bug
 - 
    Status: Closed (View Workflow)
 - 
    
Critical
 - 
    Resolution: Fixed
 - 
    23.10.3
 - 
    None
 - 
    None
 
- 
        2025-3
 
Description
After upgrading to 23.10.3, this query against a columnstore view is crashing primproc, disrupting critical operations.
Reproduction:
					bash cs_package_manager.sh install enterprise 10.6.20-16  | 
		
					mariadb -e "create database if not exists de_odvcan_11600_202501;"  | 
		
					mariadb DE_ODVCAN_11600_202501 < create.sql
			 | 
		
					mariadb DE_ODVCAN_11600_202501 < crash.sql
			 | 
		
Client Error:
					ERROR 1815 (HY000) at line 8: Internal error: Lost connection to ExeMgr. Please contact your administrator  | 
		
messages log:
					Mar 18 14:32:56 ip-172-31-35-155 mariadbd[9802]: DBRM::send_recv: controller node closed the connection  | 
		
					Mar 18 14:32:56 ip-172-31-35-155 systemd[1]: Started Process Core Dump (PID 17475/UID 0).  | 
		
					Mar 18 14:32:56 ip-172-31-35-155 systemd-coredump[17476]: Resource limits disable core dumping for process 17310 (PrimProc).  | 
		
					Mar 18 14:32:56 ip-172-31-35-155 systemd-coredump[17476]: Process 17310 (PrimProc) of user 991 dumped core.  | 
		
					Mar 18 14:32:56 ip-172-31-35-155 systemd[1]: mcs-primproc.service: Main process exited, code=killed, status=11/SEGV  | 
		
Crash Trace:
					[root@ip-172-31-35-155 trace]# cat PrimProc.6622.log  | 
		
					Date/time: 2025-03-18 14:05:56  | 
		
					Signal: 11  | 
		
					 
			 | 
		
					/usr/bin/PrimProc(+0xbf946)[0x557259987946]  | 
		
					/lib64/libpthread.so.0(+0x12d10)[0x7fcf4fc41d10]  | 
		
					/lib64/libc.so.6(+0xb8d2d)[0x7fcf4e3c2d2d]  | 
		
					/lib64/libjoblist.so(ZNSt6vectorIjSaIjEE6insertEN9__gnu_cxx17__normal_iteratorIPKjS1_EERS4+0x4e)[0x7fcf5118fc4e]  | 
		
					/lib64/libjoblist.so(+0x1caa84)[0x7fcf51185a84]  | 
		
					/lib64/libjoblist.so(+0x1ce8ef)[0x7fcf511898ef]  | 
		
					/lib64/libjoblist.so(_ZN7joblist12makeJobStepsEPN8execplan26CalpontSelectExecutionPlanERNS_7JobInfoERSt6vectorIN5boost10shared_ptrINS_7JobStepEEESaIS9_EESC_RSt3mapIiS9_St4lessIiESaISt4pairIKiS9_EEE+0x249)[0x7fcf5118b629]  | 
		
					/lib64/libjoblist.so(+0x1d260d)[0x7fcf5118d60d]  | 
		
					/lib64/libjoblist.so(_ZN7joblist14JobListFactory11makeJobListEPN8execplan20CalpontExecutionPlanEPNS_15ResourceManagerERK26PrimitiveServerThreadPoolsbb+0x62)[0x7fcf5118d952]  | 
		
					/usr/bin/PrimProc(+0xba637)[0x557259982637]  | 
		
					/lib64/libthreadpool.so(_ZN10threadpool10ThreadPool11beginThreadEv+0x62e)[0x7fcf4f9d136e]  | 
		
					/usr/bin/PrimProc(+0xc1c71)[0x557259989c71]  | 
		
					/lib64/libpthread.so.0(+0x81ca)[0x7fcf4fc371ca]  | 
		
					/lib64/libc.so.6(clone+0x43)[0x7fcf4e3438d3]  | 
		
Crash Analyze:
Line 1761: `if (jobInfo.subId == 0 && csep->hasOrderBy() && !csep->specHandlerProcessed())`
					bash crash.sh "/lib64/libjoblist.so(_ZN7joblist12makeJobStepsEPN8execplan26CalpontSelectExecutionPlanERNS_7JobInfoERSt6vectorIN5boost10shared_ptrINS_7JobStepEEESaIS9_EESC_RSt3mapIiS9_St4lessIiESaISt4pairIKiS9_EEE+0x249)[0x7fcf5118b629]"  | 
		
					Â  | 
		
					/usr/src/debug/MariaDB-/src_0/storage/columnstore/columnstore/dbcon/joblist/joblistfactory.cpp:1761  | 
		
					Â  | 
		
					// v-table mode
			 | 
		
					void makeVtableModeSteps(CalpontSelectExecutionPlan* csep, JobInfo& jobInfo, JobStepVector& querySteps,  | 
		
					                         JobStepVector& projectSteps, DeliveredTableMap& deliverySteps)
			 | 
		
					{
			 | 
		
					// special case for outer query order by limit -- return all  | 
		
					if (jobInfo.subId == 0 && csep->hasOrderBy() && !csep->specHandlerProcessed())  | 
		
					  {
			 | 
		
					jobInfo.limitCount = (uint64_t)-1;  | 
		
					  }
			 | 
		
					// support order by and limit in sub-query/union or  | 
		
					// GROUP BY handler processed outer query order  | 
		
					else if (csep->orderByCols().size() > 0)  | 
		
					  {
			 | 
		
					    addOrderByAndLimit(csep, jobInfo);
			 | 
		
					  }
			 | 
		
					// limit without order by in any query  | 
		
					else  | 
		
					  {
			 | 
		
					    jobInfo.limitStart = csep->limitStart();
			 | 
		
					    jobInfo.limitCount = csep->limitNum();
			 | 
		
					  }
			 | 
		
					Â  | 
		
					// Bug 2123. Added overrideLargeSideEstimate parm below. True if the query was written  | 
		
					// with a hint telling us to skip the estimatation process for determining the large side  | 
		
					// table and instead use the table order in the from clause.  | 
		
					  associateTupleJobSteps(querySteps, projectSteps, deliverySteps, jobInfo, csep->overrideLargeSideEstimate());
			 | 
		
					uint16_t stepNo = jobInfo.subId * 10000;  | 
		
					  numberSteps(querySteps, stepNo, jobInfo.traceFlags);
			 | 
		
					// SJSTEP ds = deliverySteps.begin()->second;  | 
		
					  idbassert(deliverySteps.begin()->second.get());
			 | 
		
					// ds->stepId(stepNo);  | 
		
					// ds->setTraceFlags(jobInfo.traceFlags);  | 
		
Other steps prior:
					"/lib64/libjoblist.so(+0x1d260d)[0x7fcf5118d60d]" ->  | 
		
					/usr/src/debug/MariaDB-/src_0/storage/columnstore/columnstore/dbcon/joblist/joblistfactory.cpp:2123  | 
		
					Â  | 
		
					bash crash.sh "/lib64/libjoblist.so(_ZN7joblist14JobListFactory11makeJobListEPN8execplan20CalpontExecutionPlanEPNS_15ResourceManagerERK26PrimitiveServerThreadPoolsbb+0x62)[0x7fcf5118d952]  | 
		
					/usr/bin/PrimProc(+0xba637)[0x557259982637]" ->  | 
		
					/usr/src/debug/MariaDB-/src_0/storage/columnstore/columnstore/.boost/boost-lib/include/boost/smart_ptr/shared_ptr.hpp:671  | 
		
Note: this is not reproducible in 23.10.1 or 23.10.2
					bash cs_package_manager.sh install enterprise 10.6.17-13  | 
		
					bash cs_package_manager.sh install enterprise 10.6.19-15  | 
		
Attachments
Issue Links
- relates to
 - 
                    
MCOL-5776 SELECT CONCAT(<cols not in GROUP BY list>) throws error: MCS-2021
-         
 - Closed
 
 -         
 
1. 
 | 
                                            Create patch for customers that temporarily avoids crash |     
             | 
                                            Closed | Unassigned |