[
https://issues.apache.org/jira/browse/MESOS-3046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14805158#comment-14805158
]
Alexander Rojas commented on MESOS-3046:
----------------------------------------
The submitted patch breaks the build on OSX with the following error message:
{noformat}
g++ -DPACKAGE_NAME=\"libprocess\" -DPACKAGE_TARNAME=\"libprocess\"
-DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"libprocess\ 0.0.1\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libprocess\"
-DVERSION=\"0.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DLT_OBJDIR=\".libs/\" -DHAVE_APR_POOLS_H=1 -DHAVE_LIBAPR_1=1
-DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 -DHAVE_SVN_DELTA_H=1
-DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBCURL=1 -DHAVE_PTHREAD_PRIO_INHERIT=1
-DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_LIBDL=1 -I.
-I../../../../3rdparty/libprocess/3rdparty
-I../../../../3rdparty/libprocess/3rdparty/stout/include -Iprotobuf-2.5.0/src
-Igmock-1.7.0/gtest/include -Igmock-1.7.0/include -Iboost-1.53.0
-Ipicojson-4f93734 -Iglog-0.3.3/src -I/usr/local/opt/openssl/include
-I/usr/local/opt/libevent/include
-I/usr/local/opt/subversion/include/subversion-1 -I/usr/include/apr-1
-I/usr/include/apr-1.0 -g -O0 -Wno-unused-local-typedef -std=c++11
-stdlib=libc++ -DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LANG_CXX11 -MT
stout_tests-uuid_tests.o -MD -MP -MF .deps/stout_tests-uuid_tests.Tpo -c -o
stout_tests-uuid_tests.o `test -f 'stout/tests/uuid_tests.cpp' || echo
'../../../../3rdparty/libprocess/3rdparty/'`stout/tests/uuid_tests.cpp
In file included from
../../../../3rdparty/libprocess/3rdparty/stout/tests/uuid_tests.cpp:21:
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:34:7:
error: initializer for thread-local variable must be a constant expression
new boost::uuids::random_generator();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:33:53:
note: use 'thread_local' to allow this
static __thread boost::uuids::random_generator* generator =
^
1 error generated.
make[7]: *** [stout_tests-uuid_tests.o] Error 1
make[7]: *** Waiting for unfinished jobs....
In file included from
../../../../3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp:43:
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:34:7:
error: initializer for thread-local variable must be a constant expression
new boost::uuids::random_generator();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:33:53:
note: use 'thread_local' to allow this
static __thread boost::uuids::random_generator* generator =
^
1 error generated.
make[7]: *** [stout_tests-os_tests.o] Error 1
In file included from
../../../../3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp:27:
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:34:7:
error: initializer for thread-local variable must be a constant expression
new boost::uuids::random_generator();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:33:53:
note: use 'thread_local' to allow this
static __thread boost::uuids::random_generator* generator =
^
1 error generated.
make[7]: *** [stout_tests-protobuf_tests.o] Error 1
make[6]: *** [check-am] Error 2
make[5]: *** [check-recursive] Error 1
make[4]: *** [check] Error 2
make[3]: *** [check-recursive] Error 1
make[2]: *** [check-recursive] Error 1
make[1]: *** [check] Error 2
make: *** [check-recursive] Error 1
{noformat}
Switching to {{thread_local}} doesn't help:
{noformat}
g++ -DPACKAGE_NAME=\"libprocess\" -DPACKAGE_TARNAME=\"libprocess\"
-DPACKAGE_VERSION=\"0.0.1\" -DPACKAGE_STRING=\"libprocess\ 0.0.1\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libprocess\"
-DVERSION=\"0.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DLT_OBJDIR=\".libs/\" -DHAVE_APR_POOLS_H=1 -DHAVE_LIBAPR_1=1
-DHAVE_SVN_VERSION_H=1 -DHAVE_LIBSVN_SUBR_1=1 -DHAVE_SVN_DELTA_H=1
-DHAVE_LIBSVN_DELTA_1=1 -DHAVE_LIBCURL=1 -DHAVE_PTHREAD_PRIO_INHERIT=1
-DHAVE_PTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_LIBDL=1 -I.
-I../../../../3rdparty/libprocess/3rdparty
-I../../../../3rdparty/libprocess/3rdparty/stout/include -Iprotobuf-2.5.0/src
-Igmock-1.7.0/gtest/include -Igmock-1.7.0/include -Iboost-1.53.0
-Ipicojson-4f93734 -Iglog-0.3.3/src -I/usr/local/opt/openssl/include
-I/usr/local/opt/libevent/include
-I/usr/local/opt/subversion/include/subversion-1 -I/usr/include/apr-1
-I/usr/include/apr-1.0 -g -O0 -Wno-unused-local-typedef -std=c++11
-stdlib=libc++ -DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LANG_CXX11 -MT
stout_tests-uuid_tests.o -MD -MP -MF .deps/stout_tests-uuid_tests.Tpo -c -o
stout_tests-uuid_tests.o `test -f 'stout/tests/uuid_tests.cpp' || echo
'../../../../3rdparty/libprocess/3rdparty/'`stout/tests/uuid_tests.cpp
In file included from
../../../../3rdparty/libprocess/3rdparty/stout/tests/uuid_tests.cpp:21:
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:33:12:
error: thread-local storage is not supported for the current target
static thread_local boost::uuids::random_generator* generator =
^
1 error generated.
make[7]: *** [stout_tests-uuid_tests.o] Error 1
make[7]: *** Waiting for unfinished jobs....
In file included from
../../../../3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp:43:
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:33:12:
error: thread-local storage is not supported for the current target
static thread_local boost::uuids::random_generator* generator =
^
1 error generated.
make[7]: *** [stout_tests-os_tests.o] Error 1
In file included from
../../../../3rdparty/libprocess/3rdparty/stout/tests/protobuf_tests.cpp:27:
../../../../3rdparty/libprocess/3rdparty/stout/include/stout/uuid.hpp:33:12:
error: thread-local storage is not supported for the current target
static thread_local boost::uuids::random_generator* generator =
^
1 error generated.
make[7]: *** [stout_tests-protobuf_tests.o] Error 1
make[6]: *** [check-am] Error 2
make[5]: *** [check-recursive] Error 1
make[4]: *** [check] Error 2
make[3]: *** [check-recursive] Error 1
make[2]: *** [check-recursive] Error 1
make[1]: *** [check] Error 2
make: *** [check-recursive] Error 1
{noformat}
> Stout's UUID re-seeds a new random generator during each call to UUID::random.
> ------------------------------------------------------------------------------
>
> Key: MESOS-3046
> URL: https://issues.apache.org/jira/browse/MESOS-3046
> Project: Mesos
> Issue Type: Bug
> Components: stout
> Reporter: Benjamin Mahler
> Assignee: Klaus Ma
> Labels: newbie, twitter
> Fix For: 0.25.0
>
> Attachments: tl.cpp
>
>
> Per [~StephanErb] and [~kevints]'s observations on MESOS-2940, stout's UUID
> abstraction is re-seeding the random generator during each call to
> {{UUID::random()}}, which is really expensive.
> This is confirmed in the perf graph from MESOS-2940.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)