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 a change in pull request #192: Fixed merge problems wrt scope usage.
Date Tue, 14 Apr 2020 13:58:53 GMT
Oipo commented on a change in pull request #192: Fixed merge problems wrt scope usage.
URL: https://github.com/apache/celix/pull/192#discussion_r408146569
 
 

 ##########
 File path: bundles/pubsub/pubsub_spi/src/pubsub_endpoint.c
 ##########
 @@ -159,12 +161,11 @@ celix_properties_t* pubsubEndpoint_createFromPublisherTrackerInfo(bundle_context
     char* topic = NULL;
     char* scopeFromFilter = NULL;
     pubsub_getPubSubInfoFromFilter(filter, &scopeFromFilter, &topic);
-    const char *scope = scopeFromFilter == NULL ? "default" : scopeFromFilter;
+    const char *scope = scopeFromFilter;
 
     struct retrieve_topic_properties_data data;
     data.props = NULL;
     data.isPublisher = true;
-    data.scope = scope;
 
 Review comment:
   This results in a segfault when running `pubsub_zmq_tests`:
   ```
   Thread 3 "pubsub_zmq_test" received signal SIGSEGV, Segmentation fault.
   [Switching to Thread 0x7ffff5ef3700 (LWP 48185)]
   __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
   65	../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
   (gdb) bt
   #0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
   #1  0x00007ffff7955de5 in __vfprintf_internal (s=s@entry=0x7ffff5ef2640, format=format@entry=0x7ffff56ee658
"%s/META-INF/topics/%s/%s.%s.properties", ap=ap@entry=0x7ffff5ef2780, mode_flags=mode_flags@entry=0)
at vfprintf-internal.c:1688
   #2  0x00007ffff7968c5a in __vasprintf_internal (result_ptr=0x7ffff5ef2898, format=0x7ffff56ee658
"%s/META-INF/topics/%s/%s.%s.properties", args=args@entry=0x7ffff5ef2780, mode_flags=mode_flags@entry=0)
at vasprintf.c:57
   #3  0x00007ffff793f06a in ___asprintf (string_ptr=<optimized out>, format=<optimized
out>) at asprintf.c:31
   #4  0x00007ffff56ebb00 in pubsub_utils_getTopicProperties (bundle=0x5555555daa50, scope=0x8000000000000006
<error: Cannot access memory at address 0x8000000000000006>, topic=0x7fffe80010b0 "ping",
isPublisher=true) at /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_utils/src/pubsub_utils.c:133
   #5  0x00007ffff56e9ef1 in retrieveTopicProperties (handle=0x7ffff5ef29c0, bnd=0x5555555daa50)
at /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_spi/src/pubsub_endpoint.c:121
   #6  0x00007ffff7f9efce in celix_framework_useBundle (fw=0x5555555d16e0, onlyActive=true,
bundleId=5, callbackHandle=0x7ffff5ef29c0, use=0x7ffff56e9eae <retrieveTopicProperties>)
at /home/oipo-unencrypted/Programming/celix/libs/framework/src/framework.c:2303
   #7  0x00007ffff7f966d5 in celix_bundleContext_useBundle (ctx=0x5555555e5100, bundleId=5,
callbackHandle=0x7ffff5ef29c0, use=0x7ffff56e9eae <retrieveTopicProperties>) at /home/oipo-unencrypted/Programming/celix/libs/framework/src/bundle_context.c:613
   #8  0x00007ffff56ea12f in pubsubEndpoint_createFromPublisherTrackerInfo (ctx=0x5555555e5100,
bundleId=5, filter=0x5555555eb3b0 "(&(objectClass=pubsub.publisher)(service.lang=C)(topic=ping))")
at /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_spi/src/pubsub_endpoint.c:170
   #9  0x00007ffff56ea966 in pubsubEndpoint_matchPublisher (ctx=0x5555555e5100, bundleId=5,
filter=0x5555555eb3b0 "(&(objectClass=pubsub.publisher)(service.lang=C)(topic=ping))",
adminType=0x7ffff56ec8c9 "zmq", sampleScore=30, controlScore=70, defaultScore=30, matchProtocol=true,
outTopicProperties=0x7ffff5ef2b58, 
       outSerializerSvcId=0x7ffff5ef2b48, outProtocolSvcId=0x7ffff5ef2b50) at /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_spi/src/pubsub_endpoint_match.c:159
   #10 0x00007ffff56e3098 in pubsub_zmqAdmin_matchPublisher (handle=0x5555555e5c70, svcRequesterBndId=5,
svcFilter=0x5555555eb690, topicProperties=0x7ffff5ef2b58, outScore=0x7ffff5ef2b40, outSerializerSvcId=0x7ffff5ef2b48,
outProtocolSvcId=0x7ffff5ef2b50)
       at /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_admin_zmq/src/pubsub_zmq_admin.c:422
   #11 0x00007ffff7f45b97 in pstm_setupTopicSenders (manager=0x5555555dd090) at /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:823
   #12 0x00007ffff7f46336 in pstm_psaHandlingThread (data=0x5555555dd090) at /home/oipo-unencrypted/Programming/celix/bundles/pubsub/pubsub_topology_manager/src/pubsub_topology_manager.c:958
   #13 0x00007ffff7ad4669 in start_thread (arg=<optimized out>) at pthread_create.c:479
   #14 0x00007ffff79fc323 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
   
   ```
   
   If scope is not necessary in data, perhaps use `data.scope = NULL`.

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

Mime
View raw message