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

[dev.icinga.com #13403] Debian architecture build problems #4824

Closed
icinga-migration opened this issue Dec 5, 2016 · 6 comments
Closed

[dev.icinga.com #13403] Debian architecture build problems #4824

icinga-migration opened this issue Dec 5, 2016 · 6 comments
Labels
bug Something isn't working

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/13403

Created by mfrosch on 2016-12-05 12:35:43 +00:00

Assignee: mfrosch
Status: Resolved (closed on 2016-12-20 09:05:20 +00:00)
Target Version: (none)
Last Update: 2016-12-20 09:05:20 +00:00 (in Redmine)

Icinga Version: 2.5.4
Backport?: Not yet backported
Include in Changelog: 1

Debian unstable is building for several architectures other than i386 and amd64

Some result in errors as you can see here: https://buildd.debian.org/status/logs.php?pkg=icinga2

arm64 (during test)

44/74 Test #44: base-base_timer/construct ...............................   Passed    0.02 sec
      Start 45: base-base_timer/interval
45/74 Test #45: base-base_timer/interval ................................   Passed    0.02 sec
      Start 46: base-base_timer/invoke
46/74 Test #46: base-base_timer/invoke ..................................***Exception: Other  1.02 sec
Running 1 test case...
unknown location(0): fatal error: in "base_timer/invoke": memory access violation at address: 0x556411b6a8: invalid permissions
/«PKGBUILDDIR»/test/base-timer.cpp(48): last checkpoint: "invoke" entry.
terminate called after throwing an instance of 'boost::exception_detail::clone_impl >'
  what():  boost thread: trying joining itself: Resource deadlock avoided

      Start 47: base-base_timer/scope
47/74 Test #47: base-base_timer/scope ...................................***Exception: Other  1.02 sec
Running 1 test case...
unknown location(0): fatal error: in "base_timer/scope": memory access violation at address: 0x55568976a8: invalid permissions
/«PKGBUILDDIR»/test/base-timer.cpp(63): last checkpoint: "scope" entry.
terminate called after throwing an instance of 'boost::exception_detail::clone_impl >'
  what():  boost thread: trying joining itself: Resource deadlock avoided

mips / mipsel (during linking)

[ 65%] Linking CXX executable ../Bin/None/icinga2
cd /«PKGBUILDDIR»/obj-mips-linux-gnu/icinga-app && /usr/bin/cmake -E cmake_link_script CMakeFiles/icinga-app.dir/link.txt --verbose=1
/usr/bin/c++   -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -pthread -std=c++11 -Wno-inconsistent-missing-override  -Wl,-z,relro -Wl,--gc-sections -Wl,--no-export-dynamic -Bsymbolic-functions -Wl,--dynamic-list-cpp-typeinfo -Wl,--dynamic-list-data CMakeFiles/icinga-app.dir/icinga.cpp.o  -o ../Bin/None/icinga2 -Wl,-rpath,/«PKGBUILDDIR»/obj-mips-linux-gnu/Bin/None: -rdynamic -lboost_thread -lboost_system -lboost_program_options -lboost_regex -lboost_chrono -lboost_date_time -lboost_atomic -lpthread ../Bin/None/libcli.so ../Bin/None/libremote.so ../Bin/None/libconfig.so ../Bin/None/libbase.so -ldl -lboost_thread -lboost_system -lboost_program_options -lboost_regex -lboost_chrono -lboost_date_time -lboost_atomic -lpthread -lssl -lcrypto -lyajl ../Bin/None/libmmatch.so ../Bin/None/libsocketpair.so ../Bin/None/libexecvpe.so -ledit -ltermcap 
../Bin/None/libcli.so: undefined reference to `icinga::ConfigCompilerContext::OpenObjectsFile(icinga::String const&)'
collect2: error: ld returned 1 exit status
icinga-app/CMakeFiles/icinga-app.dir/build.make:125: recipe for target 'Bin/None/icinga2' failed
make[4]: *** [Bin/None/icinga2] Error 1
make[4]: Leaving directory '/«PKGBUILDDIR»/obj-mips-linux-gnu'
CMakeFiles/Makefile2:2247: recipe for target 'icinga-app/CMakeFiles/icinga-app.dir/all' failed
make[3]: *** [icinga-app/CMakeFiles/icinga-app.dir/all] Error 2
make[3]: *** Waiting for unfinished jobs....

s390x (during test)

47/74 Test #47: base-base_timer/scope ...................................***Exception: Other 11.02 sec
Running 1 test case...

*** No errors detected
boosttest-test-base: /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:102: boost::condition_variable::~condition_variable(): Assertion `!ret' failed.

You can find detailed build logs at the buildd status page...

Changesets

2016-12-16 17:26:43 +00:00 by mfrosch 5985134

test/base-timer: Workaround boost::bind problem on mips* architectures

refs #13403

Relations:

@icinga-migration
Copy link
Author

Updated by mfrosch on 2016-12-16 08:02:42 +00:00

Update from tests yesterday:

arm64 (during test)

Rather weird problem, there seems to happen a stack corruption during work in the Timer.

You can force a proper core dump like this:

# arm64
./Bin/Debug/boosttest-test-base --run_test=base_timer/scope --catch_system_errors=n


(gdb) bt

#0  0x000000555d71b928 in ?? ()
#1  0x0000007f793f8000 in vtable for boost::detail::thread_data, boost::_bi::list2, boost::reference_wrapper > > > ()

from /home/lazyfrosch/icinga2-2.6.0/obj-aarch64-linux-gnu/Bin/Debug/libbase.so.2.6.0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Though valgrind is more of help:
$ valgrind ./Bin/Debug/boosttest-test-base --run_test=base_timer/scope --catch_system_errors=n

==26602== Memcheck, a memory error detector
==26602== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==26602== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==26602== Command: ./Bin/Debug/boosttest-test-base --run_test=base_timer/scope --catch_system_errors=n
==26602== 
Running 1 test case...
==26602== Thread 3:
==26602== Use of uninitialised value of size 8
==26602==    at 0x15F898: operator()&> > (bind.hpp:259)
==26602==    by 0x15F898: operator()&> (bind.hpp:1306)
==26602==    by 0x15F898: boost::detail::function::void_function_obj_invoker1 > >, void, boost::intrusive_ptr const&>::invoke(boost::detail::function::function_buffer&, boost::intrusive_ptr const&) (function_template.hpp:159)
==26602==    by 0x4FAE14F: operator() (function_template.hpp:771)
==26602==    by 0x4FAE14F: m_invoke&)>, 0u, const boost::intrusive_ptr&> (variadic_slot_invoker.hpp:105)
==26602==    by 0x4FAE14F: operator()&)>, const boost::intrusive_ptr&, 1ul> (variadic_slot_invoker.hpp:90)
==26602==    by 0x4FAE14F: operator() >, boost::signals2::slot&), boost::function&)> >, boost::signals2::mutex> > > (variadic_slot_invoker.hpp:133)
==26602==    by 0x4FAE14F: dereference (slot_call_iterator.hpp:110)
==26602==    by 0x4FAE14F: dereference&>, std::_List_iterator >, boost::signals2::slot&), boost::function&)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot&), boost::function&)> >, boost::signals2::mutex> > > (iterator_facade.hpp:549)
==26602==    by 0x4FAE14F: operator* (iterator_facade.hpp:655)
==26602==    by 0x4FAE14F: operator()&>, std::_List_iterator >, boost::signals2::slot&), boost::function&)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot&), boost::function&)> >, boost::signals2::mutex> > > (optional_last_value.hpp:57)
==26602==    by 0x4FAE14F: operator(), boost::signals2::detail::slot_call_iterator_t&>, std::_List_iterator >, boost::signals2::slot&), boost::function&)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body >, boost::signals2::slot&), boost::function&)> >, boost::signals2::mutex> > > (result_type_wrapper.hpp:64)
==26602==    by 0x4FAE14F: boost::signals2::detail::signal_impl const&), boost::signals2::optional_last_value, int, std::less, boost::function const&)>, boost::function const&)>, boost::signals2::mutex>::operator()(boost::intrusive_ptr const&) (signal_template.hpp:247)
==26602==    by 0x4F5216F: operator() (signal_template.hpp:723)
==26602==    by 0x4F5216F: icinga::Timer::Call() (timer.cpp:93)
==26602==    by 0x4F3C223: operator() (function_template.hpp:771)
==26602==    by 0x4F3C223: icinga::ThreadPool::WorkerThread::ThreadProc(icinga::ThreadPool::Queue&) (threadpool.cpp:138)
==26602==    by 0x532D613: thread_proxy (thread.cpp:171)
==26602==    by 0x5564017: start_thread (pthread_create.c:335)
==26602==    by 0x58AFD27: thread_start (clone.S:87)
==26602== 
==26602== 
==26602== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==26602==  Bad permissions for mapped region at address 0x19D928
==26602==    at 0x19D928: ??? (in /home/lazyfrosch/icinga2-2.6.0/obj-aarch64-linux-gnu/Bin/Debug/boosttest-test-base)

