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

psa_zmq command stuck #205

Closed
m-veenvliet opened this issue Apr 21, 2020 · 5 comments · Fixed by #703
Closed

psa_zmq command stuck #205

m-veenvliet opened this issue Apr 21, 2020 · 5 comments · Fixed by #703

Comments

@m-veenvliet
Copy link

When using the publish subscribe mechanics of celix and only starting a publisher or subscriber (not both). Execute the psa_zmq command the command interface gets blocked. From this point on no other command can be executed.
psa_zmq stuck
psa_zmq-stuck-gdb-bt.txt

@Oipo
Copy link
Contributor

Oipo commented May 5, 2020

Relevant thread sanitizer output:

==================
WARNING: ThreadSanitizer: data race (pid=52252)
  Write of size 1 at 0x7b0c00004220 by thread T5 (mutexes: write M173, read M344, write M215, write M216, write M217):
    #0 publisher_publishSvcAdded /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:141 (libcelix_pubsub_poi_publisher.so.1+0x3541)
    #1 serviceTracker_invokeAddService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:553 (libcelix_framework.so.2+0x3e5b6)
    #2 serviceTracker_track /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:493 (libcelix_framework.so.2+0x3e0f2)
    #3 serviceTracker_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:417 (libcelix_framework.so.2+0x3dbd9)
    #4 celix_serviceRegistry_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:1180 (libcelix_framework.so.2+0x3bf37)
    #5 serviceRegistry_registerServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:244 (libcelix_framework.so.2+0x38774)
    #6 celix_serviceRegistry_registerServiceFactory /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:899 (libcelix_framework.so.2+0x3acd5)
    #7 celix_framework_registerServiceFactory /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:2342 (libcelix_framework.so.2+0x2d342)
    #8 celix_bundleContext_registerServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:466 (libcelix_framework.so.2+0x1fd80)
    #9 pubsub_zmqTopicSender_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:293 (libcelix_pubsub_admin_zmq.so.1+0xc799)
    #10 pubsub_zmqAdmin_setupTopicSender /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:475 (libcelix_pubsub_admin_zmq.so.1+0xa160)
    #11 pstm_setupTopicSenderCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:811 (libcelix_pubsub_topology_manager.so.1+0x953e)
    #12 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #13 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #14 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #15 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #16 pstm_setupTopicSenders /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:858 (libcelix_pubsub_topology_manager.so.1+0x9a0b)
    #17 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0xa565)
    #18 <null> <null> (libtsan.so.0+0x2b3c6)

  Previous read of size 1 at 0x7b0c00004220 by thread T10:
    #0 send_thread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:70 (libcelix_pubsub_poi_publisher.so.1+0x3297)
    #1 <null> <null> (libtsan.so.0+0x2b3c6)

  Location is heap block of size 40 at 0x7b0c00004200 allocated by main thread:
    #0 malloc <null> (libtsan.so.0+0x2cbe6)
    #1 publisher_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:112 (libcelix_pubsub_poi_publisher.so.1+0x335d)
    #2 pub_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/ps_pub_activator.c:52 (libcelix_pubsub_poi_publisher.so.1+0x27a4)
    #3 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/ps_pub_activator.c:97 (libcelix_pubsub_poi_publisher.so.1+0x2be5)
    #4 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #5 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #6 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #7 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #8 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #9 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #10 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #11 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #12 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

  Mutex M173 (0x7b4c00001758) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x2e561)
    #1 celixThreadMutex_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:102 (libcelix_utils.so.2+0x1020e)
    #2 pubsub_topologyManager_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:73 (libcelix_pubsub_topology_manager.so.1+0x5c9f)
    #3 pstm_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:68 (libcelix_pubsub_topology_manager.so.1+0x51dc)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:170 (libcelix_pubsub_topology_manager.so.1+0x5ab4)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

  Mutex M344 (0x7b3400006888) created at:
    #0 pthread_rwlock_init <null> (libtsan.so.0+0x2ef82)
    #1 celixThreadRwlock_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:188 (libcelix_utils.so.2+0x10642)
    #2 celix_serviceTracker_createWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:712 (libcelix_framework.so.2+0x3f272)
    #3 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:783 (libcelix_framework.so.2+0x21690)
    #4 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #5 pstm_setupTopicSenders /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:858 (libcelix_pubsub_topology_manager.so.1+0x9a0b)
    #6 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0xa565)
    #7 <null> <null> (libtsan.so.0+0x2b3c6)

  Mutex M215 (0x7b4400000190) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x2e561)
    #1 celixThreadMutex_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:102 (libcelix_utils.so.2+0x1020e)
    #2 pubsub_zmqAdmin_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:189 (libcelix_pubsub_admin_zmq.so.1+0x8ada)
    #3 psa_zmq_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c:60 (libcelix_pubsub_admin_zmq.so.1+0x7bc3)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c:143 (libcelix_pubsub_admin_zmq.so.1+0x8482)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

  Mutex M216 (0x7b44000001c0) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x2e561)
    #1 celixThreadMutex_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:102 (libcelix_utils.so.2+0x1020e)
    #2 pubsub_zmqAdmin_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:192 (libcelix_pubsub_admin_zmq.so.1+0x8b23)
    #3 psa_zmq_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c:60 (libcelix_pubsub_admin_zmq.so.1+0x7bc3)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c:143 (libcelix_pubsub_admin_zmq.so.1+0x8482)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

  Mutex M217 (0x7b44000001f0) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x2e561)
    #1 celixThreadMutex_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:102 (libcelix_utils.so.2+0x1020e)
    #2 pubsub_zmqAdmin_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:195 (libcelix_pubsub_admin_zmq.so.1+0x8b73)
    #3 psa_zmq_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c:60 (libcelix_pubsub_admin_zmq.so.1+0x7bc3)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c:143 (libcelix_pubsub_admin_zmq.so.1+0x8482)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

  Thread T5 'PubSub TopologyManager' (tid=52258, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 pubsub_topologyManager_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:90 (libcelix_pubsub_topology_manager.so.1+0x5ee2)
    #3 pstm_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:68 (libcelix_pubsub_topology_manager.so.1+0x51dc)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:170 (libcelix_pubsub_topology_manager.so.1+0x5ab4)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

  Thread T10 (tid=52263, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 publisher_publishSvcAdded /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:150 (libcelix_pubsub_poi_publisher.so.1+0x361d)
    #3 serviceTracker_invokeAddService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:553 (libcelix_framework.so.2+0x3e5b6)
    #4 serviceTracker_track /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:493 (libcelix_framework.so.2+0x3e0f2)
    #5 serviceTracker_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:417 (libcelix_framework.so.2+0x3dbd9)
    #6 celix_serviceRegistry_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:1180 (libcelix_framework.so.2+0x3bf37)
    #7 serviceRegistry_registerServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:244 (libcelix_framework.so.2+0x38774)
    #8 celix_serviceRegistry_registerServiceFactory /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:899 (libcelix_framework.so.2+0x3acd5)
    #9 celix_framework_registerServiceFactory /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:2342 (libcelix_framework.so.2+0x2d342)
    #10 celix_bundleContext_registerServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:466 (libcelix_framework.so.2+0x1fd80)
    #11 pubsub_zmqTopicSender_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:293 (libcelix_pubsub_admin_zmq.so.1+0xc799)
    #12 pubsub_zmqAdmin_setupTopicSender /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:475 (libcelix_pubsub_admin_zmq.so.1+0xa160)
    #13 pstm_setupTopicSenderCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:811 (libcelix_pubsub_topology_manager.so.1+0x953e)
    #14 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #15 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #16 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #17 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #18 pstm_setupTopicSenders /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:858 (libcelix_pubsub_topology_manager.so.1+0x9a0b)
    #19 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0xa565)
    #20 <null> <null> (libtsan.so.0+0x2b3c6)

SUMMARY: ThreadSanitizer: data race /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:141 in publisher_publishSvcAdded
==================
==================
WARNING: ThreadSanitizer: data race (pid=52252)
  Write of size 1 at 0x7f36017b7688 by thread T10:
    #0 delay_first_send_for_late_joiners /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:733 (libcelix_pubsub_admin_zmq.so.1+0xf561)
    #1 psa_zmq_topicPublicationSend /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:538 (libcelix_pubsub_admin_zmq.so.1+0xe044)
    #2 send_thread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:89 (libcelix_pubsub_poi_publisher.so.1+0x317e)
    #3 <null> <null> (libtsan.so.0+0x2b3c6)

  Previous read of size 1 at 0x7f36017b7688 by thread T14:
    #0 delay_first_send_for_late_joiners /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:730 (libcelix_pubsub_admin_zmq.so.1+0xf50f)
    #1 psa_zmq_topicPublicationSend /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:538 (libcelix_pubsub_admin_zmq.so.1+0xe044)
    #2 send_thread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:89 (libcelix_pubsub_poi_publisher2.so.1+0x317e)
    #3 <null> <null> (libtsan.so.0+0x2b3c6)

  As if synchronized via sleep:
    #0 sleep <null> (libtsan.so.0+0x51ffe)
    #1 delay_first_send_for_late_joiners /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:732 (libcelix_pubsub_admin_zmq.so.1+0xf555)
    #2 psa_zmq_topicPublicationSend /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:538 (libcelix_pubsub_admin_zmq.so.1+0xe044)
    #3 send_thread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:89 (libcelix_pubsub_poi_publisher.so.1+0x317e)
    #4 <null> <null> (libtsan.so.0+0x2b3c6)

  Location is global 'firstSend.15328' of size 1 at 0x7f36017b7688 (libcelix_pubsub_admin_zmq.so.1+0x00000001e688)

  Thread T10 (tid=52263, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 publisher_publishSvcAdded /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:150 (libcelix_pubsub_poi_publisher.so.1+0x361d)
    #3 serviceTracker_invokeAddService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:553 (libcelix_framework.so.2+0x3e5b6)
    #4 serviceTracker_track /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:493 (libcelix_framework.so.2+0x3e0f2)
    #5 serviceTracker_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:417 (libcelix_framework.so.2+0x3dbd9)
    #6 celix_serviceRegistry_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:1180 (libcelix_framework.so.2+0x3bf37)
    #7 serviceRegistry_registerServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:244 (libcelix_framework.so.2+0x38774)
    #8 celix_serviceRegistry_registerServiceFactory /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:899 (libcelix_framework.so.2+0x3acd5)
    #9 celix_framework_registerServiceFactory /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:2342 (libcelix_framework.so.2+0x2d342)
    #10 celix_bundleContext_registerServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:466 (libcelix_framework.so.2+0x1fd80)
    #11 pubsub_zmqTopicSender_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:293 (libcelix_pubsub_admin_zmq.so.1+0xc799)
    #12 pubsub_zmqAdmin_setupTopicSender /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:475 (libcelix_pubsub_admin_zmq.so.1+0xa160)
    #13 pstm_setupTopicSenderCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:811 (libcelix_pubsub_topology_manager.so.1+0x953e)
    #14 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #15 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #16 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #17 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #18 pstm_setupTopicSenders /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:858 (libcelix_pubsub_topology_manager.so.1+0x9a0b)
    #19 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0xa565)
    #20 <null> <null> (libtsan.so.0+0x2b3c6)

  Thread T14 (tid=52267, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 publisher_publishSvcAdded /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:150 (libcelix_pubsub_poi_publisher2.so.1+0x361d)
    #3 serviceTracker_invokeAddService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:553 (libcelix_framework.so.2+0x3e5b6)
    #4 serviceTracker_track /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:493 (libcelix_framework.so.2+0x3e0f2)
    #5 serviceTracker_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:417 (libcelix_framework.so.2+0x3dbd9)
    #6 celix_serviceRegistry_addServiceListener /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:1093 (libcelix_framework.so.2+0x3b97f)
    #7 fw_addServiceListener /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:1469 (libcelix_framework.so.2+0x29df6)
    #8 bundleContext_addServiceListener /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:327 (libcelix_framework.so.2+0x1f2ec)
    #9 serviceTracker_open /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:210 (libcelix_framework.so.2+0x3cecf)
    #10 celix_serviceTracker_createWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:769 (libcelix_framework.so.2+0x3f7a9)
    #11 celix_bundleContext_trackServicesWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:854 (libcelix_framework.so.2+0x21cf0)
    #12 pub_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/ps_pub_activator.c:74 (libcelix_pubsub_poi_publisher2.so.1+0x2975)
    #13 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/ps_pub_activator.c:97 (libcelix_pubsub_poi_publisher2.so.1+0x2be5)
    #14 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #15 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #16 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #17 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #18 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #19 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #20 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #21 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #22 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

SUMMARY: ThreadSanitizer: data race /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:733 in delay_first_send_for_late_joiners
==================
==================
WARNING: ThreadSanitizer: data race (pid=52350)
  Write of size 8 at 0x7b7400000660 by thread T14 (mutexes: write M418):
    #0 zmq::dist_t::send_to_matching(zmq::msg_t*) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/dist.cpp:155 (libzmq.so.5+0x109dba)
    #1 zmq::xpub_t::xsend(zmq::msg_t*) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/xpub.cpp:301 (libzmq.so.5+0x191107)
    #2 zmq::socket_base_t::send(zmq::msg_t*, int) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/socket_base.cpp:1123 (libzmq.so.5+0x16091a)
    #3 s_sendmsg /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:338 (libzmq.so.5+0x19ec02)
    #4 zmq_msg_send /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:592 (libzmq.so.5+0x1a0053)
    #5 zmq_sendmsg /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:353 (libzmq.so.5+0x19ec9b)
    #6 zframe_send /home/oipo-unencrypted/Programming/czmq-4.2.0/src/zframe.c:235 (libczmq.so.4+0x39898)
    #7 zmsg_send /home/oipo-unencrypted/Programming/czmq-4.2.0/src/zmsg.c:138 (libczmq.so.4+0x51199)
    #8 psa_zmq_topicPublicationSend /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:653 (libcelix_pubsub_admin_zmq.so.1+0xec66)
    #9 send_thread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:89 (libcelix_pubsub_poi_publisher2.so.1+0x317e)
    #10 <null> <null> (libtsan.so.0+0x2b3c6)

  Previous write of size 8 at 0x7b7400000660 by thread T10 (mutexes: write M416):
    #0 zmq::dist_t::send_to_matching(zmq::msg_t*) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/dist.cpp:155 (libzmq.so.5+0x109dba)
    #1 zmq::xpub_t::xsend(zmq::msg_t*) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/xpub.cpp:301 (libzmq.so.5+0x191107)
    #2 zmq::socket_base_t::send(zmq::msg_t*, int) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/socket_base.cpp:1123 (libzmq.so.5+0x16091a)
    #3 s_sendmsg /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:338 (libzmq.so.5+0x19ec02)
    #4 zmq_msg_send /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:592 (libzmq.so.5+0x1a0053)
    #5 zmq_sendmsg /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:353 (libzmq.so.5+0x19ec9b)
    #6 zframe_send /home/oipo-unencrypted/Programming/czmq-4.2.0/src/zframe.c:235 (libczmq.so.4+0x39898)
    #7 zmsg_send /home/oipo-unencrypted/Programming/czmq-4.2.0/src/zmsg.c:138 (libczmq.so.4+0x51199)
    #8 psa_zmq_topicPublicationSend /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:653 (libcelix_pubsub_admin_zmq.so.1+0xec66)
    #9 send_thread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:89 (libcelix_pubsub_poi_publisher.so.1+0x317e)
    #10 <null> <null> (libtsan.so.0+0x2b3c6)

  Location is heap block of size 2056 at 0x7b7400000000 allocated by thread T5:
    #0 operator new(unsigned long, std::nothrow_t const&) <null> (libtsan.so.0+0x7861a)
    #1 zmq::socket_base_t::create(int, zmq::ctx_t*, unsigned int, int) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/socket_base.cpp:154 (libzmq.so.5+0x15aab3)
    #2 zmq::ctx_t::create_socket(int) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/ctx.cpp:380 (libzmq.so.5+0xe70bb)
    #3 zmq_socket /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:238 (libzmq.so.5+0x19e623)
    #4 zsys_socket /home/oipo-unencrypted/Programming/czmq-4.2.0/src/zsys.c:379 (libczmq.so.4+0x75830)
    #5 zsock_new_checked /home/oipo-unencrypted/Programming/czmq-4.2.0/src/zsock.c:87 (libczmq.so.4+0x675df)
    #6 pubsub_zmqTopicSender_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:209 (libcelix_pubsub_admin_zmq.so.1+0xc11e)
    #7 pubsub_zmqAdmin_setupTopicSender /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:475 (libcelix_pubsub_admin_zmq.so.1+0xa160)
    #8 pstm_setupTopicSenderCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:811 (libcelix_pubsub_topology_manager.so.1+0x953e)
    #9 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #10 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #11 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #12 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #13 pstm_setupTopicSenders /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:858 (libcelix_pubsub_topology_manager.so.1+0x9a0b)
    #14 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0xa565)
    #15 <null> <null> (libtsan.so.0+0x2b3c6)

  Mutex M418 (0x7b30000007a8) created at:
    #0 pthread_mutex_lock <null> (libtsan.so.0+0x42a4f)
    #1 celixThreadMutex_lock /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:110 (libcelix_utils.so.2+0x10280)
    #2 psa_zmq_topicPublicationSend /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:554 (libcelix_pubsub_admin_zmq.so.1+0xe14d)
    #3 send_thread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:89 (libcelix_pubsub_poi_publisher2.so.1+0x317e)
    #4 <null> <null> (libtsan.so.0+0x2b3c6)

  Mutex M416 (0x7b3000006028) created at:
    #0 pthread_mutex_lock <null> (libtsan.so.0+0x42a4f)
    #1 celixThreadMutex_lock /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:110 (libcelix_utils.so.2+0x10280)
    #2 psa_zmq_topicPublicationSend /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:554 (libcelix_pubsub_admin_zmq.so.1+0xe14d)
    #3 send_thread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:89 (libcelix_pubsub_poi_publisher.so.1+0x317e)
    #4 <null> <null> (libtsan.so.0+0x2b3c6)

  Thread T14 (tid=52365, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 publisher_publishSvcAdded /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:150 (libcelix_pubsub_poi_publisher2.so.1+0x361d)
    #3 serviceTracker_invokeAddService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:553 (libcelix_framework.so.2+0x3e5b6)
    #4 serviceTracker_track /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:493 (libcelix_framework.so.2+0x3e0f2)
    #5 serviceTracker_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:417 (libcelix_framework.so.2+0x3dbd9)
    #6 celix_serviceRegistry_addServiceListener /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:1093 (libcelix_framework.so.2+0x3b97f)
    #7 fw_addServiceListener /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:1469 (libcelix_framework.so.2+0x29df6)
    #8 bundleContext_addServiceListener /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:327 (libcelix_framework.so.2+0x1f2ec)
    #9 serviceTracker_open /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:210 (libcelix_framework.so.2+0x3cecf)
    #10 celix_serviceTracker_createWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:769 (libcelix_framework.so.2+0x3f7a9)
    #11 celix_bundleContext_trackServicesWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:854 (libcelix_framework.so.2+0x21cf0)
    #12 pub_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/ps_pub_activator.c:74 (libcelix_pubsub_poi_publisher2.so.1+0x2975)
    #13 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/ps_pub_activator.c:97 (libcelix_pubsub_poi_publisher2.so.1+0x2be5)
    #14 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #15 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #16 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #17 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #18 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #19 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #20 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #21 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #22 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

  Thread T10 (tid=52361, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 publisher_publishSvcAdded /home/oipo-unencrypted/Programming/celix/bundles/pubsub/examples/pubsub/publisher/private/src/pubsub_publisher.c:150 (libcelix_pubsub_poi_publisher.so.1+0x361d)
    #3 serviceTracker_invokeAddService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:553 (libcelix_framework.so.2+0x3e5b6)
    #4 serviceTracker_track /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:493 (libcelix_framework.so.2+0x3e0f2)
    #5 serviceTracker_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:417 (libcelix_framework.so.2+0x3dbd9)
    #6 celix_serviceRegistry_serviceChanged /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:1180 (libcelix_framework.so.2+0x3bf37)
    #7 serviceRegistry_registerServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:244 (libcelix_framework.so.2+0x38774)
    #8 celix_serviceRegistry_registerServiceFactory /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_registry.c:899 (libcelix_framework.so.2+0x3acd5)
    #9 celix_framework_registerServiceFactory /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:2342 (libcelix_framework.so.2+0x2d342)
    #10 celix_bundleContext_registerServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:466 (libcelix_framework.so.2+0x1fd80)
    #11 pubsub_zmqTopicSender_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:293 (libcelix_pubsub_admin_zmq.so.1+0xc799)
    #12 pubsub_zmqAdmin_setupTopicSender /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:475 (libcelix_pubsub_admin_zmq.so.1+0xa160)
    #13 pstm_setupTopicSenderCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:811 (libcelix_pubsub_topology_manager.so.1+0x953e)
    #14 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #15 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #16 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #17 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #18 pstm_setupTopicSenders /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:858 (libcelix_pubsub_topology_manager.so.1+0x9a0b)
    #19 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0xa565)
    #20 <null> <null> (libtsan.so.0+0x2b3c6)

  Thread T5 'PubSub TopologyManager' (tid=52356, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 pubsub_topologyManager_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:90 (libcelix_pubsub_topology_manager.so.1+0x5ee2)
    #3 pstm_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:68 (libcelix_pubsub_topology_manager.so.1+0x51dc)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:170 (libcelix_pubsub_topology_manager.so.1+0x5ab4)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_publisher_zmq/main.c:19 (pubsub_publisher_zmq+0x1218)

SUMMARY: ThreadSanitizer: data race /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/dist.cpp:155 in zmq::dist_t::send_to_matching(zmq::msg_t*)
==================
==================
WARNING: ThreadSanitizer: data race (pid=52596)
  Write of size 8 at 0x7b6c00000628 by thread T5 (mutexes: write M172, read M447, write M220, write M307):
    #0 zmq::fq_t::attach(zmq::pipe_t*) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/fq.cpp:49 (libzmq.so.5+0x10fb25)
    #1 zmq::xsub_t::xattach_pipe(zmq::pipe_t*, bool, bool) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/xsub.cpp:66 (libzmq.so.5+0x19d120)
    #2 zmq::socket_base_t::attach_pipe(zmq::pipe_t*, bool, bool) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/socket_base.cpp:388 (libzmq.so.5+0x15c365)
    #3 zmq::socket_base_t::connect(char const*) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/socket_base.cpp:973 (libzmq.so.5+0x15fa89)
    #4 zmq_connect /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:313 (libzmq.so.5+0x19ea9a)
    #5 psa_zmq_connectToAllRequestedConnections /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:760 (libcelix_pubsub_admin_zmq.so.1+0x13070)
    #6 pubsub_zmqTopicReceiver_connectTo /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:389 (libcelix_pubsub_admin_zmq.so.1+0x10a6e)
    #7 pubsub_zmqAdmin_connectEndpointToReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:650 (libcelix_pubsub_admin_zmq.so.1+0xae71)
    #8 pubsub_zmqAdmin_addDiscoveredEndpoint /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:667 (libcelix_pubsub_admin_zmq.so.1+0xaf6e)
    #9 pstm_addEndpointCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:768 (libcelix_pubsub_topology_manager.so.1+0x9121)
    #10 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #11 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #12 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #13 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #14 pstm_findPsaForEndpoints /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:795 (libcelix_pubsub_topology_manager.so.1+0x9375)
    #15 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:975 (libcelix_pubsub_topology_manager.so.1+0xa57d)
    #16 <null> <null> (libtsan.so.0+0x2b3c6)

  Previous read of size 8 at 0x7b6c00000628 by thread T10:
    #0 zmq::fq_t::recvpipe(zmq::msg_t*, zmq::pipe_t**) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/fq.cpp:90 (libzmq.so.5+0x10fed2)
    #1 zmq::fq_t::recv(zmq::msg_t*) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/fq.cpp:80 (libzmq.so.5+0x10fdc6)
    #2 zmq::xsub_t::xrecv(zmq::msg_t*) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/xsub.cpp:164 (libzmq.so.5+0x19d81d)
    #3 zmq::socket_base_t::recv(zmq::msg_t*, int) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/socket_base.cpp:1211 (libzmq.so.5+0x160ec5)
    #4 s_recvmsg /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:454 (libzmq.so.5+0x19f43f)
    #5 zmq_msg_recv /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:600 (libzmq.so.5+0x1a00d5)
    #6 zmq_recvmsg /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:466 (libzmq.so.5+0x19f4e0)
    #7 zframe_recv /home/oipo-unencrypted/Programming/czmq-4.2.0/src/zframe.c:172 (libczmq.so.4+0x3966b)
    #8 zmsg_recv /home/oipo-unencrypted/Programming/czmq-4.2.0/src/zmsg.c:92 (libczmq.so.4+0x50f53)
    #9 psa_zmq_recvThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:629 (libcelix_pubsub_admin_zmq.so.1+0x11c8d)
    #10 <null> <null> (libtsan.so.0+0x2b3c6)

  Location is heap block of size 1768 at 0x7b6c00000000 allocated by thread T5:
    #0 operator new(unsigned long, std::nothrow_t const&) <null> (libtsan.so.0+0x7861a)
    #1 zmq::socket_base_t::create(int, zmq::ctx_t*, unsigned int, int) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/socket_base.cpp:157 (libzmq.so.5+0x15aaed)
    #2 zmq::ctx_t::create_socket(int) /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/ctx.cpp:380 (libzmq.so.5+0xe70bb)
    #3 zmq_socket /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/zmq.cpp:238 (libzmq.so.5+0x19e623)
    #4 pubsub_zmqTopicReceiver_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:201 (libcelix_pubsub_admin_zmq.so.1+0xf8f2)
    #5 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0xa89f)
    #6 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:884 (libcelix_pubsub_topology_manager.so.1+0x9d8f)
    #7 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #8 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #9 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #10 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #11 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:933 (libcelix_pubsub_topology_manager.so.1+0xa25a)
    #12 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:973 (libcelix_pubsub_topology_manager.so.1+0xa571)
    #13 <null> <null> (libtsan.so.0+0x2b3c6)

  Mutex M172 (0x7b4c000016f8) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x2e561)
    #1 celixThreadMutex_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:102 (libcelix_utils.so.2+0x1020e)
    #2 pubsub_topologyManager_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:70 (libcelix_pubsub_topology_manager.so.1+0x5c53)
    #3 pstm_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:68 (libcelix_pubsub_topology_manager.so.1+0x51dc)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:170 (libcelix_pubsub_topology_manager.so.1+0x5ab4)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_subscriber_zmq/main.c:18 (pubsub_subscriber_zmq+0x1218)

  Mutex M447 (0x7b3400010078) created at:
    #0 pthread_rwlock_init <null> (libtsan.so.0+0x2ef82)
    #1 celixThreadRwlock_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:188 (libcelix_utils.so.2+0x10642)
    #2 celix_serviceTracker_createWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:712 (libcelix_framework.so.2+0x3f272)
    #3 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:783 (libcelix_framework.so.2+0x21690)
    #4 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #5 pstm_findPsaForEndpoints /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:795 (libcelix_pubsub_topology_manager.so.1+0x9375)
    #6 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:975 (libcelix_pubsub_topology_manager.so.1+0xa57d)
    #7 <null> <null> (libtsan.so.0+0x2b3c6)

  Mutex M220 (0x7b4400000220) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x2e561)
    #1 celixThreadMutex_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:102 (libcelix_utils.so.2+0x1020e)
    #2 pubsub_zmqAdmin_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:198 (libcelix_pubsub_admin_zmq.so.1+0x8bcd)
    #3 psa_zmq_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c:60 (libcelix_pubsub_admin_zmq.so.1+0x7bc3)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/psa_activator.c:143 (libcelix_pubsub_admin_zmq.so.1+0x8482)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_subscriber_zmq/main.c:18 (pubsub_subscriber_zmq+0x1218)

  Mutex M307 (0x7b440000ffa8) created at:
    #0 pthread_mutex_init <null> (libtsan.so.0+0x2e561)
    #1 celixThreadMutex_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:102 (libcelix_utils.so.2+0x1020e)
    #2 pubsub_zmqTopicReceiver_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:221 (libcelix_pubsub_admin_zmq.so.1+0xf9d2)
    #3 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0xa89f)
    #4 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:884 (libcelix_pubsub_topology_manager.so.1+0x9d8f)
    #5 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #6 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #7 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #8 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #9 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:933 (libcelix_pubsub_topology_manager.so.1+0xa25a)
    #10 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:973 (libcelix_pubsub_topology_manager.so.1+0xa571)
    #11 <null> <null> (libtsan.so.0+0x2b3c6)

  Thread T5 'PubSub TopologyManager' (tid=52602, running) created by main thread at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 pubsub_topologyManager_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:90 (libcelix_pubsub_topology_manager.so.1+0x5ee2)
    #3 pstm_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:68 (libcelix_pubsub_topology_manager.so.1+0x51dc)
    #4 celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:170 (libcelix_pubsub_topology_manager.so.1+0x5ab4)
    #5 fw_startBundle /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:884 (libcelix_framework.so.2+0x27815)
    #6 bundle_startWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle.c:267 (libcelix_framework.so.2+0x18373)
    #7 framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:603 (libcelix_framework.so.2+0x26467)
    #8 framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:570 (libcelix_framework.so.2+0x2624d)
    #9 framework_start /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:549 (libcelix_framework.so.2+0x25f58)
    #10 celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:172 (libcelix_framework.so.2+0x47ed8)
    #11 celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:157 (libcelix_framework.so.2+0x47e56)
    #12 celixLauncher_launchAndWaitForShutdown /home/oipo-unencrypted/Programming/celix/libs/framework/src/celix_launcher.c:113 (libcelix_framework.so.2+0x47bf7)
    #13 main /home/oipo-unencrypted/Programming/celix/build/celix/gen/containers/pubsub_subscriber_zmq/main.c:18 (pubsub_subscriber_zmq+0x1218)

  Thread T10 'ZMQ TR (null)/poi1' (tid=52607, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xff3d)
    #2 pubsub_zmqTopicReceiver_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:263 (libcelix_pubsub_admin_zmq.so.1+0xff2e)
    #3 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0xa89f)
    #4 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:884 (libcelix_pubsub_topology_manager.so.1+0x9d8f)
    #5 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:825 (libcelix_framework.so.2+0x3fac7)
    #6 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:856 (libcelix_framework.so.2+0x3fc6f)
    #7 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x217ad)
    #8 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x2128f)
    #9 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:933 (libcelix_pubsub_topology_manager.so.1+0xa25a)
INFO: [PSD] Adding discovered endpoint ffb8a26f-131a-4fbf-9b3d-948ded7fbea4. type is publisher, admin is zmq, serializer is json, protocol is envelope-v1.

    #10 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:973 (libcelix_pubsub_topology_manager.so.1+0xa571)
    #11 <null> <null> (libtsan.so.0+0x2b3c6)

SUMMARY: ThreadSanitizer: data race /home/oipo-unencrypted/Programming/libzmq-4.3.2/src/fq.cpp:49 in zmq::fq_t::attach(zmq::pipe_t*)
==================

@Oipo
Copy link
Contributor

Oipo commented May 5, 2020

@abroekhuis the last 3 reports are basically reporting that the usage of a zmq socket is not thread-safe. See http://api.zeromq.org/4-1:zmq#toc4

I do indeed see missing locks around the usage of sockets.

@mdelangthales
Copy link

Potential deadlock in subscriber:

==================
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=36614)
  Cycle in lock order graph: M254 (0x7b4400000bc0) => M176 (0x7b4c000011e8) => M254

  Mutex M176 acquired here while holding mutex M254 in thread T5:
    #0 pthread_mutex_lock ../../../../gcc-8.3.1-20190507/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3799 (libtsan.so.0+0x404eb)
    #1 pubsub_topologyManager_subscriberAdded bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:332 (libcelix_pubsub_topology_manager.so.1+0x5880)

  Mutex M254 previously acquired by the same thread here:
    #0 pthread_mutex_lock ../../../../gcc-8.3.1-20190507/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3799 (libtsan.so.0+0x404eb)
    #1 pubsub_zmqAdmin_setupTopicSender bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:468 (libcelix_pubsub_admin_zmq.so.1+0x64f4)

  Mutex M254 acquired here while holding mutex M176 in thread T5:
    #0 pthread_mutex_lock ../../../../gcc-8.3.1-20190507/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3799 (libtsan.so.0+0x404eb)
    #1 pubsub_zmqAdmin_setupTopicReceiver bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:562 (libcelix_pubsub_admin_zmq.so.1+0x68c7)

  Mutex M176 previously acquired by the same thread here:
    #0 pthread_mutex_lock ../../../../gcc-8.3.1-20190507/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3799 (libtsan.so.0+0x404eb)
    #1 pstm_setupTopicReceivers bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:887 (libcelix_pubsub_topology_manager.so.1+0x3e0b)
    #2 pstm_psaHandlingThread bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0x3e0b)

  Thread T5 'PubSub TopologyManager' (tid=36621, running) created by main thread at:
    #0 pthread_create ../../../../gcc-8.3.1-20190507/libsanitizer/tsan/tsan_interceptors.cc:915 (libtsan.so.0+0x2ed1b)
    #1 celixThread_create libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0x8f5c)
    #2 __libc_start_main <null> (libc.so.6+0x348ec1ed1f)

SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:332 in pubsub_topologyManager_subscriberAdded
==================

@mdelangthales
Copy link

==================
WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=53046)
  Cycle in lock order graph: M253 (0x7b4400000d00) => M71 (0x7b1400001cd0) => M253

  Mutex M71 acquired here while holding mutex M253 in thread T5:
    #0 pthread_mutex_lock ../../../../gcc-8.3.1-20190507/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3799 (libtsan.so.0+0x404eb)
    #1 shell_addLegacyCommand /thales/thales_localwork/dq545/Programming/build_tooling/lib_builder/celix/celix-src/bundles/shell/shell/src/shell.c:127 (libshell.so.2+0x4438)

  Mutex M253 previously acquired by the same thread here:
    #0 pthread_mutex_lock ../../../../gcc-8.3.1-20190507/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3799 (libtsan.so.0+0x404eb)
    #1 pubsub_zmqAdmin_setupTopicSender /thales/thales_localwork/dq545/Programming/build_tooling/lib_builder/celix/celix-src/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:468 (libcelix_pubsub_admin_zmq.so.1+0x608e)

  Mutex M253 acquired here while holding mutex M71 in thread T4:
    #0 pthread_mutex_lock ../../../../gcc-8.3.1-20190507/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3799 (libtsan.so.0+0x404eb)
    #1 pubsub_zmqAdmin_executeCommand /thales/thales_localwork/dq545/Programming/build_tooling/lib_builder/celix/celix-src/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:733 (libcelix_pubsub_admin_zmq.so.1+0x69f1)

  Mutex M71 previously acquired by the same thread here:
    #0 pthread_mutex_lock ../../../../gcc-8.3.1-20190507/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:3799 (libtsan.so.0+0x404eb)
    #1 shell_executeCommand /thales/thales_localwork/dq545/Programming/build_tooling/lib_builder/celix/celix-src/bundles/shell/shell/src/shell.c:273 (libshell.so.2+0x4891)

  Thread T5 'PubSub TopologyManager' (tid=53055, running) created by main thread at:
    #0 pthread_create ../../../../gcc-8.3.1-20190507/libsanitizer/tsan/tsan_interceptors.cc:915 (libtsan.so.0+0x2ed1b)
    #1 celixThread_create /thales/thales_localwork/dq545/Programming/build_tooling/lib_builder/celix/celix-src/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0x8e1c)
    #2 __libc_start_main <null> (libc.so.6+0x348ec1ed1f)

  Thread T4 (tid=53054, running) created by main thread at:
    #0 pthread_create ../../../../gcc-8.3.1-20190507/libsanitizer/tsan/tsan_interceptors.cc:915 (libtsan.so.0+0x2ed1b)
    #1 celixThread_create /thales/thales_localwork/dq545/Programming/build_tooling/lib_builder/celix/celix-src/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0x8e1c)
    #2 __libc_start_main <null> (libc.so.6+0x348ec1ed1f)

SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) /thales/thales_localwork/dq545/Programming/build_tooling/lib_builder/celix/celix-src/bundles/shell/shell/src/shell.c:127 in shell_addLegacyCommand
==================

@Oipo
Copy link
Contributor

Oipo commented May 7, 2020

If adding the publisher to the subscriber example (so that both are in the same executable), the following findings are reported by thread sanitizer:

==================
WARNING: ThreadSanitizer: data race (pid=65355)
  Write of size 8 at 0x7ba40003d1f0 by thread T14:
    #0 recv <null> (libtsan.so.0+0x4e306)
    #1 <null> <null> (libzmq.so.5+0x6b414)

  Previous read of size 1 at 0x7ba40003d1f7 by thread T15:
    #0 readInt /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34 (libcelix_pubsub_protocol_wire_v1.so.1+0x375c)
    #1 pubsubProtocol_decodeMetadata /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_protocol_wire_v1/src/pubsub_wire_protocol_impl.c:223 (libcelix_pubsub_protocol_wire_v1.so.1+0x34f5)
    #2 psa_zmq_recvThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:649 (libcelix_pubsub_admin_zmq.so.1+0xcea8)
    #3 <null> <null> (libtsan.so.0+0x2b3c6)

  Location is heap block of size 18160 at 0x7ba40003c000 allocated by thread T14:
    #0 malloc <null> (libtsan.so.0+0x2cbe6)
    #1 <null> <null> (libzmq.so.5+0x7bde3)

  Thread T14 'ZMQbg/IO/0' (tid=65370, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 <null> <null> (libzmq.so.5+0x6d9ac)
    #2 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0x8ced)
    #3 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:883 (libcelix_pubsub_topology_manager.so.1+0x4873)
    #4 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:821 (libcelix_framework.so.2+0x31d87)
    #5 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:852 (libcelix_framework.so.2+0x34281)
    #6 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x1bde7)
    #7 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x1bf23)
    #8 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:932 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #9 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #10 <null> <null> (libtsan.so.0+0x2b3c6)

  Thread T15 'ZMQ TR (null)/poi2' (tid=65371, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xda7c)
    #2 pubsub_zmqTopicReceiver_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:263 (libcelix_pubsub_admin_zmq.so.1+0xde21)
    #3 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0x8ced)
    #4 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:883 (libcelix_pubsub_topology_manager.so.1+0x4873)
    #5 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:821 (libcelix_framework.so.2+0x31d87)
    #6 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:852 (libcelix_framework.so.2+0x34281)
    #7 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x1bde7)
    #8 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x1bf23)
    #9 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:932 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #10 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #11 <null> <null> (libtsan.so.0+0x2b3c6)

SUMMARY: ThreadSanitizer: data race (/lib/x86_64-linux-gnu/libtsan.so.0+0x4e306) in __interceptor_recv
==================
==================
WARNING: ThreadSanitizer: data race (pid=65355)
  Write of size 8 at 0x7ba4000dc000 by thread T12:
    #0 free <null> (libtsan.so.0+0x2cf6b)
    #1 <null> <null> (libzmq.so.5+0x3890c)
    #2 <null> <null> (libtsan.so.0+0x2b3c6)

  Previous write of size 8 at 0x7ba4000dc000 by thread T11:
    #0 malloc <null> (libtsan.so.0+0x2cbe6)
    #1 <null> <null> (libzmq.so.5+0x37e28)

  Thread T12 'ZMQ TR (null)/poi1' (tid=65368, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xda7c)
    #2 pubsub_zmqTopicReceiver_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:263 (libcelix_pubsub_admin_zmq.so.1+0xde21)
    #3 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0x8ced)
    #4 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:883 (libcelix_pubsub_topology_manager.so.1+0x4873)
    #5 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:821 (libcelix_framework.so.2+0x31d87)
    #6 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:852 (libcelix_framework.so.2+0x34281)
    #7 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x1bde7)
    #8 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x1bf23)
    #9 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:932 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #10 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #11 <null> <null> (libtsan.so.0+0x2b3c6)

  Thread T11 'ZMQbg/IO/0' (tid=65367, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 <null> <null> (libzmq.so.5+0x6d9ac)
    #2 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0x8ced)
    #3 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:883 (libcelix_pubsub_topology_manager.so.1+0x4873)
    #4 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:821 (libcelix_framework.so.2+0x31d87)
    #5 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:852 (libcelix_framework.so.2+0x34281)
    #6 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x1bde7)
    #7 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x1bf23)
    #8 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:932 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #9 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #10 <null> <null> (libtsan.so.0+0x2b3c6)

SUMMARY: ThreadSanitizer: data race (/lib/x86_64-linux-gnu/libtsan.so.0+0x2cf6b) in free
==================
==================
WARNING: ThreadSanitizer: data race (pid=65355)
  Read of size 1 at 0x7ba4000b402e by thread T15:
    #0 pubsubProtocol_parseNetstring /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_protocol_wire_v1/src/pubsub_wire_protocol_impl.c:339 (libcelix_pubsub_protocol_wire_v1.so.1+0x29bf)
    #1 pubsubProtocol_decodeMetadata /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_protocol_wire_v1/src/pubsub_wire_protocol_impl.c:230 (libcelix_pubsub_protocol_wire_v1.so.1+0x3698)
    #2 psa_zmq_recvThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:649 (libcelix_pubsub_admin_zmq.so.1+0xcea8)
    #3 <null> <null> (libtsan.so.0+0x2b3c6)

  Previous write of size 8 at 0x7ba4000b4028 by thread T14:
    #0 recv <null> (libtsan.so.0+0x4e306)
    #1 <null> <null> (libzmq.so.5+0x6b414)

  Location is heap block of size 18160 at 0x7ba4000b4000 allocated by thread T14:
    #0 malloc <null> (libtsan.so.0+0x2cbe6)
    #1 <null> <null> (libzmq.so.5+0x7bde3)

  Thread T15 'ZMQ TR (null)/poi2' (tid=65371, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 celixThread_create /home/oipo-unencrypted/Programming/celix/libs/utils/src/celix_threads.c:37 (libcelix_utils.so.2+0xda7c)
    #2 pubsub_zmqTopicReceiver_create /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_receiver.c:263 (libcelix_pubsub_admin_zmq.so.1+0xde21)
    #3 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0x8ced)
    #4 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:883 (libcelix_pubsub_topology_manager.so.1+0x4873)
Invoked preReceive on first interceptor, for message with sequenceNumber [85]
Invoked preReceive on second interceptor
    #5 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:821 (libcelix_framework.so.2+0x31d87)
    #6 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:852 (libcelix_framework.so.2+0x34281)
    #7 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x1bde7)
    #8 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x1bf23)
    #9 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:932 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #10 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0x5b16)
Recv (poi1): [84.313637, -54.971437] (Bundle#9, fw-ed28c892 [TID=140216499042048], extra value, len data 19314)
    #11 <null> <null> (libtsan.so.0+0x2b3c6)
Key=Value

sequence.number=85
  Thread T14 'ZMQbg/IO/0' (tid=65370, running) created by thread T5 at:
    #0 pthread_create <null> (libtsan.so.0+0x2dc82)
    #1 <null> <null> (libzmq.so.5+0x6d9ac)
    #2 pubsub_zmqAdmin_setupTopicReceiver /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:569 (libcelix_pubsub_admin_zmq.so.1+0x8ced)
Invoked postReceive on first interceptor, for message with sequenceNumber [85]
Invoked postReceive on second interceptor
    #3 pstm_setupTopicReceiverCallback /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:883 (libcelix_pubsub_topology_manager.so.1+0x4873)
    #4 serviceTracker_useHighestRankingServiceInternal /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:821 (libcelix_framework.so.2+0x31d87)
    #5 celix_serviceTracker_useHighestRankingService /home/oipo-unencrypted/Programming/celix/libs/framework/src/service_tracker.c:852 (libcelix_framework.so.2+0x34281)
    #6 celix_bundleContext_useServiceWithOptions /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:794 (libcelix_framework.so.2+0x1bde7)
    #7 celix_bundleContext_useServiceWithId /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:741 (libcelix_framework.so.2+0x1bf23)
    #8 pstm_setupTopicReceivers /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:932 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #9 pstm_psaHandlingThread /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:972 (libcelix_pubsub_topology_manager.so.1+0x5b16)
    #10 <null> <null> (libtsan.so.0+0x2b3c6)

SUMMARY: ThreadSanitizer: data race /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_protocol_wire_v1/src/pubsub_wire_protocol_impl.c:339 in pubsubProtocol_parseNetstring
==================

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

Successfully merging a pull request may close this issue.

3 participants