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

Errors happen when doing make test #121

Open
stmatengss opened this issue May 26, 2018 · 4 comments
Open

Errors happen when doing make test #121

stmatengss opened this issue May 26, 2018 · 4 comments

Comments

@stmatengss
Copy link

I plan to migrate these data structures to hpx [https://github.com/STEllAR-GROUP/hpx] (a GSoC project).
I want to test the performance of libcds, so I run these test cases in test directory.
Unfortunately, there are some scenarios cannot pass the tests, I guess maybe I adopt a un-correct method to compile libcds.

The following tests FAILED:
         31 - unit-set-skip (OTHER_FAULT)
         33 - unit-set-split-lazy (SEGFAULT)
         38 - unit-tree (SEGFAULT)
         40 - stress-map-delodd (OTHER_FAULT)
         41 - stress-map-del3 (OTHER_FAULT)
         42 - stress-map-find-string (OTHER_FAULT)
         43 - stress-map-insdel-func (OTHER_FAULT)
         44 - stress-map-insdel-string (OTHER_FAULT)
         45 - stress-map-insdel-item-int (OTHER_FAULT)
         46 - stress-map-insdelfind-hp (OTHER_FAULT)
         48 - stress-map-minmax (OTHER_FAULT)
         49 - stress-map-iter-erase (OTHER_FAULT)
         50 - stress-pqueue (OTHER_FAULT)
         51 - stress-queue-pop (SEGFAULT)
         52 - stress-queue-push (SEGFAULT)
         53 - stress-queue-push-pop (SEGFAULT)
         54 - stress-queue-random (OTHER_FAULT)
         57 - stress-set-delodd (OTHER_FAULT)
         58 - stress-set-del3 (SEGFAULT)
         59 - stress-set-insdelfind-hp (OTHER_FAULT)
         62 - stress-set-insdel-func (OTHER_FAULT)
         63 - stress-set-insdel-string (OTHER_FAULT)
         64 - stress-set-iteration (SEGFAULT)
         65 - stress-set-iter-erase (SEGFAULT)
         66 - stress-stack (OTHER_FAULT)

There are three main factors to cause errors.

1. *** Error in `/home/mateng/GSoC/libcds-release/bin/unit-tree': malloc(): smallbin double linked list corrupted: 0x00000000035e1370
 ***
2. *** Error in `/home/mateng/GSoC/libcds-release/bin/stress-map-iter-erase': malloc(): memory corruption (fast): 0x00002ba53801d510 
3. *** Error in `/home/mateng/GSoC/libcds-release/bin/stress-pqueue': corrupted size vs. prev_size: 0x0000000000ddaae0 ***

So can someone help me to solve these issues? I will be appreciated.

@khizmax
Copy link
Owner

khizmax commented May 26, 2018

How do you compile the library?

@stmatengss
Copy link
Author

I first run cmake . and make a new release directory. Then I make all to install this library.
These are configurations.

Build type -- RELEASE
Compiler version: GNU 4.8.5
System: Linux version: 3.13.0-35-generic
Target architecture: x86_64
Compiler flags:  -O3 -DNDEBUG -std=c++11;-mcx16 -Wall;-Wextra;-pedantic
Exe flags: 
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   system
--   thread
--   chrono
--   date_time
--   atomic
Boost: 1_60 in /home/mateng/boost/boost_1_60_0, lib /home/mateng/boost/boost_1_60_0/stage/
lib
GTest: /usr/include, lib: /usr/local/lib/libgtest.a

@khizmax
Copy link
Owner

khizmax commented May 30, 2018

Hmm... Your trouble is a surprise for me... I have no reasonable answer. I suspect, the cause is some kind of misconfiguration in your environment.
To find solution, get latest Clang or GCC, build libcds with asan instrumentation and run the test.

Example:

cmake -G "Unix Makefiles" \
 -DCMAKE_BUILD_TYPE=RELEASE \
 -DCMAKE_C_COMPILER=$CLANG6_ROOT/bin/clang \
 -DCMAKE_CXX_COMPILER=$CLANG6_ROOT/bin/clang++ \
 -DCMAKE_CXX_FLAGS="-stdlib=libc++ -Wdocumentation -std=c++17" \
 -DCMAKE_EXE_LINKER_FLAGS="-L$CLANG6_ROOT/lib -Wl,-rpath=$CLANG6_ROOT/lib" \
 -DCDS_BIN_DIR=$BIN_ROOT \
 -DWITH_TESTS=ON \
 -DWITH_ASAN=ON \
 -DBOOST_ROOT=$LIB_ROOT/boost_1_65_1 \
 -DBOOST_LIBRARYDIR=$LIB_ROOT/boost_1_65_1/stage64-clang6-asan/lib \
 -DGTEST_INCLUDE_DIRS=$GTEST_ROOT/googletest/include \
 -DGTEST_LIBRARIES=$GTEST_ROOT/lib-clang6/libgtest.a \
 $CDS_SOURCE && \
make -j 10

@stmatengss
Copy link
Author

Thx for your help. I will try it again or make tests on another platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants