-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
In the code above,during read manager->exportedServices, it does not lock exportedServicesLock. It may cause some problem. The following stack information is produced by GDB suspension specific breakpoints.
==87715==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x7ffff67013d5 bp 0x7fffe93b91c0 sp 0x7fffe93b91b0 T21)
==87715==The signal is caused by a READ memory access.
==87715==Hint: address points to the zero page.
#0 0x7ffff67013d4 in hashMapIterator_init /home/xuzhenbao/code/celix/libs/utils/src/hash_map.c:371
#1 0x7ffff6701199 in hashMapIterator_create /home/xuzhenbao/code/celix/libs/utils/src/hash_map.c:358
#2 0x7fffe57962a2 in topologyManager_endpointListenerAdded /home/xuzhenbao/code/celix/bundles/remote_services/topology_manager/src/topology_manager.c:697
#3 0x7ffff6bd45aa in serviceTracker_invokeAddService /home/xuzhenbao/code/celix/libs/framework/src/service_tracker.c:479
#4 0x7ffff6bd3f64 in serviceTracker_track /home/xuzhenbao/code/celix/libs/framework/src/service_tracker.c:424
#5 0x7ffff6bd36d3 in serviceTracker_serviceChanged /home/xuzhenbao/code/celix/libs/framework/src/service_tracker.c:348
#6 0x7ffff6bd0f30 in celix_serviceRegistry_serviceChanged /home/xuzhenbao/code/celix/libs/framework/src/service_registry.c:1131
#7 0x7ffff6bcabfc in serviceRegistry_registerServiceInternal /home/xuzhenbao/code/celix/libs/framework/src/service_registry.c:234
#8 0x7ffff6bca545 in serviceRegistry_registerService /home/xuzhenbao/code/celix/libs/framework/src/service_registry.c:185
#9 0x7ffff6bac830 in fw_registerService /home/xuzhenbao/code/celix/libs/framework/src/framework.c:934
#10 0x7ffff6b97ede in bundleContext_registerService /home/xuzhenbao/code/celix/libs/framework/src/bundle_context.c:182
#11 0x7fffebca7aac in bundleActivator_start /home/xuzhenbao/code/celix/bundles/remote_services/discovery_common/src/discovery_activator.c:136
#12 0x7ffff6bb8772 in celix_framework_startBundleEntry /home/xuzhenbao/code/celix/libs/framework/src/framework.c:2571
#13 0x7ffff6bec898 in celix_framework_stopStartBundleThread /home/xuzhenbao/code/celix/libs/framework/src/framework_bundle_lifecycle_handler.c:33
#14 0x7ffff5a1c6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
#15 0x7ffff574561e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x12161e)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/xuzhenbao/code/celix/libs/utils/src/hash_map.c:371 in hashMapIterator_init
Thread T21 created by T17 here:
#0 0x7ffff6e4fd2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f)
#1 0x7ffff670548e in celixThread_create /home/xuzhenbao/code/celix/libs/utils/src/celix_threads.c:38
#2 0x7ffff6bed0b3 in celix_framework_createAndStartBundleLifecycleHandler /home/xuzhenbao/code/celix/libs/framework/src/framework_bundle_lifecycle_handler.c:98
#3 0x7ffff6bed162 in celix_framework_startBundleOnANonCelixEventThread /home/xuzhenbao/code/celix/libs/framework/src/framework_bundle_lifecycle_handler.c:105
#4 0x7ffff6bb7a73 in celix_framework_startBundleInternal /home/xuzhenbao/code/celix/libs/framework/src/framework.c:2455
#5 0x7ffff6bb7af7 in celix_framework_startBundleAsync /home/xuzhenbao/code/celix/libs/framework/src/framework.c:2469
#6 0x7fffe1aff333 in startCommand_execute /home/xuzhenbao/code/celix/bundles/shell/shell/src/start_command.c:50
#7 0x7fffe1afb9a8 in shell_executeCommand /home/xuzhenbao/code/celix/bundles/shell/shell/src/c_shell.c:276
#8 0x7fffe18ecaea in shellTui_parseInputPlain /home/xuzhenbao/code/celix/bundles/shell/shell_tui/src/shell_tui.c:283
#9 0x7fffe18ec8b1 in shellTui_parseInput /home/xuzhenbao/code/celix/bundles/shell/shell_tui/src/shell_tui.c:265
#10 0x7fffe18ec562 in shellTui_runnable /home/xuzhenbao/code/celix/bundles/shell/shell_tui/src/shell_tui.c:233
#11 0x7ffff5a1c6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
Thread T17 created by T0 here:
#0 0x7ffff6e4fd2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x37d2f)
#1 0x7ffff670548e in celixThread_create /home/xuzhenbao/code/celix/libs/utils/src/celix_threads.c:38
#2 0x7fffe18eb920 in shellTui_start /home/xuzhenbao/code/celix/bundles/shell/shell_tui/src/shell_tui.c:127
#3 0x7fffe18eb131 in celix_shellTuiActivator_start /home/xuzhenbao/code/celix/bundles/shell/shell_tui/src/activator.c:83
#4 0x7fffe18eb39a in celix_bundleActivator_start /home/xuzhenbao/code/celix/bundles/shell/shell_tui/src/activator.c:101
#5 0x7ffff6bb8772 in celix_framework_startBundleEntry /home/xuzhenbao/code/celix/libs/framework/src/framework.c:2571
#6 0x7ffff6bed20d in celix_framework_startBundleOnANonCelixEventThread /home/xuzhenbao/code/celix/libs/framework/src/framework_bundle_lifecycle_handler.c:113
#7 0x7ffff6bb7a73 in celix_framework_startBundleInternal /home/xuzhenbao/code/celix/libs/framework/src/framework.c:2455
#8 0x7ffff6bb7acd in celix_framework_startBundle /home/xuzhenbao/code/celix/libs/framework/src/framework.c:2465
#9 0x7ffff6ba9f83 in framework_autoStartConfiguredBundlesForList /home/xuzhenbao/code/celix/libs/framework/src/framework.c:588
#10 0x7ffff6ba99b5 in framework_autoStartConfiguredBundles /home/xuzhenbao/code/celix/libs/framework/src/framework.c:543
#11 0x7ffff6ba9389 in framework_start /home/xuzhenbao/code/celix/libs/framework/src/framework.c:517
#12 0x7ffff6be379f in celix_frameworkFactory_createFramework /home/xuzhenbao/code/celix/libs/framework/src/celix_framework_factory.c:34
#13 0x7ffff6be2ca5 in celixLauncher_launchWithProperties /home/xuzhenbao/code/celix/libs/framework/src/celix_launcher.c:158
#14 0x7ffff6be2c7d in celixLauncher_launchWithConfigAndProps /home/xuzhenbao/code/celix/libs/framework/src/celix_launcher.c:149
#15 0x7ffff6be2a13 in celixLauncher_launchAndWaitForShutdown /home/xuzhenbao/code/celix/libs/framework/src/celix_launcher.c:105
#16 0x555555554ad8 in main /home/xuzhenbao/code/celix/build/celix/gen/containers/remote-services-dfi/main.c:19
#17 0x7ffff5645c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
==87715==ABORTING
Metadata
Metadata
Assignees
Labels
No labels