Coroutines vs. asan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(Iain, sorry for the direct copy, but thought it would be better than you missing this)


Using the new coroutines implementation and so far everything behaves as expected, except the sanitizers. As soon as I enable the sanitizer I get crashes and asan complaints:



../../tests/unit/coroutines_test.cc:83:1: runtime error: member call on misaligned address 0x00000148db09 for type 'struct awaiter', which requires 8 byte alignment
0x00000148db09: note: pointer points here
 df 19 06  00 49 39 de 74 1b 48 c7  03 0e 36 e0 45 48 b9 f5  f5 f5 f5 f5 f5 f5 f5 49  89 8c 24 00 80
              ^
../../include/seastar/core/coroutine.hh:135:8: runtime error: member access within misaligned address 0x00000148db09 for type 'struct awaiter', which requires 8 byte alignment
0x00000148db09: note: pointer points here
 df 19 06  00 49 39 de 74 1b 48 c7  03 0e 36 e0 45 48 b9 f5  f5 f5 f5 f5 f5 f5 f5 49  89 8c 24 00 80
              ^
../../include/seastar/core/coroutine.hh:135:8: runtime error: member call on misaligned address 0x00000148db09 for type 'struct future', which requires 8 byte alignment
0x00000148db09: note: pointer points here
 df 19 06  00 49 39 de 74 1b 48 c7  03 0e 36 e0 45 48 b9 f5  f5 f5 f5 f5 f5 f5 f5 49  89 8c 24 00 80
              ^
../../include/seastar/core/future.hh:1162:5: runtime error: member access within misaligned address 0x00000148db09 for type 'struct future', which requires 8 byte alignment
0x00000148db09: note: pointer points here
 df 19 06  00 49 39 de 74 1b 48 c7  03 0e 36 e0 45 48 b9 f5  f5 f5 f5 f5 f5 f5 f5 49  89 8c 24 00 80
              ^
../../include/seastar/core/future.hh:1162:5: runtime error: member call on misaligned address 0x00000148db11 for type 'struct future_state', which requires 8 byte alignment


and


AddressSanitizer:DEADLYSIGNAL
=================================================================
==332579==ERROR: AddressSanitizer: SEGV on unknown address 0x00000148db11 (pc 0x000000ff8946 bp 0x7f4fb6d07120 sp 0x7f4fb6d07100 T1)
==332579==The signal is caused by a WRITE memory access.
    #0 0xff8946 in std::__exception_ptr::exception_ptr::exception_ptr(std::__exception_ptr::exception_ptr&&) /usr/include/c++/10/bits/exception_ptr.h:108     #1 0xff981f in seastar::future_state_base::any::take_exception() ../../include/seastar/core/future.hh:305     #2 0xff96da in seastar::future_state_base::any::check_failure() ../../include/seastar/core/future.hh:298     #3 0xff978a in seastar::future_state_base::any::~any() ../../include/seastar/core/future.hh:302     #4 0xfff79d in seastar::future_state_base::~future_state_base() ../../include/seastar/core/future.hh:352     #5 0xfff372 in seastar::future_state<int>::~future_state() ../../include/seastar/core/future.hh:433     #6 0xfff372 in seastar::future<int>::~future() ../../include/seastar/core/future.hh:1162     #7 0xffcf1f in seastar::internal::awaiter<int>::~awaiter() ../../include/seastar/core/coroutine.hh:135     #8 0xfdec9e in test_simple_coroutines::run_test_case() [clone .actor] ../../tests/unit/coroutines_test.cc:83     #9 0xffbc11 in std::__n4861::coroutine_handle<void>::resume() const /usr/include/c++/10/coroutine:126     #10 0x101befd in std::__n4861::coroutine_traits<seastar::future<>, test_simple_coroutines&>::promise_type::run_and_dispose() ../../include/seastar/core/coroutine.hh:102     #11 0x12e6fa6 in seastar::reactor::run_tasks(seastar::reactor::task_queue&) ../../src/core/reactor.cc:2151     #12 0x12eafef in seastar::reactor::run_some_tasks() ../../src/core/reactor.cc:2566
    #13 0x12f01b4 in seastar::reactor::run() ../../src/core/reactor.cc:2721
    #14 0x10a99e4 in seastar::app_template::run_deprecated(int, char**, std::function<void ()>&&) ../../src/core/app-template.cc:202     #15 0x10a7986 in seastar::app_template::run(int, char**, std::function<seastar::future<int> ()>&&) ../../src/core/app-template.cc:115
    #16 0x102dc09 in operator() ../../src/testing/test_runner.cc:72
    #17 0x10395f5 in __invoke_impl<void, seastar::testing::test_runner::start(int, char**)::<lambda()>&> /usr/include/c++/10/bits/invoke.h:60     #18 0x10379c1 in __invoke_r<void, seastar::testing::test_runner::start(int, char**)::<lambda()>&> /usr/include/c++/10/bits/invoke.h:110
    #19 0x1035c9f in _M_invoke /usr/include/c++/10/bits/std_function.h:291
    #20 0x10c43d0 in std::function<void ()>::operator()() const /usr/include/c++/10/bits/std_function.h:622     #21 0x1297ec8 in seastar::posix_thread::start_routine(void*) ../../src/core/posix.cc:60
    #22 0x7f4fbb6b8431 in start_thread (/lib64/libpthread.so.0+0x9431)
    #23 0x7f4fba8d99d2 in __clone (/lib64/libc.so.6+0x1019d2)


(here some random address was interpreted as holding an std::exception_ptr).


I can try to minimize, but thought to check first if this is a known problem.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux