Skip to content
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

leak during shutdown when /oic/res is observable #486

Closed
Danielius1922 opened this issue Jul 13, 2023 · 0 comments
Closed

leak during shutdown when /oic/res is observable #486

Danielius1922 opened this issue Jul 13, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Danielius1922
Copy link
Member

Danielius1922 commented Jul 13, 2023

Direct leak of 336 byte(s) in 6 object(s) allocated from:
#0 0x7fb0fe3f7e47 in __interceptor_calloc ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:90
#1 0x55684ef10b63 in _oc_memb_alloc /home/runner/work/iotivity-lite/iotivity-lite/util/oc_memb.c:86
#2 0x55684ef229d2 in oc_ri_add_timed_event_callback_ticks /home/runner/work/iotivity-lite/iotivity-lite/api/oc_event_callback.c:180
#3 0x55684ef33bb1 in oc_set_delayed_callback /home/runner/work/iotivity-lite/iotivity-lite/api/oc_server_api.c:194
#4 0x55684ef433bb in dispatch_process_batch_observers /home/runner/work/iotivity-lite/iotivity-lite/messaging/coap/observe.c:1133
#5 0x55684ef43dfd in add_notification_batch_observers_list /home/runner/work/iotivity-lite/iotivity-lite/messaging/coap/observe.c:1356
#6 0x55684ef43e3f in coap_remove_discovery_batch_observers_by_resource /home/runner/work/iotivity-lite/iotivity-lite/messaging/coap/observe.c:1365
#7 0x55684ef31798 in oc_ri_delete_resource /home/runner/work/iotivity-lite/iotivity-lite/api/oc_ri.c:683
#8 0x55684ef314e7 in oc_ri_delete_all_app_resources /home/runner/work/iotivity-lite/iotivity-lite/api/oc_ri.c:552
#9 0x55684ef33545 in oc_ri_shutdown /home/runner/work/iotivity-lite/iotivity-lite/api/oc_ri.c:1620
#10 0x55684ef24e7a in oc_main_shutdown /home/runner/work/iotivity-lite/iotivity-lite/api/oc_main.c:441
#11 0x55684eea1423 in ApiHelper::stopServer() /home/runner/work/iotivity-lite/iotivity-lite/api/unittest/ocapitest.cpp:399
#12 0x55684eea27ec in TestServerClient::TearDown() /home/runner/work/iotivity-lite/iotivity-lite/api/unittest/ocapitest.cpp:591

Replication steps

  • set -DOC_DISCOVERY_RESOURCE_OBSERVABLE_ENABLED=ON
  • run apitest
@Danielius1922 Danielius1922 added the bug Something isn't working label Jul 13, 2023
Danielius1922 added a commit that referenced this issue Jul 20, 2023
Do not generate notification for observers when resource is deleted
during device shutdown.

Fixes issue #486
Danielius1922 added a commit that referenced this issue Jul 22, 2023
Do not generate notification for observers when resource is deleted
during device shutdown.

Fixes issue #486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant