Error# '-4 Decoding error' with ldap_search_ext_s API

venugopal chinnakotla <[email protected]> Thu, 8 Jan 2026 10:28:11 +0530
Newsgroups gmane.network.openldap.devel,gmane.network.openldap.technical
Message-ID <CAJCMw6sG52tpC+C8aO9Hd5_4ZRpKAtWLLvoesHkgvvENeq0J_w@mail.gmail.com>
--00000000000011ff9b0647d942d2
Content-Type: text/plain; charset="UTF-8"

Hi Team,

We are working on migration of nsldap C sdk to OpenLDAP C sdk for our
application client code.

We are using OpenLDAP 2.6.7.

As part of this migration, we are facing one issue related to Decoding
Error while making ldap_search_ext_s API under load.

OpenLDAP C SDK API ldap_search_ext_s is giving -4 : Decoding error when we
are making a search call to LDAP server (with SSL and without SSL) under
load with multi threading.

Here are few log messages related to -4: decoding error

[10052/17636][ERROR]Error# '-4' during search: 'error: Decoding error'
Search Query = '(cn=user1)' for server 'ldapserver1:10001'

[10052/15624][ERROR]Error# '-4' during search: 'error: Decoding error'
Search Query = '(cn=user2)' for server 'ldapserver1:10001'

When we run the same load with NSLDAP, we are not getting any Decoding
errors. Whenever we switch to OpenLDAP APIs and run the load, we are
getting Decoding errors for few transactions under the load.

Could you please look into this and provide any solution available for this
issue?

Thank you.

-- 
Thanks,
*c.venugopal*

--00000000000011ff9b0647d942d2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div>Hi Team,<br><br>We are working on migration of n=
sldap C sdk to OpenLDAP C sdk for our application client code.<br><br>We ar=
e using OpenLDAP 2.6.7.</div><div><br></div><div>As part of this migration,=
 we are facing one issue related to Decoding Error while making ldap_search=
_ext_s API under load.</div></div><div><br></div><div><p dir=3D"ltr">OpenLD=
AP C SDK API ldap_search_ext_s is giving -4 : Decoding error when we are ma=
king a search call to LDAP server (with SSL and without SSL) under load wit=
h multi threading.</p><p dir=3D"ltr">Here are few log messages related to -=
4: decoding error</p><p dir=3D"ltr">[10052/17636][ERROR]Error# &#39;-4&#39;=
 during search: &#39;error: Decoding error&#39; Search Query =3D &#39;(cn=
=3Duser1)&#39; for server &#39;ldapserver1:10001&#39;</p><p dir=3D"ltr">[10=
052/15624][ERROR]Error# &#39;-4&#39; during search: &#39;error: Decoding er=
ror&#39; Search Query =3D &#39;(cn=3Duser2)&#39; for server &#39;ldapserver=
1:10001&#39;<br><br>When we run the same load with NSLDAP, we are not getti=
ng any Decoding errors. Whenever we switch to OpenLDAP APIs and run the loa=
d, we are getting Decoding errors for few transactions under the load.<br><=
br>Could you please look into this and provide any solution available for t=
his issue?<br><br>Thank you.</p></div><div><br></div><span class=3D"gmail_s=
ignature_prefix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature" d=
ata-smartmail=3D"gmail_signature"><div><font style=3D"background-color:#fff=
fff">Thanks,</font></div>
<div><em><strong><font color=3D"#006600">c.venugopal</font></strong></em></=
div></div></div>

--00000000000011ff9b0647d942d2--