-
Notifications
You must be signed in to change notification settings - Fork 84
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
[pubsub] pubsub examples for zmq and tcpadmin are not working on develop #190
Comments
Hi,
I have seen issues with the scope in both ZMQ and TCPadmin.
I think this is related to the changes make in scoping.
Greetings,
Roy
Op di 14 apr. 2020 om 09:23 schreef Michael de Lang <
notifications@github.com>:
… 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
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#190 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2AMISC5XMINWT5M7QC5D3RMQFOLANCNFSM4MEQSA3A>
.
|
Can you give a bit more info? |
Zerocopy test is disabled on purpose, that solution is experimental, and not yet done. @pnoltes knows how/why. I didn't put to much time in it, but if we can easily fix those problems, let's do so! |
zerocopy is not the issue, i am not using this. code from ps_pub_activator.c:
|
Thanks for the info, let me check if I have some local changes that are missing. For me the zmq example works (both with and without a scope). I can't test the tcp admin on OSX, since it uses epoll. A fix so that kqueue is used in that case would be nice ;). |
Can you open a new issue? I'll get in contact with @rbulter to get the examples working again. Thx! |
I agree #192 fixed this issue. |
The pubsub examples for zmq and tcpadmin are not working on develop.
The publisher component that request the pubsub publisher service using a default score,
but does not get the service.
The text was updated successfully, but these errors were encountered: