diff --git a/lib/env_ocf/ocf_env.c b/lib/env_ocf/ocf_env.c index 409da734d..c25aec90c 100644 --- a/lib/env_ocf/ocf_env.c +++ b/lib/env_ocf/ocf_env.c @@ -80,6 +80,7 @@ env_allocator_create(uint32_t size, const char *name) SPDK_ENV_SOCKET_ID_ANY); if (!allocator->mempool) { + SPDK_ERRLOG("mempool creation failed\n"); free(allocator); return NULL; } diff --git a/lib/event/reactor.c b/lib/event/reactor.c index c16437856..a840168b4 100644 --- a/lib/event/reactor.c +++ b/lib/event/reactor.c @@ -162,7 +162,10 @@ reactor_construct(struct spdk_reactor *reactor, uint32_t lcore) reactor->thread_count = 0; reactor->events = spdk_ring_create(SPDK_RING_TYPE_MP_SC, 65536, SPDK_ENV_SOCKET_ID_ANY); - assert(reactor->events != NULL); + if (reactor->events == NULL) { + SPDK_ERRLOG("Failed to allocate events ring\n"); + assert(false); + } if (spdk_interrupt_mode_is_enabled()) { reactor_interrupt_init(reactor); diff --git a/lib/thread/thread.c b/lib/thread/thread.c index d238220b1..dd80c4d6a 100644 --- a/lib/thread/thread.c +++ b/lib/thread/thread.c @@ -119,6 +119,7 @@ _thread_lib_init(size_t ctx_sz) SPDK_ENV_SOCKET_ID_ANY); if (!g_spdk_msg_mempool) { + SPDK_ERRLOG("spdk_msg_mempool creation failed\n"); return -1; }