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

Make Check Fails on Ubuntu Mate 16.04 (64 bit) #440

Closed
pmalek opened this issue Jul 17, 2016 · 9 comments
Closed

Make Check Fails on Ubuntu Mate 16.04 (64 bit) #440

pmalek opened this issue Jul 17, 2016 · 9 comments

Comments

@pmalek
Copy link

pmalek commented Jul 17, 2016

Using gcc 5.4.0 and boost 1.58.0 (folly @ 92fd108 )

(It might be relevant that I run this in VirtualBox 5.0.10)

Making check in .
make[1]: Entering directory '/home/patryk/workspace/folly/folly'
make[1]: Leaving directory '/home/patryk/workspace/folly/folly'
Making check in test
make[1]: Entering directory '/home/patryk/workspace/folly/folly/test'
Making check in .
make[2]: Entering directory '/home/patryk/workspace/folly/folly/test'
make  libfollytestmain.la libgtest.la foreach_benchmark benchmark_test concurrent_skiplist_benchmark conv_benchmark sorted_vector_types_test foreach_test hash_test timeout_queue_test conv_test range_test bits_test bit_iterator_test spin_lock_test array_test small_locks_test packed_sync_ptr_test small_vector_test discriminated_ptr_test cpuid_test fbstring_test_using_jemalloc thread_cached_int_test thread_local_test fbvector_test dynamic_test json_test scope_guard_test endian_test rw_spinlock_test synchronized_test lock_traits_test concurrent_skiplist_test histogram_test group_varint_test map_util_test string_test conditionally_existent_test producer_consumer_queue_test atomic_hash_array_test atomic_hash_map_test format_test fingerprint_test portability_test spooky_hash_v1_test spooky_hash_v2_test token_bucket_test thread_name_test indestructible_test portability_time_test try_test unit_test futures_test function_test ssl_test
make[3]: Entering directory '/home/patryk/workspace/folly/folly/test'
make[3]: 'libfollytestmain.la' is up to date.
make[3]: 'libgtest.la' is up to date.
make[3]: 'foreach_benchmark' is up to date.
make[3]: 'benchmark_test' is up to date.
make[3]: 'concurrent_skiplist_benchmark' is up to date.
make[3]: 'conv_benchmark' is up to date.
make[3]: 'sorted_vector_types_test' is up to date.
make[3]: 'foreach_test' is up to date.
make[3]: 'hash_test' is up to date.
make[3]: 'timeout_queue_test' is up to date.
make[3]: 'conv_test' is up to date.
make[3]: 'range_test' is up to date.
make[3]: 'bits_test' is up to date.
make[3]: 'bit_iterator_test' is up to date.
make[3]: 'spin_lock_test' is up to date.
make[3]: 'array_test' is up to date.
make[3]: 'small_locks_test' is up to date.
make[3]: 'packed_sync_ptr_test' is up to date.
make[3]: 'small_vector_test' is up to date.
make[3]: 'discriminated_ptr_test' is up to date.
make[3]: 'cpuid_test' is up to date.
make[3]: 'fbstring_test_using_jemalloc' is up to date.
make[3]: 'thread_cached_int_test' is up to date.
make[3]: 'thread_local_test' is up to date.
make[3]: 'fbvector_test' is up to date.
make[3]: 'dynamic_test' is up to date.
make[3]: 'json_test' is up to date.
make[3]: 'scope_guard_test' is up to date.
make[3]: 'endian_test' is up to date.
make[3]: 'rw_spinlock_test' is up to date.
make[3]: 'synchronized_test' is up to date.
make[3]: 'lock_traits_test' is up to date.
make[3]: 'concurrent_skiplist_test' is up to date.
make[3]: 'histogram_test' is up to date.
make[3]: 'group_varint_test' is up to date.
make[3]: 'map_util_test' is up to date.
make[3]: 'string_test' is up to date.
make[3]: 'conditionally_existent_test' is up to date.
make[3]: 'producer_consumer_queue_test' is up to date.
make[3]: 'atomic_hash_array_test' is up to date.
make[3]: 'atomic_hash_map_test' is up to date.
make[3]: 'format_test' is up to date.
make[3]: 'fingerprint_test' is up to date.
make[3]: 'portability_test' is up to date.
make[3]: 'spooky_hash_v1_test' is up to date.
make[3]: 'spooky_hash_v2_test' is up to date.
make[3]: 'token_bucket_test' is up to date.
make[3]: 'thread_name_test' is up to date.
make[3]: 'indestructible_test' is up to date.
make[3]: 'portability_time_test' is up to date.
make[3]: 'try_test' is up to date.
make[3]: 'unit_test' is up to date.
make[3]: 'futures_test' is up to date.
make[3]: 'function_test' is up to date.
make[3]: 'ssl_test' is up to date.
make[3]: Leaving directory '/home/patryk/workspace/folly/folly/test'
make  check-TESTS
make[3]: Entering directory '/home/patryk/workspace/folly/folly/test'
make[4]: Entering directory '/home/patryk/workspace/folly/folly/test'
PASS: sorted_vector_types_test
PASS: foreach_test
PASS: hash_test
PASS: timeout_queue_test
PASS: conv_test
../build-aux/test-driver: line 107:  2236 Aborted                 "$@" > $log_file 2>&1
FAIL: range_test
PASS: bits_test
PASS: bit_iterator_test
PASS: spin_lock_test
PASS: array_test
PASS: small_locks_test
PASS: packed_sync_ptr_test
PASS: small_vector_test
PASS: discriminated_ptr_test
PASS: cpuid_test
PASS: fbstring_test_using_jemalloc
PASS: thread_cached_int_test
PASS: thread_local_test
PASS: fbvector_test
PASS: dynamic_test
PASS: json_test
PASS: scope_guard_test
PASS: endian_test
PASS: rw_spinlock_test
PASS: synchronized_test
PASS: lock_traits_test
PASS: concurrent_skiplist_test
PASS: histogram_test
PASS: group_varint_test
PASS: map_util_test
PASS: string_test
PASS: conditionally_existent_test
PASS: producer_consumer_queue_test
PASS: atomic_hash_array_test
PASS: atomic_hash_map_test
PASS: format_test
PASS: fingerprint_test
PASS: portability_test
PASS: spooky_hash_v1_test
PASS: spooky_hash_v2_test
PASS: token_bucket_test
PASS: thread_name_test
PASS: indestructible_test
PASS: portability_time_test
PASS: try_test
PASS: unit_test
../build-aux/test-driver: line 107: 17941 Segmentation fault      "$@" > $log_file 2>&1
FAIL: futures_test
PASS: function_test
PASS: ssl_test
============================================================================
Testsuite summary for folly 57.0
============================================================================
# TOTAL: 49
# PASS:  47
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0
============================================================================
See test/test-suite.log
Please report to [email protected]
============================================================================
Makefile:1839: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1
make[4]: Leaving directory '/home/patryk/workspace/folly/folly/test'
Makefile:1945: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 2
make[3]: Leaving directory '/home/patryk/workspace/folly/folly/test'
Makefile:2379: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/home/patryk/workspace/folly/folly/test'
Makefile:1732: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/patryk/workspace/folly/folly/test'
Makefile:1534: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

