Add handle id log for sync failure issue 64/235864/11
authorYoungHun Kim <yh8004.kim@samsung.com>
Wed, 10 Jun 2020 10:55:10 +0000 (19:55 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Fri, 12 Jun 2020 08:19:54 +0000 (17:19 +0900)
Change-Id: I86fcce45a44244f1aaa3771867cf559dfe67be9f

src/daemon/mm_resource_manager_daemon_dbus.c
src/daemon/mm_resource_manager_daemon_priv.c
src/lib/mm_resource_manager_priv.c

index 9b2361c..7da49c4 100644 (file)
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include <inttypes.h>
 #include "daemon/mm_resource_manager_daemon_dbus.h"
 #include "common/mm_resource_manager_dbus.h"
 #include "daemon/mm_resource_manager_daemon_priv.h"
@@ -173,7 +174,8 @@ int _mmrm_dmn_dbus_commit(mm_resource_manager_id id, GVariantIter *release, GVar
                goto out;
        }
 
-       MM_RM_DEBUG("Commit release request of %"G_GSIZE_FORMAT" items [type %d]", release_len, type);
+       MM_RM_DEBUG("Commit release request (#%"PRIu64") of %"G_GSIZE_FORMAT" items [type %d]",
+               _mm_rm_hash64(id), release_len, type);
 
        __gv2c_array(acquire, &acquire_requests);
 
@@ -185,7 +187,8 @@ int _mmrm_dmn_dbus_commit(mm_resource_manager_id id, GVariantIter *release, GVar
                goto out;
        }
 
-       MM_RM_DEBUG("Commit acquire request of %"G_GSIZE_FORMAT" items [type %d]", acquire_len, type);
+       MM_RM_DEBUG("Commit acquire request (#%"PRIu64") of %"G_GSIZE_FORMAT" items [type %d]",
+               _mm_rm_hash64(id), acquire_len, type);
 
        ret = _mmrm_dmn_commit(id, release_requests, acquire_requests);
        if (ret != MM_RESOURCE_MANAGER_ERROR_NONE) {
@@ -334,7 +337,7 @@ static gboolean on_commit_handle(MMResourceManager *interface, GDBusMethodInvoca
        GVariantIter *acquire_array;
        gint i;
 
-       MM_RM_DEBUG("Receive commit message");
+       MM_RM_DEBUG("Enter (RM #%"PRIu64") Receive commit message", _mm_rm_hash64(id));
 
        release_array = g_variant_iter_new(release);
        acquire_array = g_variant_iter_new(acquire);
@@ -358,6 +361,8 @@ out:
        g_variant_iter_free(release_array);
        g_variant_iter_free(acquire_array);
 
+       MM_RM_DEBUG("Leave (RM #%"PRIu64") commit message handled", _mm_rm_hash64(id));
+
        return ret;
 }
 
index dd3020a..eda8e04 100644 (file)
@@ -88,7 +88,7 @@ static void __handle_release_callbacks(GArray *requests);
 static inline void __add_cb_request(GArray *cb_requests, mm_resource_manager_dmn_p mgr,
                mm_resource_manager_res_type_e type, mm_resource_manager_res_volume volume);
 static void __release_all_resources(mm_resource_manager_dmn_p manager);
-static gboolean __poll(struct pollfd sync);
+static gboolean __poll(struct pollfd sync, mm_resource_manager_id id);
 static gboolean __wait_for_release_cb_sync(mm_resource_manager_id id);
 
 
@@ -199,24 +199,28 @@ mm_resource_manager_error_e _mmrm_dmn_destroy(mm_resource_manager_id id)
 mm_resource_manager_error_e _mmrm_dmn_commit(mm_resource_manager_id id,
                mm_resource_manager_dmn_res_request_s *releases, mm_resource_manager_dmn_res_request_s *acquires)
 {
-       mm_resource_manager_dmn_p manager = __search_manager(id);
+       mm_resource_manager_dmn_p mgr = __search_manager(id);
        mm_resource_manager_error_e ret = MM_RESOURCE_MANAGER_ERROR_NONE;
        mm_resource_manager_dmn_res_request_s *increases = NULL;
        GArray *cb_requests;
 
-       MM_RM_RETVM_IF(manager == NULL, MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER,
+       MM_RM_RETVM_IF(mgr == NULL, MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER,
                        "Resource manager #%"PRIu64" doesn't exist", _mm_rm_hash64(id));
        MM_RM_RETVM_IF((releases == NULL || releases[0].type == MM_RESOURCE_MANAGER_NO_RES) &&
                        (acquires == NULL || acquires[0].type == MM_RESOURCE_MANAGER_NO_RES),
                        MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER, "Commit request is empty");
 
-       ret = __check_release_requests(manager, releases);
+       MM_RM_INFO("RM #%"PRIu64" mgr [%p] release type (%s) acquires type (%s)", _mm_rm_hash64(mgr->id), mgr,
+               releases[0].type == MM_RESOURCE_MANAGER_NO_RES ? "" : _mm_resource_manager_get_res_str(releases[0].type),
+               acquires[0].type == MM_RESOURCE_MANAGER_NO_RES ? "" : _mm_resource_manager_get_res_str(acquires[0].type));
+
+       ret = __check_release_requests(mgr, releases);
        MM_RM_RETVM_IF(ret != MM_RESOURCE_MANAGER_ERROR_NONE, ret, "check_release_requests is failed [0x%x]", ret);
 
        increases = __create_dmn_res_requests(releases, acquires);
        MM_RM_RETVM_IF(increases == NULL, MM_RESOURCE_MANAGER_ERROR_INVALID_OPERATION, "create_increase_requests is failed");
 
-       ret = __check_requests_conflict(manager, increases);
+       ret = __check_requests_conflict(mgr, increases);
        if (ret != MM_RESOURCE_MANAGER_ERROR_NONE) {
                __sync_increase_acquire_requests(increases, acquires);
                g_free(increases);
@@ -224,8 +228,8 @@ mm_resource_manager_error_e _mmrm_dmn_commit(mm_resource_manager_id id,
        }
        g_free(increases);
 
-       __handle_release_requests(manager, releases);
-       cb_requests = __handle_acquire_requests(manager, acquires);
+       __handle_release_requests(mgr, releases);
+       cb_requests = __handle_acquire_requests(mgr, acquires);
        MM_RM_RETVM_IF(cb_requests == NULL, MM_RESOURCE_MANAGER_ERROR_NOT_ENOUGH, "not enough free resource volume");
        __handle_release_callbacks(cb_requests);
        if (!mm_resource_manager_backend_commit_all()) {
@@ -296,6 +300,7 @@ static mm_resource_manager_error_e __check_release_requests(mm_resource_manager_
        int i;
        mm_resource_manager_conf_s *conf = mm_resource_manager_get_conf();
        mm_resource_manager_res_type_e type = MM_RESOURCE_MANAGER_RES_TYPE_MAX;
+       const char *res_name = NULL;
 
        MM_RM_RETVM_IF(conf == NULL, MM_RESOURCE_MANAGER_ERROR_NONE, "conf is null");
        MM_RM_RETVM_IF(releases == NULL, MM_RESOURCE_MANAGER_ERROR_NONE, "requests is null");
@@ -303,27 +308,27 @@ static mm_resource_manager_error_e __check_release_requests(mm_resource_manager_
        for (; releases->type != MM_RESOURCE_MANAGER_NO_RES; releases++) {
 
                type = releases->type;
-               const char *type_s = _mm_resource_manager_get_res_str(type);
+               res_name = _mm_resource_manager_get_res_str(type);
 
                MM_RM_RETVM_IF(manager->resources[type] == NULL,
-                       MM_RESOURCE_MANAGER_ERROR_NOT_SUPPORTED, "There is no resource %s for the platform", type_s);
+                       MM_RESOURCE_MANAGER_ERROR_NOT_SUPPORTED, "There is no resource %s for the platform", res_name);
 
                if (manager->resources[type]->is_acquired) {
                        if (manager->resources[type]->parts == NULL) {
                                if (releases->volume != MM_RESOURCE_MANAGER_RES_VOLUME_FULL) {
-                                       MM_RM_ERROR("Resource %s is acquired fully, but a resource part is tried to be released", type_s);
+                                       MM_RM_ERROR("Resource %s is acquired fully, but a resource part is tried to be released", res_name);
                                        return MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER;
                                }
                        } else {
                                for (i = 0; i < manager->resources[type]->parts->len &&
                                        ((mm_resource_manager_res_volume*)manager->resources[type]->parts->data)[i] != releases->volume; i++);
                                if (i == manager->resources[type]->parts->len) {
-                                       MM_RM_ERROR("Part of %s of volume %d is not acquired", type_s, releases->volume);
+                                       MM_RM_ERROR("Part of %s of volume %d is not acquired", res_name, releases->volume);
                                        return MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER;
                                }
                        }
                } else {
-                       MM_RM_ERROR("Resource %s is not acquired", type_s);
+                       MM_RM_ERROR("Resource %s is not acquired", res_name);
                        return MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER;
                }
                MM_RM_DEBUG("Release requests are OK type %d available volume %d", type, conf->max_volume[type]);
@@ -396,6 +401,7 @@ static mm_resource_manager_error_e __check_requests_conflict(mm_resource_manager
        mm_resource_manager_conf_s *conf = mm_resource_manager_get_conf();
        int i, j, len;
        mm_resource_manager_res_type_e type = MM_RESOURCE_MANAGER_RES_TYPE_MAX;
+       const char *res_name = NULL;
 
        MM_RM_RETVM_IF(conf == NULL, MM_RESOURCE_MANAGER_ERROR_NONE, "conf is null");
        MM_RM_RETVM_IF(manager == NULL, MM_RESOURCE_MANAGER_ERROR_NONE, "manager is null");
@@ -405,12 +411,12 @@ static mm_resource_manager_error_e __check_requests_conflict(mm_resource_manager
 
        for (; requests->type != MM_RESOURCE_MANAGER_NO_RES; requests++) {
                type = requests->type;
-               const char *type_s = _mm_resource_manager_get_res_str(type);
+               res_name = _mm_resource_manager_get_res_str(type);
 
                MM_RM_RETVM_IF(type < MM_RESOURCE_MANAGER_RES_TYPE_VIDEO_DECODER || type >= MM_RESOURCE_MANAGER_RES_TYPE_MAX,
                        MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER, "wrong type %d", type);
                MM_RM_RETVM_IF(manager->resources[type] == NULL, MM_RESOURCE_MANAGER_ERROR_NOT_SUPPORTED,
-                       "There is no resource %s for the platform", type_s);
+                       "There is no resource %s for the platform", res_name);
 
                remaining_volume = conf->max_volume[type];
 
@@ -431,13 +437,13 @@ static mm_resource_manager_error_e __check_requests_conflict(mm_resource_manager
                                                if (remaining_volume < requests->volume) {
                                                        requests->priority_error = TRUE;
                                                        MM_RM_DEBUG("Resource conflict. %d of %s are available, but %d required",
-                                                                       remaining_volume, type_s, requests->volume);
+                                                                       remaining_volume, res_name, requests->volume);
                                                        return MM_RESOURCE_MANAGER_ERROR_LOW_PRIORITY;
                                                }
                                        }
                                } else {
                                        requests->priority_error = TRUE;
-                                       MM_RM_DEBUG("Resource conflict. %s is already acquired fully", type_s);
+                                       MM_RM_DEBUG("Resource conflict. %s is already acquired fully", res_name);
                                        return MM_RESOURCE_MANAGER_ERROR_LOW_PRIORITY;
                                }
                        }
@@ -508,7 +514,7 @@ static GArray *__handle_acquire_requests(mm_resource_manager_dmn_p manager,
                                        i_mgr->resources[type]->is_acquired = TRUE;
                                        i_mgr->type = type;
                                        i_mgr->volume = volume;
-                                       MM_RM_INFO("Reset the value of release in RM %"PRIu64" (mgr %p)", _mm_rm_hash64(i_mgr->id), i_mgr);
+                                       MM_RM_INFO("Reset the value of acquire in RM #%"PRIu64" (type %s mgr %p)", _mm_rm_hash64(i_mgr->id), res_name, i_mgr);
                                        if (conf->max_instance[type] > 0)
                                                res_count[type]++;
                                        continue;
@@ -522,13 +528,13 @@ static GArray *__handle_acquire_requests(mm_resource_manager_dmn_p manager,
                                        g_array_free(res, TRUE);
                                        i_mgr->resources[type]->parts = NULL;
 
-                                       MM_RM_WARNING("Resource of %s is conflicted in RM %"PRIu64, res_name, _mm_rm_hash64(i_mgr->id));
+                                       MM_RM_WARNING("Resource of %s is conflicted in RM #%"PRIu64, res_name, _mm_rm_hash64(i_mgr->id));
                                } else {
                                        __add_cb_request(cb_requests, i_mgr, type, MM_RESOURCE_MANAGER_RES_VOLUME_FULL);
 
                                        mm_resource_manager_backend_release(type);
 
-                                       MM_RM_INFO("Resource %s would be released (is acquired %d) in RM %"PRIu64" available volume %d", res_name,
+                                       MM_RM_INFO("Resource %s will be released (is acquired %d) in RM #%"PRIu64" available volume %d", res_name,
                                                i_mgr->resources[type]->is_acquired, _mm_rm_hash64(i_mgr->id), conf->max_volume[type]);
                                }
                        }
@@ -543,7 +549,7 @@ static GArray *__handle_acquire_requests(mm_resource_manager_dmn_p manager,
                                        res = i_mgr->resources[type]->parts;
 
                                        if (res && i_mgr->resources[type]->is_acquired) {
-                                               MM_RM_INFO("[#%d] [#%d / #%d] would be released %s in RM %"PRIu64,
+                                               MM_RM_INFO("[#%d] [#%d / #%d] will be released %s in RM #%"PRIu64,
                                                managers->len, i + 1, res->len, res_name, _mm_rm_hash64(i_mgr->id));
 
                                                __add_cb_request(cb_requests, i_mgr, type, g_array_index(res, mm_resource_manager_res_volume, 0));
@@ -578,7 +584,7 @@ static GArray *__handle_acquire_requests(mm_resource_manager_dmn_p manager,
                                                                                continue;
 
                                                                        acquired_volume += g_array_index(res, mm_resource_manager_res_volume, 0);
-                                                                       MM_RM_INFO("[#%d] [#%d / #%d] There are %d units of %s in RM %"PRIu64,
+                                                                       MM_RM_INFO("[#%d] [#%d / #%d] There are %d units of %s in RM #%"PRIu64,
                                                                                managers->len, j + 1, res->len, acquired_volume, res_name, _mm_rm_hash64(j_mgr->id));
 
                                                                        __add_cb_request(cb_requests, j_mgr, type, g_array_index(res, mm_resource_manager_res_volume, 0));
@@ -607,9 +613,9 @@ static GArray *__handle_acquire_requests(mm_resource_manager_dmn_p manager,
                                g_array_append_val(res, requests->volume);
                        }
                }
-
                manager->resources[type]->is_acquired = TRUE;
                mm_resource_manager_backend_acquire(type);
+               MM_RM_INFO("RM #%"PRIu64" (type %s mgr %p) is acquired", _mm_rm_hash64(i_mgr->id), res_name, i_mgr);
        }
 
        return cb_requests;
@@ -651,9 +657,9 @@ static void __handle_release_callbacks(GArray *requests)
 
                _mmrm_dmn_dbus_release_callback(id, type, volume);
                if (__wait_for_release_cb_sync(id))
-                       MM_RM_DEBUG("Release callback sync success");
+                       MM_RM_INFO("Release callback sync success RM #%"PRIu64, id);
                else
-                       MM_RM_ERROR("Wait for release callback sync failed");
+                       MM_RM_ERROR("Wait for release callback sync failed RM #%"PRIu64, id);
 
                if (conf->volume_would_be_checked[type] && volume != MM_RESOURCE_MANAGER_RES_VOLUME_FULL) {
                        conf->max_volume[type] += volume;
@@ -666,6 +672,8 @@ static void __handle_release_callbacks(GArray *requests)
                }
 
                mgr->resources[type]->is_acquired = FALSE;
+               MM_RM_INFO("RM #%"PRIu64" (type %s mgr %p) set acquired value as false (%d)",
+                       id, _mm_resource_manager_get_res_str(type), mgr, mgr->resources[type]->is_acquired);
        }
 }
 
@@ -732,7 +740,7 @@ static void __release_all_resources(mm_resource_manager_dmn_p manager)
        }
 }
 
-static gboolean __poll(struct pollfd sync)
+static gboolean __poll(struct pollfd sync, mm_resource_manager_id id)
 {
        int errsv = 0;
        int try_cnt = 0;
@@ -746,12 +754,12 @@ static gboolean __poll(struct pollfd sync)
 
                if (ret == -1) {
                        errsv = errno;
-                       MM_RM_ERROR("Polling is failed [fd %d errno %d]", sync.fd, errsv);
+                       MM_RM_ERROR("Polling is failed [fd %d errno %d] RM #%"PRIu64, sync.fd, errsv, id);
                        if (errsv == EAGAIN)
                                continue;
                        break;
                } else if (ret == 0) {
-                       MM_RM_WARNING("Wait timeout is elapsed [fd %d]", sync.fd);
+                       MM_RM_WARNING("Wait timeout is elapsed [fd %d] RM #%"PRIu64 , sync.fd, id);
                        break;
                }
 
@@ -771,7 +779,7 @@ static gboolean __wait_for_release_cb_sync(mm_resource_manager_id id)
        sync.fd = open(RELEASE_CB_SYNC_PATH, O_RDONLY | O_NONBLOCK);
        MM_RM_RETVM_IF(sync.fd == -1, FALSE, "Sync FIFO cannot be opened");
 
-       if (!__poll(sync))
+       if (!__poll(sync, id))
                goto out;
 
        read_size = read(sync.fd, &recv_id, sizeof(recv_id));
@@ -783,7 +791,7 @@ static gboolean __wait_for_release_cb_sync(mm_resource_manager_id id)
        if (id != _mm_rm_hash64(recv_id))
                MM_RM_WARNING("Sync is received from wrong client #%"PRIu64, id);
 
-       ret = __poll(sync);
+       ret = __poll(sync, id);
 
 out:
        close(sync.fd);
index 8bf0e44..e3017f1 100644 (file)
@@ -184,7 +184,7 @@ int _mm_resource_manager_create(mm_resource_manager_app_class_e app_class,
        __mm_resource_handles_lock();
        g_ptr_array_add(handles, handle);
 
-       MM_RM_INFO("Resource manager #%"PRIu64" is created", _mm_rm_hash64(handle->id));
+       MM_RM_INFO("RM #%"PRIu64" is created", _mm_rm_hash64(handle->id));
        __mm_resource_handles_unlock();
 
        return MM_RESOURCE_MANAGER_ERROR_NONE;
@@ -203,7 +203,7 @@ int _mm_resource_manager_destroy(mm_resource_manager_h rm)
 
        id = handle->id;
 
-       MM_RM_INFO("Resource manager #%"PRIu64" would be destroyed", _mm_rm_hash64(id));
+       MM_RM_INFO("RM #%"PRIu64" will be destroyed", _mm_rm_hash64(id));
 
        __mm_resources_lock(handle);
        ret = __dbus_destroy(handle);
@@ -219,7 +219,7 @@ int _mm_resource_manager_destroy(mm_resource_manager_h rm)
        free(handle);
 
        if (ret == MM_RESOURCE_MANAGER_ERROR_NONE)
-               MM_RM_INFO("Resource manager #%"PRIu64" is destroyed", _mm_rm_hash64(id));
+               MM_RM_INFO("RM #%"PRIu64" is destroyed", _mm_rm_hash64(id));
 
        return ret;
 }
@@ -242,7 +242,7 @@ int _mm_resource_manager_mark_for_acquire(mm_resource_manager_h rm, mm_resource_
 
        *resource_h = resource;
 
-       MM_RM_INFO("Resource %p of type %d with volume %d is marked for acquire in resource manager #%"PRIu64,
+       MM_RM_INFO("Resource %p of type %d with volume %d is marked for acquire in RM #%"PRIu64,
                *resource_h, type, volume, _mm_rm_hash64(handle->id));
        __mm_resources_unlock(handle);
 
@@ -301,7 +301,7 @@ int _mm_resource_manager_resize_marked(mm_resource_manager_h rm,
                break;
        }
 
-       MM_RM_INFO("Resource %p is resized for acquire in resource manager #%"PRIu64, resource_h, _mm_rm_hash64(handle->id));
+       MM_RM_INFO("Resource %p is resized for acquire in RM #%"PRIu64, resource_h, _mm_rm_hash64(handle->id));
        __mm_resources_unlock(handle);
 
        return ret;
@@ -371,7 +371,7 @@ int _mm_resource_manager_mark_all_for_release(mm_resource_manager_h rm)
                        i--;
        }
 
-       MM_RM_INFO("All resources are marked for release in resource manager #%"PRIu64, _mm_rm_hash64(handle->id));
+       MM_RM_INFO("All resources are marked for release in RM #%"PRIu64, _mm_rm_hash64(handle->id));
        __mm_resources_unlock(handle);
 
        return MM_RESOURCE_MANAGER_ERROR_NONE;
@@ -391,13 +391,13 @@ int _mm_resource_manager_get_resource_info(mm_resource_manager_h rm,
 
        i = __get_resource_index(handle, resource);
        MM_RM_UNLOCK_RETVM_IF(i == MM_RESOURCE_MANAGER_RES_NOT_FOUND, handle->resources_lock,
-               MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER, "Invalid resource handle #%"PRIu64"", _mm_rm_hash64(handle->id));
+               MM_RESOURCE_MANAGER_ERROR_INVALID_PARAMETER, "Invalid RM #%"PRIu64"", _mm_rm_hash64(handle->id));
 
        info->type = resource->type;
        info->volume = resource->volume;
        info->is_acquire_failed = resource->is_acquire_failed;
 
-       MM_RM_INFO("Info structure of resource %p in resource manager #%"PRIu64" is filled", resource_h, _mm_rm_hash64(handle->id));
+       MM_RM_INFO("Info structure of resource %p in RM #%"PRIu64" is filled", resource_h, _mm_rm_hash64(handle->id));
        __mm_resources_unlock(handle);
 
        return MM_RESOURCE_MANAGER_ERROR_NONE;
@@ -415,7 +415,7 @@ int _mm_resource_manager_commit(mm_resource_manager_h rm)
 
        ret = __dbus_commit(handle);
        if (ret == MM_RESOURCE_MANAGER_ERROR_NONE)
-               MM_RM_INFO("Changes in resource manager #%"PRIu64" have been committed successfully", _mm_rm_hash64(handle->id));
+               MM_RM_INFO("Changes in RM #%"PRIu64" have been committed successfully", _mm_rm_hash64(handle->id));
        else
                MM_RM_ERROR("Dbus commit request failed");
        __mm_resources_unlock(handle);
@@ -436,7 +436,7 @@ int _mm_resource_manager_set_status_cb(mm_resource_manager_h rm, mm_resource_man
        handle->status_cb.user_data = user_data;
        __mm_resources_unlock(handle);
 
-       MM_RM_INFO("Status callback %p in resource manager #%"PRIu64" is set", cb, _mm_rm_hash64(handle->id));
+       MM_RM_INFO("Status callback %p in RM #%"PRIu64" is set", cb, _mm_rm_hash64(handle->id));
 
        return MM_RESOURCE_MANAGER_ERROR_NONE;
 }
@@ -567,7 +567,7 @@ static int __check_resource(mm_resource_manager_s *rm, mm_resource_manager_res_t
        mm_resource_manager_res_p i_res;
        int i;
 
-       MM_RM_INFO("[#%"PRIu64" type : %d] resource (#%d) for the platform", _mm_rm_hash64(rm->id), type, local_volume);
+       MM_RM_INFO("[RM #%"PRIu64" type : %d] resource (#%d) for the platform", _mm_rm_hash64(rm->id), type, local_volume);
 
        if (volume > 0) {
                for (i = 0; i < rm->resources->len; i++) {
@@ -625,7 +625,7 @@ static int __get_resource_index(mm_resource_manager_s *rm, mm_resource_manager_r
                        return i;
        }
 
-       MM_RM_WARNING("[%d] Resource %p is marked for release in resource manager #%"PRIu64,
+       MM_RM_WARNING("[%d] Resource %p is marked for release in RM #%"PRIu64,
                rm->resources->len, res, _mm_rm_hash64(rm->id));
 
        return MM_RESOURCE_MANAGER_RES_NOT_FOUND;
@@ -668,9 +668,9 @@ static void __send_release_cb_sync(mm_resource_manager_id id)
        MM_RM_RETM_IF(sync_fd == -1, "Sync FIFO cannot be opened [errno %d]", errno);
 
        if (write(sync_fd, &id, sizeof(id)) == sizeof(id))
-               MM_RM_DEBUG("Sync message is sent successfully");
+               MM_RM_DEBUG("Sync message is sent successfully RM #%"PRIu64, _mm_rm_hash64(id));
        else
-               MM_RM_ERROR("Sync message cannot be sent");
+               MM_RM_ERROR("Sync message cannot be sent RM #%"PRIu64, _mm_rm_hash64(id));
 
        close(sync_fd);
 }
@@ -799,7 +799,7 @@ static int __dbus_create(mm_resource_manager_s *handle, mm_resource_manager_app_
        mmresource_manager_call_create_sync(handle->dbus_proxy, app_class, &handle->id, &rm_error, NULL, &error);
        MM_RM_RET_IF_GERR(error, "DBus create msg cannot be sent");
 
-       MM_RM_DEBUG("Create returned id - #%"PRIu64", error - %d", _mm_rm_hash64(handle->id), rm_error);
+       MM_RM_DEBUG("Create returned id - RM #%"PRIu64", error - %d", _mm_rm_hash64(handle->id), rm_error);
 
        return rm_error;
 }
@@ -812,7 +812,7 @@ static int __dbus_destroy(mm_resource_manager_s *handle)
        mmresource_manager_call_destroy_sync(handle->dbus_proxy, handle->id, &rm_error, NULL, &error);
        MM_RM_RET_IF_GERR(error, "DBus destroy msg cannot be sent");
 
-       MM_RM_DEBUG("Destroy for id - #%"PRIu64" returned error - %d", _mm_rm_hash64(handle->id), rm_error);
+       MM_RM_DEBUG("Destroy for id - RM #%"PRIu64" returned error - %d", _mm_rm_hash64(handle->id), rm_error);
 
        return MM_RESOURCE_MANAGER_ERROR_NONE;
 }
@@ -871,7 +871,7 @@ static int __dbus_commit(mm_resource_manager_s *handle)
        mmresource_manager_call_commit_sync(handle->dbus_proxy, handle->id, release, acquire, &rm_error, &flags_variant, NULL, &error);
        MM_RM_RET_IF_GERR(error, "DBus commit msg cannot be sent");
 
-       MM_RM_DEBUG("Commit for id - #%"PRIu64" returned error - %d", _mm_rm_hash64(handle->id), rm_error);
+       MM_RM_DEBUG("Commit for id - RM #%"PRIu64" returned error - %d", _mm_rm_hash64(handle->id), rm_error);
 
        if (rm_error == MM_RESOURCE_MANAGER_ERROR_NONE) {
                for (i = 0; i < handle->resources->len; i++) {