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

Re: (ITS#6691) error 4 in slapd: segfault with back-sql in debian amd64



--20cf301d43804e8b0304940425e5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Ok, thanks for the answer

This is the new backtrace:

Core was generated by `./slapd -d -1'.
Program terminated with signal 11, Segmentation fault.
[New process 1656]
[New process 1570]
[New process 1573]
#0  0x0000000000491ac5 in slap_sl_free (ptr=3D0xffffffd2028b00d0,
ctx=3D0x28a3120)
    at sl_malloc.c:490
490                if ( tmpp[-1] & 1 ) {
(gdb) bt
#0  0x0000000000491ac5 in slap_sl_free (ptr=3D0xffffffd2028b00d0,
ctx=3D0x28a3120)
    at sl_malloc.c:490
#1  0x00000000004d562e in backsql_entry_clean (op=3D0x28a9b10, e=3D0x42e98a=
40)
    at search.c:2680
#2  0x00000000004d4e8f in backsql_search (op=3D0x28a9b10, rs=3D0x42e99ca0)
    at search.c:2517
#3  0x0000000000429f5c in fe_op_search (op=3D0x28a9b10, rs=3D0x42e99ca0)
    at search.c:366
#4  0x00000000004298c7 in do_search (op=3D0x28a9b10, rs=3D0x42e99ca0)
    at search.c:217
#5  0x0000000000426952 in connection_operation (ctx=3D0x42e99df0,
    arg_v=3D0x28a9b10) at connection.c:1109
#6  0x0000000000426ede in connection_read_thread (ctx=3D0x42e99df0, argv=3D=
0x9)
    at connection.c:1245
#7  0x000000000050e33b in ldap_int_thread_pool_wrapper (xpool=3D0x26f6ea0)
    at tpool.c:685
#8  0x00007fddda10cfc7 in start_thread () from /lib/libpthread.so.0
#9  0x00007fddd9e8264d in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()






2010/11/1 <masarati@aero.polimi.it>

> > Full_Name: Andr=E9s Marenco Z=FA=F1iga
> > Version: 2.4.23 (20100719)
> > OS: Debian 5.06 amd64
> > URL:
> > Submission from: (NULL) (201.198.99.66)
> >
> >
> > I'm getting a segfault while doing any search in openldap. This is my
> > configuration:
> >
> > Debian 5.06 amd64 (kernel 2.6.26-2-amd64)
> > OpenLDAP 2.4.23 (20100719)
> > UnixODBC 2.3.0
> > PostgreSQL 8.2.10
> > psqlodbc 09.00.0101
> >
> >
> >
> #########################################################################=
####
> > slapd.conf (the relevant parts)
> >
> #########################################################################=
####
> > include               /var/lib/openldap/etc/openldap/schema/core.schema
> > include               /var/lib/openldap/etc/openldap/schema/cosine.sche=
ma
> > include
> /var/lib/openldap/etc/openldap/schema/inetorgperson.schema
> >
> > pidfile               /var/lib/openldap/var/slapd.pid
> > argsfile      /var/lib/openldap/slapd.args
> >
> > database      sql
> > suffix                "dc=3Dexample,dc=3Dcom"
> > rootdn                "cn=3Droot,dc=3Dexample,dc=3Dcom"
> > rootpw                secret
> > dbname                PgSQL
> > dbuser                ""
> > dbpasswd      ""
> > insentry_stmt "insert into ldap_entries (id,dn,oc_map_id,parent,keyval)
> > values
> > ((select max(id)+1 from ldap_entries),?,?,?,?)"
> > upper_func    "upper"
> > strcast_func  "text"
> > concat_pattern        "?||?"
> > has_ldapinfo_dn_ru    no
> >
> > lastmod               off
> >
> >
> >
> >
> #########################################################################=
####
> > odbcinst.ini
> >
> #########################################################################=
####
> > [PostgreSQL]
> > Description=3DODBC for PostgreSQL
> > Driver=3D/usr/local/lib/psqlodbcw.so
> >
> >
> >
> #########################################################################=
####
> > odbc.ini
> >
> #########################################################################=
####
> > [PgSQL]
> > Driver=3D/usr/local/lib/psqlodbcw.so
> > Description=3DConnection to LDAP/POSTGRESQL
> > Server=3Dxxx.xxx.xxx.xxx
> > Port=3D5432
> > Protocol=3D6.4
> > FetchBufferSize=3D99
> > Database=3Ddb
> > Username=3Duser
> > ReadOnly=3Dno
> > CommLog=3D1
> >
> >
> >
> >
> >
> >
> > slapd starts fine, but when I make any search this is what I'm getting:
> >
> > <=3D send_search_entry: conn 1000 exit.
> > send_ldap_result: conn=3D1000 op=3D2 p=3D3
> > send_ldap_result: err=3D0 matched=3D"" text=3D""
> > send_ldap_response: msgid=3D3 tag=3D101 err=3D0
> > ber_flush2: 14 bytes to sd 11
> >   0000:  30 0c 02 01 03 65 07 0a  01 00 04 00 04 00
> 0....e........
> > ldap_write: want=3D14, written=3D14
> >   0000:  30 0c 02 01 03 65 07 0a  01 00 04 00 04 00
> 0....e........
> > conn=3D1000 op=3D2 SEARCH RESULT tag=3D101 err=3D0 nentries=3D1 text=3D
> > Segmentation Fault (Core Dumped)
> >
> >
> >
> > in the syslog this is what I have:
> >
> > Oct 29 17:53:17 td-server slapd[32026]: conn=3D1000 op=3D2 SEARCH RESUL=
T
> > tag=3D101
> > err=3D0 nentries=3D1 text=3D
> > Oct 29 17:53:17 td-server kernel: [10058.462325] slapd[32029]: segfault
> at
> > ffffffde0274e4a0 ip 46c23b sp 425d7570 error 4 in slapd[400000+161000]
> >
> >
> >
> > and the gdb backtrace shows this:
> >
> > Core was generated by `/var/lib/openldap/libexec/slapd -d -1'.
> > Program terminated with signal 11, Segmentation fault.
> > [New process 31991]
> > [New process 31987]
> > [New process 31990]
> > #0  0x000000000046c23b in ?? ()
> > #1  0x0000000000499903 in ?? ()
> > #2  0x000000000049e01b in ?? ()
> > #3  0x000000000041ed51 in ?? ()
> > #4  0x000000000041f54c in ?? ()
> > #5  0x000000000041cb5f in ?? ()
> > #6  0x000000000041d7dc in ?? ()
> > #7  0x00000000004c8760 in ?? ()
> > #8  0x00007fe1a4861fc7 in start_thread () from /lib/libpthread.so.0
> > #9  0x00007fe1a45d764d in clone () from /lib/libc.so.6
> > #10 0x0000000000000000 in ?? ()
>
> This trace is useless; since the issue appears to be repeatable, you
> should retry with slapd built with debugging symbols and unstripped.
>
> >
> >
> >
> >
> > Everything works fine in 32bits (Debian 5.0 i386), but it fails with
> > 64bits.
> >
> > Any idea?
> >
> Moreover, you may want to try with HEAD code, where some modifications to
> deal with 64 bit (long int) key values.  Should be unrelated, but just in
> case...
>
> p.
>
>
>
>


--=20
Andr=E9s Marenco Z=FA=F1iga
Equipo de Desarrollo
TEC_Digital

--20cf301d43804e8b0304940425e5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Ok, thanks for the answer<br><br>This is the new backtrace:<br><br>Core was=
 generated by `./slapd -d -1&#39;.<br>Program terminated with signal 11, Se=
gmentation fault.<br>[New process 1656]<br>[New process 1570]<br>[New proce=
ss 1573]<br>
#0=A0 0x0000000000491ac5 in slap_sl_free (ptr=3D0xffffffd2028b00d0, ctx=3D0=
x28a3120)<br>=A0=A0=A0 at sl_malloc.c:490<br>490=A0=A0=A0 =A0=A0=A0 =A0=A0=
=A0 =A0=A0=A0 if ( tmpp[-1] &amp; 1 ) {<br>(gdb) bt<br>#0=A0 0x000000000049=
1ac5 in slap_sl_free (ptr=3D0xffffffd2028b00d0, ctx=3D0x28a3120)<br>
=A0=A0=A0 at sl_malloc.c:490<br>#1=A0 0x00000000004d562e in backsql_entry_c=
lean (op=3D0x28a9b10, e=3D0x42e98a40)<br>=A0=A0=A0 at search.c:2680<br>#2=
=A0 0x00000000004d4e8f in backsql_search (op=3D0x28a9b10, rs=3D0x42e99ca0)<=
br>=A0=A0=A0 at search.c:2517<br>
#3=A0 0x0000000000429f5c in fe_op_search (op=3D0x28a9b10, rs=3D0x42e99ca0)<=
br>=A0=A0=A0 at search.c:366<br>#4=A0 0x00000000004298c7 in do_search (op=
=3D0x28a9b10, rs=3D0x42e99ca0)<br>=A0=A0=A0 at search.c:217<br>#5=A0 0x0000=
000000426952 in connection_operation (ctx=3D0x42e99df0, <br>
=A0=A0=A0 arg_v=3D0x28a9b10) at connection.c:1109<br>#6=A0 0x0000000000426e=
de in connection_read_thread (ctx=3D0x42e99df0, argv=3D0x9)<br>=A0=A0=A0 at=
 connection.c:1245<br>#7=A0 0x000000000050e33b in ldap_int_thread_pool_wrap=
per (xpool=3D0x26f6ea0)<br>
=A0=A0=A0 at tpool.c:685<br>#8=A0 0x00007fddda10cfc7 in start_thread () fro=
m /lib/libpthread.so.0<br>#9=A0 0x00007fddd9e8264d in clone () from /lib/li=
bc.so.6<br>#10 0x0000000000000000 in ?? ()<br><br><br><br><br><br><br><div =
class=3D"gmail_quote">
2010/11/1  <span dir=3D"ltr">&lt;<a href=3D"mailto:masarati@aero.polimi.it"=
>masarati@aero.polimi.it</a>&gt;</span><br><blockquote class=3D"gmail_quote=
" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, =
204); padding-left: 1ex;">
&gt; Full_Name: Andr=E9s Marenco Z=FA=F1iga<br>
&gt; Version: 2.4.23 (20100719)<br>
&gt; OS: Debian 5.06 amd64<br>
&gt; URL:<br>
&gt; Submission from: (NULL) (201.198.99.66)<br>
&gt;<br>
&gt;<br>
&gt; I&#39;m getting a segfault while doing any search in openldap. This is=
 my<br>
&gt; configuration:<br>
&gt;<br>
&gt; Debian 5.06 amd64 (kernel 2.6.26-2-amd64)<br>
&gt; OpenLDAP 2.4.23 (20100719)<br>
&gt; UnixODBC 2.3.0<br>
&gt; PostgreSQL 8.2.10<br>
&gt; psqlodbc 09.00.0101<br>
&gt;<br>
&gt;<br>
&gt; ######################################################################=
#######<br>
&gt; slapd.conf (the relevant parts)<br>
&gt; ######################################################################=
#######<br>
&gt; include =A0 =A0 =A0 =A0 =A0 =A0 =A0 /var/lib/openldap/etc/openldap/sch=
ema/core.schema<br>
&gt; include =A0 =A0 =A0 =A0 =A0 =A0 =A0 /var/lib/openldap/etc/openldap/sch=
ema/cosine.schema<br>
&gt; include =A0 =A0 =A0 =A0 =A0 =A0 =A0 /var/lib/openldap/etc/openldap/sch=
ema/inetorgperson.schema<br>
&gt;<br>
&gt; pidfile =A0 =A0 =A0 =A0 =A0 =A0 =A0 /var/lib/openldap/var/slapd.pid<br=
>
&gt; argsfile =A0 =A0 =A0/var/lib/openldap/slapd.args<br>
&gt;<br>
&gt; database =A0 =A0 =A0sql<br>
&gt; suffix =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&quot;dc=3Dexample,dc=3Dcom&quot=
;<br>
&gt; rootdn =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&quot;cn=3Droot,dc=3Dexample,dc=
=3Dcom&quot;<br>
&gt; rootpw =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0secret<br>
&gt; dbname =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0PgSQL<br>
&gt; dbuser =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0&quot;&quot;<br>
&gt; dbpasswd =A0 =A0 =A0&quot;&quot;<br>
&gt; insentry_stmt &quot;insert into ldap_entries (id,dn,oc_map_id,parent,k=
eyval)<br>
&gt; values<br>
&gt; ((select max(id)+1 from ldap_entries),?,?,?,?)&quot;<br>
&gt; upper_func =A0 =A0&quot;upper&quot;<br>
&gt; strcast_func =A0&quot;text&quot;<br>
&gt; concat_pattern =A0 =A0 =A0 =A0&quot;?||?&quot;<br>
&gt; has_ldapinfo_dn_ru =A0 =A0no<br>
&gt;<br>
&gt; lastmod =A0 =A0 =A0 =A0 =A0 =A0 =A0 off<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ######################################################################=
#######<br>
&gt; odbcinst.ini<br>
&gt; ######################################################################=
#######<br>
&gt; [PostgreSQL]<br>
&gt; Description=3DODBC for PostgreSQL<br>
&gt; Driver=3D/usr/local/lib/psqlodbcw.so<br>
&gt;<br>
&gt;<br>
&gt; ######################################################################=
#######<br>
&gt; odbc.ini<br>
&gt; ######################################################################=
#######<br>
&gt; [PgSQL]<br>
&gt; Driver=3D/usr/local/lib/psqlodbcw.so<br>
&gt; Description=3DConnection to LDAP/POSTGRESQL<br>
&gt; Server=3Dxxx.xxx.xxx.xxx<br>
&gt; Port=3D5432<br>
&gt; Protocol=3D6.4<br>
&gt; FetchBufferSize=3D99<br>
&gt; Database=3Ddb<br>
&gt; Username=3Duser<br>
&gt; ReadOnly=3Dno<br>
&gt; CommLog=3D1<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; slapd starts fine, but when I make any search this is what I&#39;m get=
ting:<br>
&gt;<br>
&gt; &lt;=3D send_search_entry: conn 1000 exit.<br>
&gt; send_ldap_result: conn=3D1000 op=3D2 p=3D3<br>
&gt; send_ldap_result: err=3D0 matched=3D&quot;&quot; text=3D&quot;&quot;<b=
r>
&gt; send_ldap_response: msgid=3D3 tag=3D101 err=3D0<br>
&gt; ber_flush2: 14 bytes to sd 11<br>
&gt; =A0 0000: =A030 0c 02 01 03 65 07 0a =A001 00 04 00 04 00 =A0 =A0 =A0 =
=A0 0....e........<br>
&gt; ldap_write: want=3D14, written=3D14<br>
&gt; =A0 0000: =A030 0c 02 01 03 65 07 0a =A001 00 04 00 04 00 =A0 =A0 =A0 =
=A0 0....e........<br>
&gt; conn=3D1000 op=3D2 SEARCH RESULT tag=3D101 err=3D0 nentries=3D1 text=
=3D<br>
&gt; Segmentation Fault (Core Dumped)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; in the syslog this is what I have:<br>
&gt;<br>
&gt; Oct 29 17:53:17 td-server slapd[32026]: conn=3D1000 op=3D2 SEARCH RESU=
LT<br>
&gt; tag=3D101<br>
&gt; err=3D0 nentries=3D1 text=3D<br>
&gt; Oct 29 17:53:17 td-server kernel: [10058.462325] slapd[32029]: segfaul=
t at<br>
&gt; ffffffde0274e4a0 ip 46c23b sp 425d7570 error 4 in slapd[400000+161000]=
<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; and the gdb backtrace shows this:<br>
&gt;<br>
&gt; Core was generated by `/var/lib/openldap/libexec/slapd -d -1&#39;.<br>
&gt; Program terminated with signal 11, Segmentation fault.<br>
&gt; [New process 31991]<br>
&gt; [New process 31987]<br>
&gt; [New process 31990]<br>
&gt; #0 =A00x000000000046c23b in ?? ()<br>
&gt; #1 =A00x0000000000499903 in ?? ()<br>
&gt; #2 =A00x000000000049e01b in ?? ()<br>
&gt; #3 =A00x000000000041ed51 in ?? ()<br>
&gt; #4 =A00x000000000041f54c in ?? ()<br>
&gt; #5 =A00x000000000041cb5f in ?? ()<br>
&gt; #6 =A00x000000000041d7dc in ?? ()<br>
&gt; #7 =A00x00000000004c8760 in ?? ()<br>
&gt; #8 =A00x00007fe1a4861fc7 in start_thread () from /lib/libpthread.so.0<=
br>
&gt; #9 =A00x00007fe1a45d764d in clone () from /lib/libc.so.6<br>
&gt; #10 0x0000000000000000 in ?? ()<br>
<br>
This trace is useless; since the issue appears to be repeatable, you<br>
should retry with slapd built with debugging symbols and unstripped.<br>
<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Everything works fine in 32bits (Debian 5.0 i386), but it fails with<b=
r>
&gt; 64bits.<br>
&gt;<br>
&gt; Any idea?<br>
&gt;<br>
Moreover, you may want to try with HEAD code, where some modifications to<b=
r>
deal with 64 bit (long int) key values. =A0Should be unrelated, but just in=
<br>
case...<br>
<br>
p.<br>
<br>
<br>
<br>
</blockquote></div><br><br clear=3D"all"><br>-- <br>Andr=E9s Marenco Z=FA=
=F1iga<br>Equipo de Desarrollo<br>TEC_Digital<br>

--20cf301d43804e8b0304940425e5--