test/test-suite.log

=====================================
   folly 57.0: test/test-suite.log
=====================================

# TOTAL: 49
# PASS:  47
# SKIP:  0
# XFAIL: 0
# FAIL:  2
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: range_test
================

Running main() from gtest_main.cc
[==========] Running 48 tests from 10 test cases.
[----------] Global test environment set-up.
[----------] 17 tests from StringPiece
[ RUN      ] StringPiece.All
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0717 13:25:09.028038  2236 RangeSse42.cpp:32] Check failed: false Function qfind_first_byte_of_sse42 only works with SSE42!
*** Check failure stack trace: ***
FAIL range_test (exit status: 134)

FAIL: futures_test
==================

Running main() from gtest_main.cc
[==========] Running 222 tests from 33 test cases.
[----------] Global test environment set-up.
[----------] 18 tests from Collect
[ RUN      ] Collect.collectAll
[       OK ] Collect.collectAll (0 ms)
[ RUN      ] Collect.collect
[       OK ] Collect.collect (0 ms)
[ RUN      ] Collect.collectNotDefaultConstructible
[       OK ] Collect.collectNotDefaultConstructible (0 ms)
[ RUN      ] Collect.collectAny
[       OK ] Collect.collectAny (0 ms)
[ RUN      ] Collect.alreadyCompleted
[       OK ] Collect.alreadyCompleted (0 ms)
[ RUN      ] Collect.parallel
[       OK ] Collect.parallel (0 ms)
[ RUN      ] Collect.parallelWithError
[       OK ] Collect.parallelWithError (1 ms)
[ RUN      ] Collect.allParallel
[       OK ] Collect.allParallel (0 ms)
[ RUN      ] Collect.allParallelWithError
[       OK ] Collect.allParallelWithError (0 ms)
[ RUN      ] Collect.collectN
[       OK ] Collect.collectN (0 ms)
[ RUN      ] Collect.smallVector
[       OK ] Collect.smallVector (0 ms)
[ RUN      ] Collect.collectAllVariadic
[       OK ] Collect.collectAllVariadic (0 ms)
[ RUN      ] Collect.collectAllVariadicReferences
[       OK ] Collect.collectAllVariadicReferences (0 ms)
[ RUN      ] Collect.collectAllVariadicWithException
[       OK ] Collect.collectAllVariadicWithException (0 ms)
[ RUN      ] Collect.collectVariadic
[       OK ] Collect.collectVariadic (0 ms)
[ RUN      ] Collect.collectVariadicWithException
[       OK ] Collect.collectVariadicWithException (0 ms)
[ RUN      ] Collect.collectAllNone
[       OK ] Collect.collectAllNone (0 ms)
[ RUN      ] Collect.noDefaultConstructor
[       OK ] Collect.noDefaultConstructor (0 ms)
[----------] 18 tests from Collect (1 ms total)

