Segmentation fault on confd_val2Str

Getting segmentation fault as shown below (Using confd 7.4.1).

Program terminated with signal 11, Segmentation fault.
#0  0x00007ff3ba4f184d in pthread_getspecific () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.17-292.el7.x86_64 libgcc-4.8.5-39.el7.x86_64 libstdc++-4.8.5-39.el7.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 libxslt-1.1.28-5.el7.x86_64 openssl-libs-1.0.2k-19.el7.x86_64 pcre-8.32-17.el7.x86_64 sqlite-3.7.17-8.el7_7.1.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) bt
#0  0x00007ff3ba4f184d in pthread_getspecific () from /lib64/libpthread.so.0
#1  0x00007ff3b906a67c in confd_errno_location () at confd_lib.c:173
#2  0x00007ff3b906a996 in clr_confd_err () at confd_lib.c:250
#3  0x00007ff3b906b803 in confd_val2str (type=0x2f51400, val=0x7ff32c022838, buf=0x7ff34ac42970 "every4thRF 1", bufsiz=8192) at confd_lib.c:1082

Would appreciate any inputs/suggestions on what would be leading to this.

Thank you in adavance.

You likely did not load the schema before calling confd_val2str(). See “Using Schema Information” in the confd_types(3) man page for details.

if (confd_load_schemas((struct sockaddr*)&addr,
                         sizeof (struct sockaddr_in)) != CONFD_OK)
    confd_fatal("Failed to load schemas from confd\n");

Hi Cohult,

Thanks for reverting back.
We are loading the schema using confd_load_schemas API.

Just an additional note, if we reduced the number of subscriptions then it works fine.

Since the number of subscriptions and confd_val2str() is not related, are you out of memory somewhere? Or did you overwrite the memory holding the schema that confd_val2str() use?

The issue was at our end.
Thank you.