[SPDK] How to fix the error generated while generating SPDK thread

mostaan.fereidooni at gmail.com
Newsgroups dev.linux.lists.spdk
Message-ID <[email protected]>
Hello I am new with SPDK and have done all the steps mentioned in the https://spdk.io/doc/getting_started.html completely and without observing any errors.

But when I run the following simple code on my system
#include <stdio.h>
#include <spdk/bdev.h>
#include <spdk/thread.h>
#include <spdk/queue.h>

void main()
{

    struct spdk_thread* first_reader_thread =
            spdk_thread_create("first_reader_thread", NULL);

    if (first_reader_thread == NULL)
    {
        printf("First thread creation failed...\n");
        return ;
    }

    struct spdk_thread* second_reader_thread =
            spdk_thread_create("second_reader_thread", NULL);
    if (second_reader_thread == NULL)
    {
        printf("Second thread creation failed...\n");
        return ;
    }

    printf("first reader thread id is: %"PRIu64"\n",
           spdk_thread_get_id(first_reader_thread));
    printf("second reader thread id is: %"PRIu64"\n",
           spdk_thread_get_id(second_reader_thread));
    printf("Hello World!\n");
    return;
}

I get the following error:

"RING: Cannot reserve memory for tailq, 
thread.c: 260:spdk_thread_create: ERROR: Unable to allocate memory for message ring, 
First thread creation failed..."

it will be appraciated if anyone can guide me to fix this error.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.