PengZheng commented on issue #653: URL: https://github.com/apache/celix/issues/653#issuecomment-1732533364
I've verified that adding `celix_framework_stopBundleEntry` back will "fix" the problem. ```C size = celix_arrayList_size(stopEntries); for (int i = size-1; i >= 0; --i) { //note loop in reverse order -> stop later installed bundle first celix_framework_bundle_entry_t *entry = celix_arrayList_get(stopEntries, i); //NOTE possible starvation. // fw_bundleEntry_waitTillUseCountIs(entry, 1); //note this function has 1 use count. //note race between condition (use count == 1) and bundle stop, meaning use count can be > 1 when //celix_framework_stopBundleEntry is called. bundle_state_e state = celix_bundle_getState(entry->bnd); if (state == CELIX_BUNDLE_STATE_ACTIVE || state == CELIX_BUNDLE_STATE_STARTING) { celix_framework_stopBundleEntry(fw, entry); } } for (int i = size-1; i >= 0; --i) { //note loop in reverse order -> uninstall later installed bundle first celix_framework_bundle_entry_t *entry = celix_arrayList_get(stopEntries, i); celix_framework_uninstallBundleEntry(fw, entry, false); } celix_arrayList_destroy(stopEntries); ``` -- 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. To unsubscribe, e-mail: dev-unsubscr...@celix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org