FelixYBW commented on issue #6947:
URL: 
https://github.com/apache/incubator-gluten/issues/6947#issuecomment-2362940543

   
https://github.com/FelixYBW/gluten/commit/fbfe0f30b99d8fb759c9eb447968af4ab7a3f4dd
   
   Here is a simple way to detect this. It output the memory allocation bigger 
than 1M but not from memory pool. disable jemalloc, set executor.core to 1, 
then you can get output like 
   ```
   allocated 67108864
   libvelox.so(+0x15b4ff5) [0x7f3301cf2ff5]
   libvelox.so(+0x15b51eb) [0x7f3301cf31eb]
   libgluten.so(_Znwm+0x19) [0x7f3307be9ea9]
   
libvelox.so(_ZNSt6vectorISt10shared_ptrIN8facebook5velox4exec15WindowPartitionEESaIS5_EE17_M_realloc_insertIJS5_EEEvN9__gnu_cxx17__normal_iteratorIPS5_S7_EEDpOT_+0x80)
 [0x7f3305130180]
   
libvelox.so(_ZN8facebook5velox4exec24RowsStreamingWindowBuild18addPartitionInputsEb+0x1cf)
 [0x7f330512f18f]
   
libvelox.so(_ZN8facebook5velox4exec24RowsStreamingWindowBuild8addInputESt10shared_ptrINS0_9RowVectorEE+0x419)
 [0x7f330512f799]
   
libvelox.so(_ZN8facebook5velox4exec6Window8addInputESt10shared_ptrINS0_9RowVectorEE+0x53)
 [0x7f3304bda5b3]
   
libvelox.so(_ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE+0xfb9)
 [0x7f3304b5e0f9]
   
libvelox.so(_ZN8facebook5velox4exec6Driver4nextEPN5folly10SemiFutureINS3_4UnitEEE+0xbb)
 [0x7f3304b5f63b]
   
libvelox.so(_ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE+0x384)
 [0x7f3303124514]
   libvelox.so(_ZN6gluten24WholeStageResultIterator4nextEv+0x78) 
[0x7f3301ce78f8]
   
libgluten.so(Java_org_apache_gluten_vectorized_ColumnarBatchOutIterator_nativeHasNext+0x139)
 [0x7f33071c99c9]
   ```
   
   In this example, the root cause is 
   ```
   windowPartitions_.push_back(std::make_shared<WindowPartition>(
          pool_, data_.get(), inversedInputChannels_, sortKeyInfo_));
   ```
   
   Solution is to set `memory::StlAllocator<char*>` to std::vector.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to