You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by GitBox <gi...@apache.org> on 2020/04/14 07:54:18 UTC

[GitHub] [celix] Oipo commented on issue #191: Aggregated pubsub issues

Oipo commented on issue #191: Aggregated pubsub issues
URL: https://github.com/apache/celix/issues/191#issuecomment-613284772
 
 
   There's currently numerous issues with ZMQ in celix, I'm hijacking this comment for now. If desired, we can split it off to several issues.
   
   Found a heap after use error with the pubsub_zmq_zerocopy_test:
   ```
   =================================================================
   ==46261==ERROR: AddressSanitizer: heap-use-after-free on address 0x602000012410 at pc 0x7e29d5522480 bp 0x7e29cc97fd70 sp 0x7e29cc97f518
   READ of size 12 at 0x602000012410 thread T9 (ZMQbg/IO/0)
       #0 0x7e29d552247f  (/lib/x86_64-linux-gnu/libasan.so.5+0x9b47f)
       #1 0x7e29cfdaee78  (/lib/x86_64-linux-gnu/libzmq.so.5+0x74e78)
       #2 0x7e29cfd9f366  (/lib/x86_64-linux-gnu/libzmq.so.5+0x65366)
       #3 0x7e29cfd695eb  (/lib/x86_64-linux-gnu/libzmq.so.5+0x2f5eb)
       #4 0x7e29cfd6589d  (/lib/x86_64-linux-gnu/libzmq.so.5+0x2b89d)
       #5 0x7e29cfda7e0e  (/lib/x86_64-linux-gnu/libzmq.so.5+0x6de0e)
       #6 0x7e29d424c668 in start_thread /build/glibc-t7JzpG/glibc-2.30/nptl/pthread_create.c:479
       #7 0x7e29d4174322 in clone (/lib/x86_64-linux-gnu/libc.so.6+0x122322)
   
   0x602000012410 is located 0 bytes inside of 12-byte region [0x602000012410,0x60200001241c)
   freed by thread T4 here:
       #0 0x7e29d55946ef in __interceptor_free (/lib/x86_64-linux-gnu/libasan.so.5+0x10d6ef)
       #1 0x7e29d028ea2a in pubsubMsgSerializer_freeSerializeMsg /home/oipo-unencrypted/Programming/celix-apache/bundles/pubsub/pubsub_serializer_json/src/pubsub_serializer_impl.c:216
       #2 0x7e29cfb7f64c in psa_zmq_topicPublicationSend /home/oipo-unencrypted/Programming/celix-apache/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_topic_sender.c:642
       #3 0x7e29cfb0c5fd in sut_sendThread /home/oipo-unencrypted/Programming/celix-apache/bundles/pubsub/test/test/sut_activator.c:96
       #4 0x7e29d424c668 in start_thread /build/glibc-t7JzpG/glibc-2.30/nptl/pthread_create.c:479
   
   previously allocated by thread T4 here:
       #0 0x7e29d5594ae8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dae8)
       #1 0x7e29d50dab14  (/lib/x86_64-linux-gnu/libjansson.so.4+0x5b14)
   
   Thread T9 (ZMQbg/IO/0) created by T2 here:
       #0 0x7e29d54c1805 in pthread_create (/lib/x86_64-linux-gnu/libasan.so.5+0x3a805)
       #1 0x7e29cfda79ac  (/lib/x86_64-linux-gnu/libzmq.so.5+0x6d9ac)
   
   Thread T2 created by T0 here:
       #0 0x7e29d54c1805 in pthread_create (/lib/x86_64-linux-gnu/libasan.so.5+0x3a805)
       #1 0x7e29d504f573 in celixThread_create /home/oipo-unencrypted/Programming/celix-apache/libs/utils/src/celix_threads.c:37
       #2 0x7e29d0096df3 in pubsub_topologyManager_create /home/oipo-unencrypted/Programming/celix-apache/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:90
       #3 0x7e29d00948b7 in pstm_start /home/oipo-unencrypted/Programming/celix-apache/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:68
       #4 0x7e29d0096135 in celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix-apache/bundles/pubsub/pubsub_topology_manager/src/pstm_activator.c:170
       #5 0x7e29d52e4e29 in fw_startBundle /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/framework.c:884
       #6 0x7e29d52bf459 in bundle_startWithOptions /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/bundle.c:267
       #7 0x7e29d52e2097 in framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/framework.c:603
       #8 0x7e29d52e1ba1 in framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/framework.c:570
       #9 0x7e29d52e14ea in framework_start /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/framework.c:549
       #10 0x7e29d533931a in celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/celix_launcher.c:172
       #11 0x7e29d5339279 in celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/celix_launcher.c:157
       #12 0x7e29d53391e3 in celixLauncher_launch /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/celix_launcher.c:141
       #13 0x58825948dead in TEST_GROUP_CppUTestGroupPUBSUB_INT_GROUP::setup() /home/oipo-unencrypted/Programming/celix-apache/build/celix/gen/containers/pubsub_zmq_zerocopy_tests/test_runner.cc:37
       #14 0x58825949cfd1 in PlatformSpecificSetJmpImplementation (/home/oipo-unencrypted/Programming/celix-apache/build/bundles/pubsub/test/pubsub_zmq_zerocopy_tests/pubsub_zmq_zerocopy_tests+0x2cfd1)
       #15 0x6030000010bf  (<unknown module>)
   
   Thread T4 created by T0 here:
       #0 0x7e29d54c1805 in pthread_create (/lib/x86_64-linux-gnu/libasan.so.5+0x3a805)
       #1 0x7e29cfb0b8d5 in bnd_start /home/oipo-unencrypted/Programming/celix-apache/bundles/pubsub/test/test/sut_activator.c:54
       #2 0x7e29cfb0bd03 in celix_bundleActivator_start /home/oipo-unencrypted/Programming/celix-apache/bundles/pubsub/test/test/sut_activator.c:70
       #3 0x7e29d52e4e29 in fw_startBundle /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/framework.c:884
       #4 0x7e29d52bf459 in bundle_startWithOptions /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/bundle.c:267
       #5 0x7e29d52e2097 in framework_autoStartConfiguredBundlesForList /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/framework.c:603
       #6 0x7e29d52e1ba1 in framework_autoStartConfiguredBundles /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/framework.c:570
       #7 0x7e29d52e14ea in framework_start /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/framework.c:549
       #8 0x7e29d533931a in celixLauncher_launchWithProperties /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/celix_launcher.c:172
       #9 0x7e29d5339279 in celixLauncher_launchWithConfigAndProps /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/celix_launcher.c:157
       #10 0x7e29d53391e3 in celixLauncher_launch /home/oipo-unencrypted/Programming/celix-apache/libs/framework/src/celix_launcher.c:141
       #11 0x58825948dead in TEST_GROUP_CppUTestGroupPUBSUB_INT_GROUP::setup() /home/oipo-unencrypted/Programming/celix-apache/build/celix/gen/containers/pubsub_zmq_zerocopy_tests/test_runner.cc:37
       #12 0x58825949cfd1 in PlatformSpecificSetJmpImplementation (/home/oipo-unencrypted/Programming/celix-apache/build/bundles/pubsub/test/pubsub_zmq_zerocopy_tests/pubsub_zmq_zerocopy_tests+0x2cfd1)
       #13 0x6030000010bf  (<unknown module>)
   
   SUMMARY: AddressSanitizer: heap-use-after-free (/lib/x86_64-linux-gnu/libasan.so.5+0x9b47f) 
   Shadow bytes around the buggy address:
     0x0c047fffa430: fa fa fd fd fa fa fd fd fa fa fd fa fa fa fd fd
     0x0c047fffa440: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fd
     0x0c047fffa450: fa fa fd fa fa fa fd fd fa fa fd fd fa fa fd fa
     0x0c047fffa460: fa fa fd fd fa fa fd fd fa fa fd fa fa fa fd fd
     0x0c047fffa470: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fd
   =>0x0c047fffa480: fa fa[fd]fd fa fa 00 fa fa fa 00 fa fa fa fd fd
     0x0c047fffa490: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
     0x0c047fffa4a0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fd fd
     0x0c047fffa4b0: fa fa fd fd fa fa fd fd fa fa fd fd fa fa fa fa
     0x0c047fffa4c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
     0x0c047fffa4d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
   Shadow byte legend (one shadow byte represents 8 application bytes):
     Addressable:           00
     Partially addressable: 01 02 03 04 05 06 07 
     Heap left redzone:       fa
     Freed heap region:       fd
     Stack left redzone:      f1
     Stack mid redzone:       f2
     Stack right redzone:     f3
     Stack after return:      f5
     Stack use after scope:   f8
     Global redzone:          f9
     Global init order:       f6
     Poisoned by user:        f7
     Container overflow:      fc
     Array cookie:            ac
     Intra object redzone:    bb
     ASan internal:           fe
     Left alloca redzone:     ca
     Right alloca redzone:    cb
     Shadow gap:              cc
   ==46261==ABORTING
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services