valgrind: m_coredump/coredump-elf.c:506 (fill_fpu): Assertion 'Unimplemented functionality' failed.
valgrind: valgrind

host stacktrace:
==26602==    at 0x3803C0DC: ??? (in /usr/lib/valgrind/memcheck-arm64-linux)

@icinga-migration
Copy link
Author

Updated by mfrosch on 2016-12-16 08:03:35 +00:00

  • Status changed from New to Assigned

mips / mipsel (during linking)

Seems to be a problem of the default GNU ld:

CMakeFiles/icinga-app.dir/icinga.cpp.o: In function `Main()':
./obj-mipsel-linux-gnu/icinga-app/./icinga-app/icinga.cpp:260: undefined reference to `icinga::Application::DeclarePidPath(icinga::String const&)'
./obj-mipsel-linux-gnu/icinga-app/./icinga-app/icinga.cpp:260: undefined reference to `icinga::Application::DeclarePidPath(icinga::String const&)'
../Bin/None/libcli.so.2.6.0: undefined reference to `icinga::ConfigCompilerContext::OpenObjectsFile(icinga::String const&)'
collect2: error: ld returned 1 exit status
icinga-app/CMakeFiles/icinga-app.dir/build.make:125: recipe for target 'Bin/None/icinga2' failed

When using ld.gold, it works.

