[ 
https://issues.apache.org/jira/browse/ARROW-2561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16475826#comment-16475826
 ] 

Antoine Pitrou commented on ARROW-2561:
---------------------------------------

Here is the {{valgrind}} output for {{cuda-test}}:
https://gist.github.com/pitrou/bb4fee35c55f58818225bdfdace916f2

In short, it looks like some double-free in a static {{std::string}} in 
{{libarrow.so}}. Most probably some C++ shared / static library issue. The 
following patch seems to fix things here, but I'm not sure how correct is. What 
do you think?

{code}
diff --git a/cpp/src/arrow/gpu/CMakeLists.txt b/cpp/src/arrow/gpu/CMakeLists.txt
index be47413..7a019db 100644
--- a/cpp/src/arrow/gpu/CMakeLists.txt
+++ b/cpp/src/arrow/gpu/CMakeLists.txt
@@ -43,7 +43,7 @@ ADD_ARROW_LIB(arrow_gpu
   DEPENDENCIES metadata_fbs
   SHARED_LINK_FLAGS ""
   SHARED_LINK_LIBS ${ARROW_GPU_SHARED_LINK_LIBS}
-  STATIC_LINK_LIBS ""
+  STATIC_LINK_LIBS ${ARROW_GPU_SHARED_LINK_LIBS}
 )
 
 # CUDA build version
@@ -72,7 +72,7 @@ install(
   DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
 
 set(ARROW_GPU_TEST_LINK_LIBS
-  arrow_gpu_shared
+  arrow_gpu_static
   ${ARROW_TEST_LINK_LIBS})
 
 if (ARROW_BUILD_TESTS)
{code}

> [C++] Crash in cuda-test shutdown with coverage enabled
> -------------------------------------------------------
>
>                 Key: ARROW-2561
>                 URL: https://issues.apache.org/jira/browse/ARROW-2561
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, GPU
>    Affects Versions: 0.9.0
>            Reporter: Antoine Pitrou
>            Priority: Major
>
> If I enable both CUDA and code coverage (using 
> {{-DARROW_GENERATE_COVERAGE=on}}), {{cuda-test}} sometimes crashes at 
> shutdown with the following message:
> {code}
> *** Error in `./build-test/debug/cuda-test': corrupted size vs. prev_size: 
> 0x0000000001612bb0 ***
> ======= Backtrace: =========
> /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fc3d61e47e5]
> /lib/x86_64-linux-gnu/libc.so.6(+0x7e9dc)[0x7fc3d61eb9dc]
> /lib/x86_64-linux-gnu/libc.so.6(+0x81cde)[0x7fc3d61eecde]
> /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7fc3d61f1184]
> /home/antoine/arrow/cpp/build-test/debug/libarrow.so.10(+0x9350f3)[0x7fc3d5a510f3]
> /lib/x86_64-linux-gnu/libc.so.6(__cxa_finalize+0x9a)[0x7fc3d61a736a]
> /home/antoine/arrow/cpp/build-test/debug/libarrow.so.10(+0x3415e3)[0x7fc3d545d5e3]
> {code}
> (the CUDA tests themselves pass)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to