KinomotoMio opened a new issue, #6505:
URL: https://github.com/apache/opendal/issues/6505

   ### Describe the bug
   
   While running CI tests for the C++ binding in [PR 
#6503](https://github.com/apache/opendal/pull/6503), LeakSanitizer reported 
memory leaks.
   
   <details>
   <summary>part of hdfs_cluster LSan report</summary>
   
   ```log
   2025-08-13T05:09:40.2048639Z 
=================================================================
   2025-08-13T05:09:40.2049214Z ==8047==ERROR: LeakSanitizer: detected memory 
leaks
   2025-08-13T05:09:40.2049582Z 
   2025-08-13T05:09:40.2049915Z Direct leak of 503832 byte(s) in 2787 object(s) 
allocated from:
   2025-08-13T05:09:40.2057041Z     #0 0x55c75409d683 in malloc 
(/home/runner/work/opendal/opendal/bindings/cpp/build/opendal_cpp_test+0x1a2683)
 (BuildId: 1752b1e55df1c672fed2af1c1a40cccf670994d6)
   2025-08-13T05:09:40.2059193Z     #1 0x7f82bf83e4bf in AllocateHeap(unsigned 
long, MemoryType, AllocFailStrategy::AllocFailEnum) 
(/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/x64/lib/server/libjvm.so+0x43e4bf)
   2025-08-13T05:09:40.2061485Z     #2 0x7f82c0065669 in 
ImmutableOopMapSet::build_from(OopMapSet const*) 
(/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/x64/lib/server/libjvm.so+0xc65669)
   2025-08-13T05:09:40.2063678Z     #3 0x7f82bfa31f12 in 
CodeBlob::CodeBlob(char const*, CompilerType, CodeBlobLayout const&, 
CodeBuffer*, int, int, OopMapSet*, bool) 
(/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/x64/lib/server/libjvm.so+0x631f12)
   2025-08-13T05:09:40.2065375Z     #4 0x7f82bfa8c297 in 
CompiledMethod::CompiledMethod(Method*, char const*, CompilerType, int, int, 
CodeBuffer*, int, int, OopMapSet*, bool) 
(/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/x64/lib/server/libjvm.so+0x68c297)
   2025-08-13T05:09:40.2067139Z     #5 0x7f82c003478c in 
nmethod::nmethod(Method*, CompilerType, int, int, int, CodeOffsets*, int, 
DebugInformationRecorder*, Dependencies*, CodeBuffer*, int, OopMapSet*, 
ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, int, 
_jobject*, _jobject*) 
(/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.28-6/x64/lib/server/libjvm.so+0xc3478c)
   ```
   
   </details>
   
   [11_binding_cpp _ ubuntu-latest _ hdfs _ 
hdfs_cluster.txt](https://github.com/user-attachments/files/21765203/11_binding_cpp._.ubuntu-latest._.hdfs._.hdfs_cluster.txt)
   
   <details>
   <summary>part of monoiofs LSan report</summary>
   
   ```log
   2025-08-13T05:07:03.2798894Z 
=================================================================
   2025-08-13T05:07:03.2799489Z ==7198==ERROR: LeakSanitizer: detected memory 
leaks
   2025-08-13T05:07:03.2799769Z 
   2025-08-13T05:07:03.2799985Z Direct leak of 624 byte(s) in 39 object(s) 
allocated from:
   2025-08-13T05:07:03.2808571Z     #0 0x5555c5b6e2e3 in malloc 
(/home/runner/work/opendal/opendal/bindings/cpp/build/opendal_cpp_test+0x1a92e3)
 (BuildId: 89023b13fb8a21f8cf6927e999036acdef5e2d36)
   2025-08-13T05:07:03.2810131Z     #1 0x5555c600ebae in 
alloc::alloc::alloc::hc8dcb7ce11349a10 
/rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/alloc/src/alloc.rs:94:9
   2025-08-13T05:07:03.2811617Z     #2 0x5555c600ebae in 
alloc::alloc::Global::alloc_impl::h261e52c6291fe15f 
/rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/alloc/src/alloc.rs:189:73
   2025-08-13T05:07:03.2813064Z     #3 0x5555c600ebae in 
_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::heff4d61c28958be1
 
/rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/alloc/src/alloc.rs:250:14
   2025-08-13T05:07:03.2814829Z     #4 0x5555c600ebae in 
alloc::alloc::exchange_malloc::h7e2bceb9247f6c38 
/rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/alloc/src/alloc.rs:351:18
   2025-08-13T05:07:03.2816553Z     #5 0x5555c600ebae in 
alloc::boxed::Box$LT$T$GT$::new::h30a0290c6bdd8198 
/rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library/alloc/src/boxed.rs:261:16
   2025-08-13T05:07:03.2818817Z     #6 0x5555c600ebae in 
monoio::driver::uring::IoUringDriver::new_with_entries::h351fa749fad67100 
/home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/monoio-0.2.4/src/driver/uring/mod.rs:157:33
   ```
   
   </details>
   
   [12_binding_cpp _ ubuntu-latest _ monoiofs _ 
monoiofs.txt](https://github.com/user-attachments/files/21765206/12_binding_cpp._.ubuntu-latest._.monoiofs._.monoiofs.txt)
   
   ### Steps to Reproduce
   
   - Trigger GitHub Actions CI for the C++ bindings (default matrix).
   - Check the job logs.
   
   ### Expected Behavior
   
   - No memory leaks reported by LeakSanitizer.
   - CI passes without leak-related failures.
   
   ### Additional Context
   
   Related to PR #6503 and issue #6250
   
   @asukaminato0721 Please add labels: bindings/cpp
   
   
   ### Are you willing to submit a PR to fix this bug?
   
   - [ ] Yes, I would like to submit a PR.


-- 
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: commits-unsubscr...@opendal.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to