c++ ... -fuse-ld=gold

@icinga-migration
Copy link
Author

Updated by mfrosch on 2016-12-16 17:43:35 +00:00

arm64 (during test)

Is a problem with boost::bind and a static callback inside the tests.

The daemon itself seems to run fine. Only the test broke.

See pushed branch

@icinga-migration
Copy link
Author

Updated by mfrosch on 2016-12-16 17:44:50 +00:00

mips / mipsel (during linking)

Changing linker to gold brought compile success.

Now some tests brake.

Thread 1 "boosttest-test-" received signal SIGSEGV, Segmentation fault.
parse_lsda_header (context=0x7fff66c0, p=0x256dec , info=0x7fff6010) at ../../../../src/libstdc++-v3/libsupc++/eh_personality.cc:58
58      ../../../../src/libstdc++-v3/libsupc++/eh_personality.cc: No such file or directory.

Interesting ref: https://bugreports.qt.io/browse/QTBUG-56777

@icinga-migration
Copy link
Author

Updated by mfrosch on 2016-12-19 12:02:30 +00:00

  • Relates set to 13675

@icinga-migration
Copy link
Author

Updated by mfrosch on 2016-12-20 09:05:20 +00:00

  • Status changed from Assigned to Resolved

arm64 and s390x is fixed for now.

The mips problems should be discussed with #13675, but might also be some libstdc / general problem on mips.

@icinga-migration icinga-migration added the bug Something isn't working label Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant