PengZheng opened a new issue, #695: URL: https://github.com/apache/celix/issues/695
https://github.com/apache/celix/actions/runs/7139868540/job/19444043259 ``` [ RUN ] RemoteServicesIntegrationTestSuite.InvokeRemoteCalcService [2023-12-08T10:01:37] [ info] [celix_framework] [framework_start:474] Celix framework started [2023-12-08T10:01:37] [ info] [celix_framework] [framework_start:474] Celix framework started [2023-12-08T10:01:37] [ info] [celix_psa_zmq_v2] [PSA_ZMQ] Using 127.0.0.1 for service annunciation [2023-12-08T10:01:37] [ info] [celix_psa_zmq_v2] [PSA_ZMQ] Using base till max port: 5501 till 6000 [2023-12-08T10:01:37] [ info] [celix_framework] Starting TestExportImportRemoteServiceFactory [2023-12-08T10:01:37] [ info] [celix_psa_zmq_v2] [PSA_ZMQ] Using 127.0.0.1 for service annunciation [2023-12-08T10:01:37] [ info] [celix_psa_zmq_v2] [PSA_ZMQ] Using base till max port: 5501 till 6000 [2023-12-08T10:01:37] [ info] [celix_framework] Starting TestExportImportRemoteServiceFactory [2023-12-08T10:01:37] [ info] [celix_framework] Testing remote C++ iteration 1. [2023-12-08T10:01:37] [ info] [celix_framework] Testing remote C++ iteration 2. [2023-12-08T10:01:37] [ info] [celix_framework] Got remote promise exception for iteration 2: Unknown exception throw for the failure of A celix::Promise ================================================================= ==14805==ERROR: AddressSanitizer: stack-buffer-underflow on address 0x7ff7bfe451f0 at pc 0x0001000d3ad3 bp 0x70000e9c3b60 sp 0x70000e9c3b58 WRITE of size 8 at 0x7ff7bfe451f0 thread T40 #0 0x1000d3ad2 in std::__1::__function::__func<auto RemoteServicesIntegrationTestSuite::invokeRemoteCalcService()::'lambda'(auto&)::operator()<ICalculator>(auto&) const::'lambda'(double), std::__1::allocator<std::__1::allocator>, void (double const&)>::operator()(void (double const&))+0xa2 (test_cxx_remote_services_integration:x86_64+0x10001bad2) #1 0x1000d1da4 in celix::PushStream<double>::forEach(std::__1::function<void (double const&)>)::'lambda'(celix::PushEvent<double> const&)::operator()(celix::PushEvent<double> const&) const+0x614 (test_cxx_remote_services_integration:x86_64+0x100019da4) #2 0x102ff9eb8 in celix::BufferedPushStream<double>::startWorker()::'lambda'()::operator()() const+0x258 (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x55eb8) #3 0x10303ab7b in std::__1::__async_assoc_state<void, std::__1::__async_func<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()> >::__execute()+0x10b (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x96b7b) #4 0x10303affe in void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (std::__1::__async_assoc_state<void, std::__1::__async_func<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()> >*> >(void*)+0xce (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x96ffe) #5 0x7ff8153124e0 in _pthread_start+0x7c (libsystem_pthread.dylib:x86_64+0x64e0) #6 0x7ff81530df6a in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x1f6a) Address 0x7ff7bfe451f0 is located in stack of thread T0 at offset 16 in frame #0 0x1003d75af in celix_framework_stopBundleEntryInternal+0xf (libcelix_framework.3.0.0.dylib:x86_64+0x225af) This frame has 11 object(s): [32, 192) 'event.i239' <== Memory access at offset 16 underflows this variable [256, 416) 'event.i224' [480, 640) 'event.i209' [704, 864) 'event.i' [928, 936) 'context' [960, 968) 'module' [992, 1000) 'symbolicName' [1024, 1032) 'id' [1056, 1064) 'module121' [1088, 1096) 'symbolicName122' [1120, 1128) 'id123' HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-underflow (test_cxx_remote_services_integration:x86_64+0x10001bad2) in std::__1::__function::__func<auto RemoteServicesIntegrationTestSuite::invokeRemoteCalcService()::'lambda'(auto&)::operator()<ICalculator>(auto&) const::'lambda'(double), std::__1::allocator<std::__1::allocator>, void (double const&)>::operator()(void (double const&))+0xa2 Shadow bytes around the buggy address: 0x1ffef7fc89e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1ffef7fc89f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1ffef7fc8a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1ffef7fc8a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1ffef7fc8a20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x1ffef7fc8a30: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1[f1]f1 0x1ffef7fc8a40: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x1ffef7fc8a50: f8 f8 f8 f8 f2 f2 f2 f2 f2 f2 f2 f2 f8 f8 f8 f8 0x1ffef7fc8a60: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 0x1ffef7fc8a70: f2 f2 f2 f2 f2 f2 f2 f2 f8 f8 f8 f8 f8 f8 f8 f8 0x1ffef7fc8a80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f2 f2 f2 f2 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Thread T40 created by T28 here: #0 0x1007fda3c in wrap_pthread_create+0x5c (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x43a3c) #1 0x10303ae72 in std::__1::thread::thread<void (std::__1::__async_assoc_state<void, std::__1::__async_func<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()> >::*)(), std::__1::__async_assoc_state<void, std::__1::__async_func<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()> >*, void>(void (std::__1::__async_assoc_state<void, std::__1::__async_func<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()> >::*&&)(), std::__1::__async_assoc_state<void, std::__1::__async_func<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()> >*&&)+0xd2 (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x96e72) #2 0x103038ff8 in std::__1::future<std::__1::__invoke_of<std::__1::decay<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()>::type>::type> std::__1::async<celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()>(std::__1::launch, celix::DefaultExecutor::execute(int, std::__1::function<void ()>)::'lambda'()&&)+0x568 (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x94ff8) #3 0x10303821f in celix::DefaultExecutor::execute(int, std::__1::function<void ()>)+0x20f (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x9421f) #4 0x102ff6717 in celix::BufferedPushStream<double>::startWorker()+0x247 (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x52717) #5 0x102ff35f8 in celix::BufferedPushStream<double>::handleEvent(celix::PushEvent<double> const&)+0x358 (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x4f5f8) #6 0x102ffa903 in celix::StreamPushEventConsumer<double>::accept(celix::PushEvent<double> const&)+0xd3 (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x56903) #7 0x102ffdc0b in std::__1::__function::__func<celix::AbstractPushEventSource<double>::publish(double const&)::'lambda'(), std::__1::allocator<celix::AbstractPushEventSource<double>::publish(double const&)::'lambda'()>, void ()>::operator()()+0x18b (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x59c0b) #8 0x102ffd34d in celix::AbstractPushEventSource<double>::publish(double const&)+0x26d (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x5934d) #9 0x102ffc4d1 in ImportedCalculator::receive(char const*, unsigned int, void*, celix_properties const*)+0x1f1 (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x584d1) #10 0x102ffc2bc in CalculatorImportServiceFactory::createImportedCalculatorComponent(celix::rsa::EndpointDescription const&)::'lambda'(void*, char const*, unsigned int, void*, celix_properties const*, bool*)::__invoke(void*, char const*, unsigned int, void*, celix_properties const*, bool*)+0xc (libTestExportImportRemoteServiceFactory.0.dylib:x86_64+0x582bc) #11 0x102ccdaf8 in psa_zmq_recvThread+0x12c8 (libcelix_pubsub_admin_zmq.2.dylib:x86_64+0xcaf8) #12 0x7ff8153124e0 in _pthread_start+0x7c (libsystem_pthread.dylib:x86_64+0x64e0) #13 0x7ff81530df6a in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x1f6a) Thread T28 created by T16 here: #0 0x1007fda3c in wrap_pthread_create+0x5c (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x43a3c) #1 0x1004552c1 in celixThread_create+0x11 (libcelix_utils.3.dylib:x86_64+0x102c1) #2 0x102ccc28e in pubsub_zmqTopicReceiver_create+0xa9e (libcelix_pubsub_admin_zmq.2.dylib:x86_64+0xb28e) #3 0x102cc7789 in pubsub_zmqAdmin_setupTopicReceiver+0x339 (libcelix_pubsub_admin_zmq.2.dylib:x86_64+0x6789) #4 0x1026fe356 in pstm_setupTopicReceiverCallback+0xc6 (libcelix_pubsub_topology_manager.1.dylib:x86_64+0xc356) #5 0x1003eea7b in celix_serviceTracker_useHighestRankingService+0x1cb (libcelix_framework.3.0.0.dylib:x86_64+0x39a7b) #6 0x1003c77d4 in celix_bundleContext_useServiceWithOptions_2_UseServiceTracker+0xd4 (libcelix_framework.3.0.0.dylib:x86_64+0x127d4) #7 0x1003dd091 in fw_handleEvents+0xbc1 (libcelix_framework.3.0.0.dylib:x86_64+0x28091) #8 0x1003cde67 in fw_eventDispatcher+0x247 (libcelix_framework.3.0.0.dylib:x86_64+0x18e67) #9 0x7ff8153124e0 in _pthread_start+0x7c (libsystem_pthread.dylib:x86_64+0x64e0) #10 0x7ff81530df6a in thread_start+0xe (libsystem_pthread.dylib:x86_64+0x1f6a) Thread T16 created by T0 here: #0 0x1007fda3c in wrap_pthread_create+0x5c (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x43a3c) #1 0x1004552c1 in celixThread_create+0x11 (libcelix_utils.3.dylib:x86_64+0x102c1) #2 0x1003cd605 in fw_init+0x195 (libcelix_framework.3.0.0.dylib:x86_64+0x18605) #3 0x1003ce85e in framework_start+0x12e (libcelix_framework.3.0.0.dylib:x86_64+0x1985e) #4 0x1003f1cb6 in celix_frameworkFactory_createFramework+0x126 (libcelix_framework.3.0.0.dylib:x86_64+0x3ccb6) #5 0x1000c3fa9 in celix::createFramework(celix::Properties const&)+0x49 (test_cxx_remote_services_integration:x86_64+0x10000bfa9) #6 0x1000c1745 in RemoteServicesIntegrationTestSuite::RemoteServicesIntegrationTestSuite()+0x6e5 (test_cxx_remote_services_integration:x86_64+0x100009745) #7 0x1000c95eb in testing::internal::TestFactoryImpl<RemoteServicesIntegrationTestSuite_InvokeRemoteCalcService_Test>::CreateTest()+0x1b (test_cxx_remote_services_integration:x86_64+0x1000115eb) #8 0x10012086c in testing::Test* testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::TestFactoryBase, testing::Test*>(testing::internal::TestFactoryBase*, testing::Test* (testing::internal::TestFactoryBase::*)(), char const*)+0x15c (test_cxx_remote_services_integration:x86_64+0x10006886c) #9 0x10011fb70 in testing::TestInfo::Run()+0x1f0 (test_cxx_remote_services_integration:x86_64+0x100067b70) #10 0x1001233f6 in testing::TestSuite::Run()+0x346 (test_cxx_remote_services_integration:x86_64+0x10006b3f6) #11 0x100165660 in testing::internal::UnitTestImpl::RunAllTests()+0x1420 (test_cxx_remote_services_integration:x86_64+0x1000ad660) #12 0x100163adc in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)+0x15c (test_cxx_remote_services_integration:x86_64+0x1000abadc) #13 0x100163839 in testing::UnitTest::Run()+0x1a9 (test_cxx_remote_services_integration:x86_64+0x1000ab839) #14 0x1001b290f in main+0xef (test_cxx_remote_services_integration:x86_64+0x1000fa90f) #15 0x10bc5a52d in start+0x1cd (dyld:x86_64+0x552d) ==14805==ABORTING ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org