[----------] 1 test from Context
[ RUN      ] Context.basic
[       OK ] Context.basic (0 ms)
[----------] 1 test from Context (0 ms total)

[----------] 3 tests from Convert
[ RUN      ] Convert.subclassConstruct
[       OK ] Convert.subclassConstruct (0 ms)
[ RUN      ] Convert.subclassAssign
[       OK ] Convert.subclassAssign (0 ms)
[ RUN      ] Convert.ConversionTests
[       OK ] Convert.ConversionTests (0 ms)
[----------] 3 tests from Convert (0 ms total)

[----------] 1 test from Core
[ RUN      ] Core.size
[       OK ] Core.size (0 ms)
[----------] 1 test from Core (0 ms total)

[----------] 2 tests from Ensure
[ RUN      ] Ensure.basic
[       OK ] Ensure.basic (0 ms)
[ RUN      ] Ensure.mutableLambda
[       OK ] Ensure.mutableLambda (0 ms)
[----------] 2 tests from Ensure (1 ms total)

[----------] 10 tests from ManualExecutor
[ RUN      ] ManualExecutor.runIsStable
[       OK ] ManualExecutor.runIsStable (0 ms)
[ RUN      ] ManualExecutor.scheduleDur
[       OK ] ManualExecutor.scheduleDur (0 ms)
[ RUN      ] ManualExecutor.clockStartsAt0
[       OK ] ManualExecutor.clockStartsAt0 (0 ms)
[ RUN      ] ManualExecutor.scheduleAbs
[       OK ] ManualExecutor.scheduleAbs (0 ms)
[ RUN      ] ManualExecutor.advanceTo
[       OK ] ManualExecutor.advanceTo (0 ms)
[ RUN      ] ManualExecutor.advanceBack
[       OK ] ManualExecutor.advanceBack (0 ms)
[ RUN      ] ManualExecutor.advanceNeg
[       OK ] ManualExecutor.advanceNeg (0 ms)
[ RUN      ] ManualExecutor.waitForDoesNotDeadlock
[       OK ] ManualExecutor.waitForDoesNotDeadlock (0 ms)
[ RUN      ] ManualExecutor.getViaDoesNotDeadlock
[       OK ] ManualExecutor.getViaDoesNotDeadlock (0 ms)
[ RUN      ] ManualExecutor.clear
[       OK ] ManualExecutor.clear (0 ms)
[----------] 10 tests from ManualExecutor (0 ms total)

[----------] 6 tests from Executor
[ RUN      ] Executor.InlineExecutor
[       OK ] Executor.InlineExecutor (0 ms)
[ RUN      ] Executor.QueuedImmediateExecutor
[       OK ] Executor.QueuedImmediateExecutor (0 ms)
[ RUN      ] Executor.Runnable
[       OK ] Executor.Runnable (0 ms)
[ RUN      ] Executor.RunnablePtr
[       OK ] Executor.RunnablePtr (0 ms)
[ RUN      ] Executor.ThrowableThen
[       OK ] Executor.ThrowableThen (0 ms)
[ RUN      ] Executor.CrappyExecutor
[       OK ] Executor.CrappyExecutor (0 ms)
[----------] 6 tests from Executor (0 ms total)

[----------] 8 tests from FSM
[ RUN      ] FSM.example
[       OK ] FSM.example (0 ms)
[ RUN      ] FSM.magicMacrosExample
[       OK ] FSM.magicMacrosExample (0 ms)
[ RUN      ] FSM.ctor
[       OK ] FSM.ctor (0 ms)
[ RUN      ] FSM.update
[       OK ] FSM.update (0 ms)
[ RUN      ] FSM.badUpdate
[       OK ] FSM.badUpdate (0 ms)
[ RUN      ] FSM.actionOnUpdate
[       OK ] FSM.actionOnUpdate (0 ms)
[ RUN      ] FSM.noActionOnBadUpdate
[       OK ] FSM.noActionOnBadUpdate (0 ms)
[ RUN      ] FSM.stateTransitionAfterAction
[       OK ] FSM.stateTransitionAfterAction (0 ms)
[----------] 8 tests from FSM (0 ms total)

[----------] 3 tests from Filter
[ RUN      ] Filter.alwaysTrye
[       OK ] Filter.alwaysTrye (0 ms)
[ RUN      ] Filter.alwaysFalse
[       OK ] Filter.alwaysFalse (0 ms)
[ RUN      ] Filter.moveOnlyValue
[       OK ] Filter.moveOnlyValue (0 ms)
[----------] 3 tests from Filter (0 ms total)

[----------] 37 tests from Future
[ RUN      ] Future.futureDefaultCtor
[       OK ] Future.futureDefaultCtor (0 ms)
[ RUN      ] Future.futureToUnit
[       OK ] Future.futureToUnit (0 ms)
[ RUN      ] Future.voidFutureToUnit
[       OK ] Future.voidFutureToUnit (0 ms)
[ RUN      ] Future.unitFutureToUnitIdentity
[       OK ] Future.unitFutureToUnitIdentity (0 ms)
[ RUN      ] Future.toUnitWhileInProgress
[       OK ] Future.toUnitWhileInProgress (0 ms)
[ RUN      ] Future.makeFutureWithUnit
[       OK ] Future.makeFutureWithUnit (0 ms)
[ RUN      ] Future.onError
[       OK ] Future.onError (0 ms)
[ RUN      ] Future.special
[       OK ] Future.special (0 ms)
[ RUN      ] Future.then
[       OK ] Future.then (0 ms)
[ RUN      ] Future.thenTry
[       OK ] Future.thenTry (0 ms)
[ RUN      ] Future.thenValue
[       OK ] Future.thenValue (0 ms)
[ RUN      ] Future.thenValueFuture
[       OK ] Future.thenValueFuture (0 ms)
[ RUN      ] Future.thenFunction
[       OK ] Future.thenFunction (0 ms)
[ RUN      ] Future.thenFunctionFuture
[       OK ] Future.thenFunctionFuture (0 ms)
[ RUN      ] Future.thenStdFunction
[       OK ] Future.thenStdFunction (0 ms)
[ RUN      ] Future.thenBind
[       OK ] Future.thenBind (0 ms)
[ RUN      ] Future.thenBindTry
[       OK ] Future.thenBindTry (0 ms)
[ RUN      ] Future.value
[       OK ] Future.value (0 ms)
[ RUN      ] Future.isReady
[       OK ] Future.isReady (0 ms)
[ RUN      ] Future.futureNotReady
[       OK ] Future.futureNotReady (0 ms)
[ RUN      ] Future.hasException
[       OK ] Future.hasException (0 ms)
[ RUN      ] Future.hasValue
[       OK ] Future.hasValue (0 ms)
[ RUN      ] Future.makeFuture
[       OK ] Future.makeFuture (1 ms)
[ RUN      ] Future.finish
[       OK ] Future.finish (0 ms)
[ RUN      ] Future.finishBigLambda
[       OK ] Future.finishBigLambda (0 ms)
[ RUN      ] Future.unwrap
[       OK ] Future.unwrap (0 ms)
[ RUN      ] Future.throwCaughtInImmediateThen
[       OK ] Future.throwCaughtInImmediateThen (0 ms)
[ RUN      ] Future.throwIfFailed
[       OK ] Future.throwIfFailed (0 ms)
[ RUN      ] Future.getFutureAfterSetValue
[       OK ] Future.getFutureAfterSetValue (0 ms)
[ RUN      ] Future.getFutureAfterSetException
[       OK ] Future.getFutureAfterSetException (0 ms)
[ RUN      ] Future.detachRace
[       OK ] Future.detachRace (0 ms)
[ RUN      ] Future.CircularDependencySharedPtrSelfReset
[       OK ] Future.CircularDependencySharedPtrSelfReset (0 ms)
[ RUN      ] Future.Constructor
[       OK ] Future.Constructor (0 ms)
[ RUN      ] Future.ImplicitConstructor
[       OK ] Future.ImplicitConstructor (0 ms)
[ RUN      ] Future.thenDynamic
[       OK ] Future.thenDynamic (0 ms)
[ RUN      ] Future.RequestContext
FAIL futures_test (exit status: 139)
@Bklyn
Copy link

Bklyn commented Jul 17, 2016

Here's the stack trace from the failing code:

Thread 1 "lt-futures_test" received signal SIGSEGV, Segmentation fault.
0x00000000004413c2 in folly::detail::Core<int>::doCallback (this=this@entry=0x7ffff0c532a0)
    at ../../folly/futures/detail/Core.h:334
334         if (LIKELY(x->getNumPriorities() == 1)) {
(gdb) where
#0  0x00000000004413c2 in folly::detail::Core<int>::doCallback (this=this@entry=0x7ffff0c532a0)
    at ../../folly/futures/detail/Core.h:334
#1  0x000000000044178d in folly::detail::Core<int>::maybeCallback()::{lambda()#2}::operator()() const (__closure=<optimized out>)
    at ../../folly/futures/detail/Core.h:308
#2  folly::detail::FSM<folly::detail::State>::updateState<folly::detail::Core<int>::maybeCallback()::{lambda()#1}, folly::detail::Core<int>::maybeCallback()::{lambda()#2}>(folly::detail::State, folly::detail::State, folly::detail::Core<int>::maybeCallback()::{lambda()#1} const&, folly::detail::Core<int>::maybeCallback()::{lambda()#2} const&) (protectedAction=..., unprotectedAction=..., 
    B=folly::detail::State::Done, A=folly::detail::State::Armed, this=0x7ffff0c532f8) at ../../folly/futures/detail/FSM.h:100
#3  folly::detail::Core<int>::maybeCallback (this=this@entry=0x7ffff0c532a0) at ../../folly/futures/detail/Core.h:308
#4  0x00000000004418c2 in folly::detail::Core<int>::setResult(folly::Try<int>&&) (this=0x7ffff0c532a0, 
    t=t@entry=<unknown type in /home/cae/src/folly/folly/test/.libs/lt-futures_test, CU 0x0, DIE 0x13a0c9>)
    at ../../folly/futures/detail/Core.h:203
#5  0x000000000047f1ef in folly::Promise<int>::setTry(folly::Try<int>&&) (
    t=<unknown type in /home/cae/src/folly/folly/test/.libs/lt-futures_test, CU 0x47e2b3, DIE 0x5331c2>, this=<optimized out>)
    at ../../folly/futures/Promise-inl.h:117
#6  folly::Promise<int>::setValue<int>(int&&) (this=this@entry=0x7fffffffda90, v=<optimized out>)
    at ../../folly/futures/Promise-inl.h:126
#7  0x000000000049b0e8 in Future_RequestContext_Test::TestBody (this=<optimized out>) at ../futures/test/FutureTest.cpp:852
#8  0x00000000005b1d23 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (
    location=0x5e550d "the test body", method=<optimized out>, object=<optimized out>) at gtest-1.7.0/src/gtest.cc:2078
#9  testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=object@entry=0x7ffff0c58590, 
    method=(void (testing::Test::*)(testing::Test * const)) 0x49a9a0 <Future_RequestContext_Test::TestBody()>, 
    location=location@entry=0x5e550d "the test body") at gtest-1.7.0/src/gtest.cc:2114
#10 0x00000000005aa21a in testing::Test::Run (this=0x7ffff0c58590) at gtest-1.7.0/src/gtest.cc:2151
#11 0x00000000005aa368 in testing::TestInfo::Run (this=0x7ffff0ec80c0) at gtest-1.7.0/src/gtest.cc:2326
#12 0x00000000005aa445 in testing::TestCase::Run (this=0x7ffff0c4ff00) at gtest-1.7.0/src/gtest.cc:2444
#13 0x00000000005aa70f in testing::internal::UnitTestImpl::RunAllTests (this=0x7ffff0c43300) at gtest-1.7.0/src/gtest.cc:4315
#14 0x00000000005b2203 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (
    location=0x5e4920 "auxiliary test code (environments or event listeners)", method=<optimized out>, object=<optimized out>)
    at gtest-1.7.0/src/gtest.cc:2078
#15 testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x7ffff0c43300, 
    method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 0x5aa4d0 <testing::internal::UnitTestImpl::RunAllTests()>, location=location@entry=0x5e4920 "auxiliary test code (environments or event listeners)")
    at gtest-1.7.0/src/gtest.cc:2114
#16 0x00000000005aaa30 in testing::UnitTest::Run (this=0x84cfa0 <testing::UnitTest::GetInstance()::instance>)
    at gtest-1.7.0/src/gtest.cc:3926
#17 0x0000000000421567 in RUN_ALL_TESTS () at gtest-1.7.0/include/gtest/gtest.h:2288
#18 main (argc=1, argv=0x7fffffffde88) at common/TestMain.cpp:31

Naturally the virtual function getNumPrioroties causes a segfault since the Executor object has been destroyed. If you change the declaration of e to be outside the scope block (i.e. to match the scope of p1 and p2), the test passes.

Bklyn pushed a commit to Bklyn/folly that referenced this issue Jul 17, 2016
@pmalek
Copy link
Author

pmalek commented Jul 17, 2016

Perfect! I can confirm this fixes the issue

@pmalek
Copy link
Author

pmalek commented Jul 17, 2016

There is still this error in range test, stacktrace:

[0;32m[ RUN      ] [mStringPiece.All
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0717 18:23:59.223289 25733 RangeSse42.cpp:32] Check failed: false Function qfind_first_byte_of_sse42 only works with SSE42!
*** Check failure stack trace: ***

Program received signal SIGABRT, Aborted.
0x00007ffff6b1a418 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff6b1a418 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6b1c01a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff744fe49 in ?? () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#3  0x00007ffff74515cd in google::LogMessage::Fail() () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#4  0x00007ffff7453433 in google::LogMessage::SendToLog() () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#5  0x00007ffff745115b in google::LogMessage::Flush() () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#6  0x00007ffff7453e1e in google::LogMessageFatal::~LogMessageFatal() () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#7  0x00007ffff7adcb10 in folly::detail::qfind_first_byte_of_sse42 (haystack=..., needles=...) at detail/RangeSse42.cpp:32
#8  0x000000000041d642 in folly::detail::qfind_first_byte_of (needles=..., haystack=...) at ../../folly/Range.h:1031
#9  folly::qfind_first_of<char const*> (needles=<synthetic pointer>, haystack=...) at ../../folly/Range.h:1143
#10 folly::Range<char const*>::find_first_of (needles=..., this=0x7fffffffd9d0) at ../../folly/Range.h:532
#11 folly::Range<char const*>::find_first_of (needles=0x465568 "bar", this=0x7fffffffd9d0) at ../../folly/Range.h:543
#12 StringPiece_All_Test::TestBody (this=<optimized out>) at RangeTest.cpp:137
#13 0x000000000045e363 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (location=0x46b658 "the test body", method=<optimized out>, object=<optimized out>) at gtest-1
.7.0/src/gtest.cc:2078
#14 testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=object@entry=0x69cb30, method=(void (testing::Test::*)(testing::Test * const)) 0x41aa70 <StringPiece_All_Test::
TestBody()>, location=location@entry=0x46b658 "the test body") at gtest-1.7.0/src/gtest.cc:2114
#15 0x0000000000456a4a in testing::Test::Run (this=0x69cb30) at gtest-1.7.0/src/gtest.cc:2151
#16 0x0000000000456b98 in testing::TestInfo::Run (this=0x6976d0) at gtest-1.7.0/src/gtest.cc:2326
#17 0x0000000000456c75 in testing::TestCase::Run (this=0x697af0) at gtest-1.7.0/src/gtest.cc:2444
#18 0x0000000000456f3f in testing::internal::UnitTestImpl::RunAllTests (this=0x6977c0) at gtest-1.7.0/src/gtest.cc:4315
#19 0x000000000045e843 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (location=0x46aa80 "auxiliary test code (environments or event listeners)",
method=<optimized out>, object=<optimized out>) at gtest-1.7.0/src/gtest.cc:2078
#20 testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x6977c0, method=(bool (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl *
 const)) 0x456d00 <testing::internal::UnitTestImpl::RunAllTests()>, location=location@entry=0x46aa80 "auxiliary test code (environments or event listeners)") at gtest-1.7.0/src/gtest.cc:2114
#21 0x0000000000457260 in testing::UnitTest::Run (this=0x681c20 <testing::UnitTest::GetInstance()::instance>) at gtest-1.7.0/src/gtest.cc:3926
#22 0x0000000000406392 in RUN_ALL_TESTS () at gtest-1.7.0/include/gtest/gtest.h:2288
#23 main (argc=1, argv=0x7fffffffdff8) at gtest-1.7.0/src/gtest_main.cc:37

@Bklyn
Copy link

Bklyn commented Jul 18, 2016

Range test breakage looks like a separate issue. Don't piggy-back that on
#440.

On Sun, Jul 17, 2016 at 12:25 PM, Patryk Małek notifications-at-github.com
|github-*****| [email protected] wrote:

There is still this error in range test, stacktrace:

[0;32m[ RUN ] [mStringPiece.All
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0717 18:23:59.223289 25733 RangeSse42.cpp:32] Check failed: false Function qfind_first_byte_of_sse42 only works with SSE42!
*** Check failure stack trace: ***

Program received signal SIGABRT, Aborted.
0x00007ffff6b1a418 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff6b1a418 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff6b1c01a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff744fe49 in ?? () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#3 0x00007ffff74515cd in google::LogMessage::Fail() () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#4 0x00007ffff7453433 in google::LogMessage::SendToLog() () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#5 0x00007ffff745115b in google::LogMessage::Flush() () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#6 0x00007ffff7453e1e in google::LogMessageFatal::~LogMessageFatal() () from /usr/lib/x86_64-linux-gnu/libglog.so.0
#7 0x00007ffff7adcb10 in folly::detail::qfind_first_byte_of_sse42 (haystack=..., needles=...) at detail/RangeSse42.cpp:32
#8 0x000000000041d642 in folly::detail::qfind_first_byte_of (needles=..., haystack=...) at ../../folly/Range.h:1031
#9 folly::qfind_first_of<char const*> (needles=, haystack=...) at ../../folly/Range.h:1143
#10 folly::Range<char const*>::find_first_of (needles=..., this=0x7fffffffd9d0) at ../../folly/Range.h:532
#11 folly::Range<char const*>::find_first_of (needles=0x465568 "bar", this=0x7fffffffd9d0) at ../../folly/Range.h:543
#12 StringPiece_All_Test::TestBody (this=) at RangeTest.cpp:137
#13 0x000000000045e363 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> (location=0x46b658 "the test body", method=, object=) at gtest-1
.7.0/src/gtest.cc:2078
#14 testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> (object=object@entry=0x69cb30, method=(void (testing::Test::)(testing::Test * const)) 0x41aa70 <StringPiece_All_Test::
TestBody()>, location=location@entry=0x46b658 "the test body") at gtest-1.7.0/src/gtest.cc:2114
#15 0x0000000000456a4a in testing::Test::Run (this=0x69cb30) at gtest-1.7.0/src/gtest.cc:2151
#16 0x0000000000456b98 in testing::TestInfo::Run (this=0x6976d0) at gtest-1.7.0/src/gtest.cc:2326
#17 0x0000000000456c75 in testing::TestCase::Run (this=0x697af0) at gtest-1.7.0/src/gtest.cc:2444
#18 0x0000000000456f3f in testing::internal::UnitTestImpl::RunAllTests (this=0x6977c0) at gtest-1.7.0/src/gtest.cc:4315
#19 0x000000000045e843 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (location=0x46aa80 "auxiliary test code (environments or event listeners)",
method=, object=) at gtest-1.7.0/src/gtest.cc:2078
#20 testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (object=0x6977c0, method=(bool (testing::internal::UnitTestImpl::
)(testing::internal::UnitTestImpl *
const)) 0x456d00 testing::internal::UnitTestImpl::RunAllTests(), location=location@entry=0x46aa80 "auxiliary test code (environments or event listeners)") at gtest-1.7.0/src/gtest.cc:2114
#21 0x0000000000457260 in testing::UnitTest::Run (this=0x681c20 testing::UnitTest::GetInstance()::instance) at gtest-1.7.0/src/gtest.cc:3926
#22 0x0000000000406392 in RUN_ALL_TESTS () at gtest-1.7.0/include/gtest/gtest.h:2288
#23 main (argc=1, argv=0x7fffffffdff8) at gtest-1.7.0/src/gtest_main.cc:37


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#440 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAD6gELYZdySHxgDZk0wxnkL_johj17Cks5qWleBgaJpZM4JONU4
.

Caleb Epstein

@pmalek
Copy link
Author

pmalek commented Jul 18, 2016

I just wanted to mention that range_test fail was in my original post (you can observe 2 fails there not just one from future_test) so I believe this is the correct place for discussing those 2 issues (range_test and future_test)

@Bklyn
Copy link

Bklyn commented Jul 18, 2016

Fair enough. I missed the first failure. Anyway, range_test failure appears to be due to a mismatch in the way the library is compiled versus used at runtime. Unless you ask for a specific architecture build, the __SSE4_2__ preprocessor macro may not be defined and we get this code in the library (detail/RangeSse42.cpp):

     22 //  Essentially, two versions of this file: one with an SSE42 implementation
     23 //  and one with a fallback implementation. We determine which version to use by
     24 //  testing for the presence of the required headers.
     25 //
     26 //  TODO: Maybe this should be done by the build system....
     27 #if !FOLLY_SSE_PREREQ(4, 2)
     28 namespace folly {
     29 namespace detail {
     30 size_t qfind_first_byte_of_sse42(const StringPieceLite haystack,
     31                                  const StringPieceLite needles) {
     32   CHECK(false) << "Function " << __func__ << " only works with SSE42!";
     33   return qfind_first_byte_of_nosse(haystack, needles);
     34 }
     35 }
     36 }

But the calling code in Range.h does this check:

   1026 inline size_t qfind_first_byte_of(const StringPiece haystack,
   1027                                   const StringPiece needles) {
   1028   static auto const qfind_first_byte_of_fn =
   1029     folly::CpuId().sse42() ? qfind_first_byte_of_sse42
   1030                            : qfind_first_byte_of_nosse;
   1031   return qfind_first_byte_of_fn(haystack, needles);
   1032 }

So if my CPU supports SSE42 (detected at runtime), it may end up using a function implementation that was not generated at compile time.

It appears that adding an appropriate -march flag to the compiler (i.e. -march=native) fixes this, but you're left with code that may not run on all processors. The build time / run-time needs to be in better sync here.

@ehzawad
Copy link

ehzawad commented Aug 23, 2016

I am getting range_test error..

@ehzawad
Copy link

ehzawad commented Aug 23, 2016

I am running ubuntu 16.04 in vmware workstation 12

@Supremes
Copy link

do you fix it?
I also met just same problem like you.here are some part of my problems.

PASS: sorted_vector_types_test
PASS: foreach_test
PASS: hash_test
PASS: timeout_queue_test
PASS: conv_test
PASS: expected_test
PASS: range_test
PASS: math_test
PASS: bits_test
PASS: bit_iterator_test
PASS: spin_lock_test
PASS: array_test
PASS: small_locks_test
PASS: packed_sync_ptr_test
PASS: small_vector_test
PASS: discriminated_ptr_test
PASS: cpuid_test
PASS: fbstring_test_using_jemalloc
PASS: thread_id_test
PASS: thread_cached_int_test
PASS: thread_local_test
PASS: fbvector_test
PASS: dynamic_test
PASS: json_test
PASS: scope_guard_test
PASS: endian_test
PASS: rw_spinlock_test
PASS: synchronized_test
PASS: lock_traits_test
PASS: concurrent_skiplist_test
PASS: group_varint_test
PASS: map_util_test
PASS: string_test
PASS: producer_consumer_queue_test
PASS: atomic_hash_array_test
PASS: atomic_hash_map_test
PASS: chrono_test
PASS: format_test
PASS: fingerprint_test
PASS: portability_test
PASS: spooky_hash_v1_test
PASS: spooky_hash_v2_test
PASS: token_bucket_test
PASS: thread_name_test
PASS: indestructible_test
PASS: portability_clock_gettime_wrappers_test
PASS: portability_time_test
PASS: portability_constexpr_test
PASS: portability_openssl_test
PASS: try_test
PASS: uncaught_exceptions_test
PASS: unit_test
../build-aux/test-driver: 行 107: 27376 已放弃 (核心已转储) "$@" > $log_file 2>&1
FAIL: futures_test
PASS: function_test
PASS: functional_test
PASS: ssl_test
PASS: mallctl_helper_test
PASS: apply_tuple_test
PASS: partial_test
PASS: singleton_thread_local_test
PASS: utility_test
PASS: iterator_test

Testsuite summary for folly 57.0

TOTAL: 62

PASS: 61

SKIP: 0

XFAIL: 0

FAIL: 1

XPASS: 0

ERROR: 0

============================================================================
See test/test-suite.log
Please report to [email protected]

Makefile:2075: recipe for target 'test-suite.log' failed
make[4]: *** [test-suite.log] Error 1
make[4]: Leaving directory '/home/supreme/folly-bf/folly/test'
Makefile:2181: recipe for target 'check-TESTS' failed
make[3]: *** [check-TESTS] Error 2
make[3]: Leaving directory '/home/supreme/folly-bf/folly/test'
Makefile:2706: recipe for target 'check-am' failed
make[2]: *** [check-am] Error 2
make[2]: Leaving directory '/home/supreme/folly-bf/folly/test'
Makefile:1968: recipe for target 'check-recursive' failed
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory '/home/supreme/folly-bf/folly/test'
Makefile:1966: recipe for target 'check-recursive' failed
make: *** [check-recursive] Error 1

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

5 participants