--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(a)aero.polimi.it" <masarati(a)aero.polimi.it>
To: alinachegalati(a)yahoo.com
Cc: openldap-its(a)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 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(a)aero.polimi.it"
&lt;masarati(a)aero.polimi.it&gt;<br><b><span
style="font-weight: bold;">To:</span></b>
alinachegalati(a)yahoo.com<br><b><span style="font-weight:
bold;">Cc:</span></b>
openldap-its(a)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. There's too
little<br>information to determine whether your application is using
OpenLDAP's<br>client library
correctly.<br><br>p.<br><br>> Full_Name: Alin
Vasile<br>> Version: 2.4.19<br>> OS: SuSE 11<br>>
URL: <a
href="ftp://ftp.openldap.org/incoming/"
target="_blank">ftp://ftp.openldap.org/incoming/</a>&l...
Submission from: (NULL)
(194.237.142.17)<br>><br>><br>>
Hi,<br>><br>> In a high load apache environment I am
performing some ldap searches for<br>> some<br>> requests using
a custom developed application and the OpenLdap client<br>>
libraries.<br>>>From time to time I have the following segmentation
fault:<br>><br>> Program terminated with signal 11, Segmentation
fault.<br>> #0 0x00000000004033b9 in get_ldap_property
(ldap=0x764870,<br>> entry=0x841160,<br>> attribute=0x87aa50
"smIMEI", context=0x76fc38)<br>>
at ldap_query.c:30<br>> 30
if ( v != NULL && v[0] != NULL ) {<br>>
(gdb) backtrace<br>> #0 0x00000000004033b9 in get_ldap_property
(ldap=0x764870,<br>> entry=0x841160,<br>> attribute=0x87aa50
"smIMEI", context=0x76fc38)<br>> at
ldap_query.c:30<br>> #1 0x00000000004040f7 in query (pool=0x76fc38,
ep=0x610290,<br>> ldap_request=0x76ff60) at
ldap_query.c:353<br>><br>> And the function is
:<br>><br>> char * get_ldap_property(LDAP* ldap, LDAPMessage
*entry, char* attribute,<br>> apr_pool_t* context)
{<br>><br>> char ** v =
ldap_get_values(ldap, entry, attribute);<br>><br>>
if ( v != NULL && v[0] != NULL ) {<br>>
char* ret = apr_pstrdup(context, v[0]
);<br>> ldap_value_free( v
);<br>> return
ret;<br>>
}<br>><br>> return
NULL;<br>><br>> }<br>><br>> Note that
most of the queries (99%) work fine.<br>><br>> Did anyone
experienced something simmilar?<br>><br>>
Thanks,<br>>
Alin<br>><br><br><br></div></div>
</div><br>
</body></html>
--0-808694875-1269950414=:35747--