celix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [celix] Oipo commented on issue #205: psa_zmq command stuck
Date Thu, 07 May 2020 12:26:04 GMT

Oipo commented on issue #205:
URL: https://github.com/apache/celix/issues/205#issuecomment-625223588


   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
   ==================
   ```
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message