[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#6500) get_ldap_property returns stale data from time to time



--0-808694875-1269950414=:35747
Content-Type: text/plain; charset=us-ascii



i was using the deprecated function from openldap.

i switched to ldap_value_free_len, i'll run more tests to see if  i still have the problem.



________________________________
From: "masarati@aero.polimi.it" <masarati@aero.polimi.it>
To: alinachegalati@yahoo.com
Cc: openldap-its@openldap.org
Sent: Tue, March 30, 2010 7:15:51 AM
Subject: Re: (ITS#6500) get_ldap_property returns stale data from time to      time

Not clear why you think this is an OpenLDAP bug.  There's too little
information to determine whether your application is using OpenLDAP's
client library correctly.

p.

> Full_Name: Alin Vasile
> Version: 2.4.19
> OS: SuSE 11
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (194.237.142.17)
>
>
> Hi,
>
>   In a high load apache environment I am performing some ldap searches for
> some
> requests using a custom developed application and the OpenLdap client
> libraries.
>>From time to time I have the following segmentation fault:
>
> Program terminated with signal 11, Segmentation fault.
> #0  0x00000000004033b9 in get_ldap_property (ldap=0x764870,
> entry=0x841160,
> attribute=0x87aa50 "smIMEI", context=0x76fc38)
>     at ldap_query.c:30
> 30          if ( v != NULL && v[0] != NULL ) {
> (gdb) backtrace
> #0  0x00000000004033b9 in get_ldap_property (ldap=0x764870,
> entry=0x841160,
> attribute=0x87aa50 "smIMEI", context=0x76fc38)
>     at ldap_query.c:30
> #1  0x00000000004040f7 in query (pool=0x76fc38, ep=0x610290,
> ldap_request=0x76ff60) at ldap_query.c:353
>
> And the function is :
>
> char * get_ldap_property(LDAP* ldap, LDAPMessage *entry, char* attribute,
> apr_pool_t* context) {
>
>     char ** v = ldap_get_values(ldap, entry, attribute);
>
>     if ( v != NULL && v[0] != NULL ) {
>         char* ret = apr_pstrdup(context,  v[0] );
>         ldap_value_free( v );
>         return ret;
>     }
>
>     return NULL;
>
> }
>
> Note that most of the queries (99%) work fine.
>
> Did anyone experienced something simmilar?
>
> Thanks,
> Alin
>


      
--0-808694875-1269950414=:35747
Content-Type: text/html; charset=us-ascii

<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">i was using the deprecated function from openldap.<br><br>i switched to ldap_value_free_len, i'll run more tests to see if&nbsp; i still have the problem.<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> "masarati@aero.polimi.it" &lt;masarati@aero.polimi.it&gt;<br><b><span style="font-weight: bold;">To:</span></b> alinachegalati@yahoo.com<br><b><span style="font-weight: bold;">Cc:</span></b> openldap-its@openldap.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tue, March 30, 2010 7:15:51 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: (ITS#6500)
 get_ldap_property returns stale data from time to      time<br></font><br>
Not clear why you think this is an OpenLDAP bug.&nbsp; There's too little<br>information to determine whether your application is using OpenLDAP's<br>client library correctly.<br><br>p.<br><br>&gt; Full_Name: Alin Vasile<br>&gt; Version: 2.4.19<br>&gt; OS: SuSE 11<br>&gt; URL: <a href="ftp://ftp.openldap.org/incoming/"; target="_blank">ftp://ftp.openldap.org/incoming/</a><br>&gt; Submission from: (NULL) (194.237.142.17)<br>&gt;<br>&gt;<br>&gt; Hi,<br>&gt;<br>&gt;&nbsp;  In a high load apache environment I am performing some ldap searches for<br>&gt; some<br>&gt; requests using a custom developed application and the OpenLdap client<br>&gt; libraries.<br>&gt;&gt;From time to time I have the following segmentation fault:<br>&gt;<br>&gt; Program terminated with signal 11, Segmentation fault.<br>&gt; #0&nbsp; 0x00000000004033b9 in get_ldap_property (ldap=0x764870,<br>&gt; entry=0x841160,<br>&gt; attribute=0x87aa50 "smIMEI", context=0x76fc38)<br>&gt;&nbsp;
 &nbsp;  at ldap_query.c:30<br>&gt; 30&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( v != NULL &amp;&amp; v[0] != NULL ) {<br>&gt; (gdb) backtrace<br>&gt; #0&nbsp; 0x00000000004033b9 in get_ldap_property (ldap=0x764870,<br>&gt; entry=0x841160,<br>&gt; attribute=0x87aa50 "smIMEI", context=0x76fc38)<br>&gt;&nbsp; &nbsp;  at ldap_query.c:30<br>&gt; #1&nbsp; 0x00000000004040f7 in query (pool=0x76fc38, ep=0x610290,<br>&gt; ldap_request=0x76ff60) at ldap_query.c:353<br>&gt;<br>&gt; And the function is :<br>&gt;<br>&gt; char * get_ldap_property(LDAP* ldap, LDAPMessage *entry, char* attribute,<br>&gt; apr_pool_t* context) {<br>&gt;<br>&gt;&nbsp; &nbsp;  char ** v = ldap_get_values(ldap, entry, attribute);<br>&gt;<br>&gt;&nbsp; &nbsp;  if ( v != NULL &amp;&amp; v[0] != NULL ) {<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  char* ret = apr_pstrdup(context,&nbsp; v[0] );<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  ldap_value_free( v );<br>&gt;&nbsp; &nbsp; &nbsp; &nbsp;  return
 ret;<br>&gt;&nbsp; &nbsp;  }<br>&gt;<br>&gt;&nbsp; &nbsp;  return NULL;<br>&gt;<br>&gt; }<br>&gt;<br>&gt; Note that most of the queries (99%) work fine.<br>&gt;<br>&gt; Did anyone experienced something simmilar?<br>&gt;<br>&gt; Thanks,<br>&gt; Alin<br>&gt;<br><br><br></div></div>
</div><br>

      </body></html>
--0-808694875-1269950414=:35747--