Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add checking with valgrind #67

Closed
wants to merge 1 commit into from

Conversation

masterleinad
Copy link
Collaborator

Fixes #64.

@aprokop
Copy link
Contributor

aprokop commented May 19, 2019

So memcheck runs but produces:

-- Processing memory checking output:
2/14 MemCheck: #2: ArborX_DetailsUtils .......................   Defects: 8
4/14 MemCheck: #4: ArborX_LinearBVH ..........................   Defects: 8
5/14 MemCheck: #5: ArborX_DetailsTreeConstruction ............   Defects: 8
7/14 MemCheck: #7: ArborX_DetailsTreeTraversal ...............   Defects: 8
8/14 MemCheck: #8: ArborX_DetailsBatchedQueries ..............   Defects: 8
9/14 MemCheck: #9: ArborX_DistributedSearchTree ..............   Defects: 174
10/14 MemCheck: #10: ArborX_DetailsDistributedSearchTreeImpl ...   Defects: 8
11/14 MemCheck: #11: ArborX_BoostAdapters ......................   Defects: 8
12/14 MemCheck: #12: ArborX_BoundingVolumeHierarchy_Example ....   Defects: 11
13/14 MemCheck: #13: ArborX_DistributedTree_Example ............   Defects: 174
14/14 MemCheck: #14: ArborX_TreeViz_Example ....................   Defects: 8
MemCheck log files can be found here: ( * corresponds to test number)
/var/jenkins/workspace/ArborX-experimental_PR-67/build/Testing/Temporary/MemoryChecker.*.log
Memory checking results:
Memory Leak - 293
Potential Memory Leak - 121
Invalid syscall param - 9

@masterleinad
Copy link
Collaborator Author

Locally, I see the usual OpenMPI problems when running valgrind on the MPI tests (but only for them). I am not sure what the problem with the other tests we see here is.

@masterleinad
Copy link
Collaborator Author

We get a lot of

==1037== 1,360 bytes in 10 blocks are possibly lost in loss record 1,230 of 1,489
==1037==    at 0x4C31B25: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==1037==    by 0xA7A7D02: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA7A8330: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA7A88E4: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA80C146: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA80C3E7: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA5F57E9: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA6D99CE: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA700632: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA63DA97: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0xA63E183: ??? (in /usr/lib/x86_64-linux-gnu/libcuda.so.418.67)
==1037==    by 0x53361E6: ??? (in /usr/local/cuda-9.2/targets/x86_64-linux/lib/libcudart.so.9.2.148)

@dalg24
Copy link
Contributor

dalg24 commented May 20, 2019

We can add a suppression file for these

@@ -1,3 +1,12 @@
IF(ArborX_TEST_MEMORY)
FIND_PROGRAM(MEMORYCHECK_COMMAND NAMES valgrind)
IF(MEMORYCOMMAND MATCHES "-NOTFOUND")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo. You'd have caught it if you did if(VAR)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also use lowercase for CMake calls for consistency

"Memory checking in tests enabled but could not find the valgrind "
"executable. Please install valgrind.")
ENDIF()
SET(CTEST_MEMORYCHECK_COMMAND "${MEMORYCHECK_COMMAND}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this variable is needed at all if we do ctest -T MemCheck?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought so, but it seems to run without it as well now.

@masterleinad
Copy link
Collaborator Author

Documenting:

export LSAN_OPTIONS=suppressions=/tmp/ArborX/memory_blacklist.txt

where memory_blacklist.txt contains

leak:libmpi.so (effect?)
leak:libopen-pal.so
leak:exe (effect?)

@aprokop aprokop added this to the Release 1.0 milestone Oct 16, 2019
@aprokop
Copy link
Contributor

aprokop commented Oct 17, 2019

Do we want to merge this?

@aprokop aprokop added the testing Anything to do with tests and CI label Oct 25, 2019
@aprokop
Copy link
Contributor

aprokop commented Jul 27, 2020

Closing as no there has been no activity or interest in the past 8 months. Reopen as needed.

@aprokop aprokop closed this Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Anything to do with tests and CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add fsanitize testing
3 participants