Issue 7450 - segfault with listener-threads=8
Summary: segfault with listener-threads=8
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.33
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-25 07:48 UTC by jackie.qq.zhang@gmail.com
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jackie.qq.zhang@gmail.com 2012-11-25 07:48:54 UTC
Full_Name: Jackie Zhang
Version: 2.4.33
OS: Ubuntu 10.04
URL: 
Submission from: (NULL) (2607:f720:1300:1241:9502:8240:b2b5:ba3f)


When I start the server, I saw the following error messages:

50b1ca90 bdb_db_open: warning - no DB_CONFIG file found in directory
/xxx/openldap-2.4.33/var/openldap-data: (2).
Expect poor performance for suffix "dc=xxx,dc=xxx".
50b1ca90 bdb_monitor_db_open: monitoring disabled; configure monitor database to
enable
50b1ca90 slapd starting
Segmentation fault (core dumped)

The default configuration does not have this problem. So I checked every
configuration setting I made and finally found it's caused by the following
setting:

listener-threads 8

Is this a bug?
Comment 1 Michael Ströder 2012-11-25 14:29:56 UTC
jackie.qq.zhang@gmail.com wrote:
> The default configuration does not have this problem. So I checked every
> configuration setting I made and finally found it's caused by the following
> setting:
> 
> listener-threads 8

I tried to reproduce this by adding the line above to my local config. But
slapd still works on my system.

Could you please provide a canned config which reproduces the seg fault and
preferrably a full stack trace?

http://www.openldap.org/faq/data/cache/59.html

Make sure you have installed slapd with debug symbols (make install STRIP="").

Ciao, Michael.

Comment 2 jackie.qq.zhang@gmail.com 2012-11-25 23:19:30 UTC
Hi, Michael,

This is my simplified configuration file which can reproduce the segfault.
For the purpose of replay, I use "50" instead of "8" because using "8"
sometime cannot reproduce the error.

=======================================
slapd.conf
=======================================
listener-threads 50
include       /xxx/etc/openldap/schema/core.schema
pidfile         /xxx/var/run/slapd.pid
argsfile       /xxx/var/run/slapd.args

database        bdb
suffix          "dc=xxx,dc=xxx"
rootdn          "cn=xxx,dc=xxx,dc=xxx"
rootpw          secret
directory       /xxx/var/openldap-data
index   objectClass     eq
=======================================


The stack traces are:

Thread 3 (Thread 0x7ffff4f2c700 (LWP 24897)):
#0  0x00007ffff6d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff7012dc0 in ?? () from /lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007ffff4f2c700 in ?? ()
#3  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7ffff572d700 (LWP 24896)):
#0  0x000000000042543f in slapd_add (s=10, isactive=0, sl=0x0, id=0) at
daemon.c:857
#1  0x0000000000429afc in slapd_daemon_task (ptr=0xaa8ed0) at daemon.c:2137
#2  0x00007ffff7012e9a in start_thread () from
/lib/x86_64-linux-gnu/libpthread.so.0
#3  0x00007ffff6d404bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7ffff7fe1700 (LWP 24893)):
#0  0x00007ffff6d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff7011f70 in do_clone.constprop.4 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007ffff70138ba in pthread_create@@GLIBC_2.2.5 () from
/lib/x86_64-linux-gnu/libpthread.so.0
#3  0x000000000058ccbb in ldap_pvt_thread_create (thread=0xaa8ed8,
detach=0, start_routine=0x429a7c <slapd_daemon_task>, arg=0xaa8ed8\
) at thr_posix.c:165
#4  0x000000000042bf28 in slapd_daemon () at daemon.c:2918
#5  0x00000000004087b8 in main (argc=7, argv=0x7fffffffe008) at main.c:1012

The GDB stopped at the following statement:

assert( SLAP_SOCK_NOT_ACTIVE(id, s) );

which is in slapd_add, daemon.c:857.

Best regards,
Jackie



On Sun, Nov 25, 2012 at 6:29 AM, Michael Ströder <michael@stroeder.com>wrote:

> jackie.qq.zhang@gmail.com wrote:
> > The default configuration does not have this problem. So I checked every
> > configuration setting I made and finally found it's caused by the
> following
> > setting:
> >
> > listener-threads 8
>
> I tried to reproduce this by adding the line above to my local config. But
> slapd still works on my system.
>
> Could you please provide a canned config which reproduces the seg fault and
> preferrably a full stack trace?
>
> http://www.openldap.org/faq/data/cache/59.html
>
> Make sure you have installed slapd with debug symbols (make install
> STRIP="").
>
> Ciao, Michael.
>
Comment 3 Howard Chu 2012-11-26 01:04:05 UTC
jackie.qq.zhang@gmail.com wrote:
> --20cf300faffd868e6d04cf5a0c62
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> Hi, Michael,
>
> This is my simplified configuration file which can reproduce the segfault.
> For the purpose of replay, I use "50" instead of "8" because using "8"
> sometime cannot reproduce the error.

This bug report is invalid. You reported a "segfault" originally, not an 
assert() as shown in this trace. The slapd.conf(5) manpage clearly states that 
the value should be a power of 2.

> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> slapd.conf
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> listener-threads 50
> include       /xxx/etc/openldap/schema/core.schema
> pidfile         /xxx/var/run/slapd.pid
> argsfile       /xxx/var/run/slapd.args
>
> database        bdb
> suffix          "dc=3Dxxx,dc=3Dxxx"
> rootdn          "cn=3Dxxx,dc=3Dxxx,dc=3Dxxx"
> rootpw          secret
> directory       /xxx/var/openldap-data
> index   objectClass     eq
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
>
> The stack traces are:
>
> Thread 3 (Thread 0x7ffff4f2c700 (LWP 24897)):
> #0  0x00007ffff6d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6
> #1  0x00007ffff7012dc0 in ?? () from /lib/x86_64-linux-gnu/libpthread.so.0
> #2  0x00007ffff4f2c700 in ?? ()
> #3  0x0000000000000000 in ?? ()
>
> Thread 2 (Thread 0x7ffff572d700 (LWP 24896)):
> #0  0x000000000042543f in slapd_add (s=3D10, isactive=3D0, sl=3D0x0, id=3D0=
> ) at
> daemon.c:857
> #1  0x0000000000429afc in slapd_daemon_task (ptr=3D0xaa8ed0) at daemon.c:21=
> 37
> #2  0x00007ffff7012e9a in start_thread () from
> /lib/x86_64-linux-gnu/libpthread.so.0
> #3  0x00007ffff6d404bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
> #4  0x0000000000000000 in ?? ()
>
> Thread 1 (Thread 0x7ffff7fe1700 (LWP 24893)):
> #0  0x00007ffff6d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6
> #1  0x00007ffff7011f70 in do_clone.constprop.4 () from
> /lib/x86_64-linux-gnu/libpthread.so.0
> #2  0x00007ffff70138ba in pthread_create@@GLIBC_2.2.5 () from
> /lib/x86_64-linux-gnu/libpthread.so.0
> #3  0x000000000058ccbb in ldap_pvt_thread_create (thread=3D0xaa8ed8,
> detach=3D0, start_routine=3D0x429a7c <slapd_daemon_task>, arg=3D0xaa8ed8\
> ) at thr_posix.c:165
> #4  0x000000000042bf28 in slapd_daemon () at daemon.c:2918
> #5  0x00000000004087b8 in main (argc=3D7, argv=3D0x7fffffffe008) at main.c:=
> 1012
>
> The GDB stopped at the following statement:
>
> assert( SLAP_SOCK_NOT_ACTIVE(id, s) );
>
> which is in slapd_add, daemon.c:857.
>
> Best regards,
> Jackie
>
>
>
> On Sun, Nov 25, 2012 at 6:29 AM, Michael Str=F6der <michael@stroeder.com>wr=
> ote:
>
>> jackie.qq.zhang@gmail.com wrote:
>>> The default configuration does not have this problem. So I checked ever=
> y
>>> configuration setting I made and finally found it's caused by the
>> following
>>> setting:
>>>
>>> listener-threads 8
>>
>> I tried to reproduce this by adding the line above to my local config. Bu=
> t
>> slapd still works on my system.
>>
>> Could you please provide a canned config which reproduces the seg fault a=
> nd
>> preferrably a full stack trace?
>>
>> http://www.openldap.org/faq/data/cache/59.html
>>
>> Make sure you have installed slapd with debug symbols (make install
>> STRIP=3D"").
>>
>> Ciao, Michael.
>>
>
> --20cf300faffd868e6d04cf5a0c62
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> Hi, Michael,<br><br>This is my simplified configuration file which can repr=
> oduce the segfault. For the purpose of replay, I use &quot;50&quot; instead=
>   of &quot;8&quot; because using &quot;8&quot; sometime cannot reproduce the=
>   error.<br>
> <br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
> slapd.conf<br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
> listener-threads 50<br>include=A0=A0=A0=A0=A0=A0 /xxx/etc/openldap/schema/c=
> ore.schema<br>
> pidfile=A0=A0=A0=A0=A0=A0=A0=A0 /xxx/var/run/slapd.pid<br>
> argsfile=A0=A0=A0=A0=A0=A0 /xxx/var/run/slapd.args<br>
> <br>
> database=A0=A0=A0=A0=A0=A0=A0 bdb <br>
> suffix=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;dc=3Dxxx,dc=3Dxxx&quot;<br>
> rootdn=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;cn=3Dxxx,dc=3Dxxx,dc=3Dxxx&quot;<br=
>>
> rootpw=A0=A0=A0=A0=A0=A0=A0=A0=A0 secret<br>
> directory=A0=A0=A0=A0=A0=A0 /xxx/var/openldap-data<br>
> index=A0=A0 objectClass=A0=A0=A0=A0 eq<br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br><br><br>The stack traces are:=
> <br><br>Thread 3 (Thread 0x7ffff4f2c700 (LWP 24897)):<br>#0=A0 0x00007ffff6=
> d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6<br>#1=A0 0x00007fff=
> f7012dc0 in ?? () from /lib/x86_64-linux-gnu/libpthread.so.0<br>
> #2=A0 0x00007ffff4f2c700 in ?? ()<br>#3=A0 0x0000000000000000 in ?? ()<br><=
> br>Thread 2 (Thread 0x7ffff572d700 (LWP 24896)):<br>#0=A0 0x000000000042543=
> f in slapd_add (s=3D10, isactive=3D0, sl=3D0x0, id=3D0) at daemon.c:857<br>=
> #1=A0 0x0000000000429afc in slapd_daemon_task (ptr=3D0xaa8ed0) at daemon.c:=
> 2137<br>
> #2=A0 0x00007ffff7012e9a in start_thread () from /lib/x86_64-linux-gnu/libp=
> thread.so.0<br>#3=A0 0x00007ffff6d404bd in clone () from /lib/x86_64-linux-=
> gnu/libc.so.6<br>#4=A0 0x0000000000000000 in ?? ()<br><br>Thread 1 (Thread =
> 0x7ffff7fe1700 (LWP 24893)):<br>
> #0=A0 0x00007ffff6d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6<b=
> r>#1=A0 0x00007ffff7011f70 in do_clone.constprop.4 () from /lib/x86_64-linu=
> x-gnu/libpthread.so.0<br>#2=A0 0x00007ffff70138ba in pthread_create@@GLIBC_=
> 2.2.5 () from /lib/x86_64-linux-gnu/libpthread.so.0<br>
> #3=A0 0x000000000058ccbb in ldap_pvt_thread_create (thread=3D0xaa8ed8, deta=
> ch=3D0, start_routine=3D0x429a7c &lt;slapd_daemon_task&gt;, arg=3D0xaa8ed8\=
> <br>) at thr_posix.c:165<br>#4=A0 0x000000000042bf28 in slapd_daemon () at =
> daemon.c:2918<br>
> #5=A0 0x00000000004087b8 in main (argc=3D7, argv=3D0x7fffffffe008) at main.=
> c:1012<br><br>The GDB stopped at the following statement: <br><br>assert( S=
> LAP_SOCK_NOT_ACTIVE(id, s) );<br><br>which is in slapd_add, daemon.c:857.<b=
> r>
> <br>Best regards,<br>Jackie<br><br><br><br><div class=3D"gmail_quote">On Su=
> n, Nov 25, 2012 at 6:29 AM, Michael Str=F6der <span dir=3D"ltr">&lt;<a href=
> =3D"mailto:michael@stroeder.com" target=3D"_blank">michael@stroeder.com</a>=
> &gt;</span> wrote:<br>
> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
> x #ccc solid;padding-left:1ex"><a href=3D"mailto:jackie.qq.zhang@gmail.com"=
>> jackie.qq.zhang@gmail.com</a> wrote:<br>
> &gt; The default configuration does not have this problem. So I checked eve=
> ry<br>
> &gt; configuration setting I made and finally found it&#39;s caused by the =
> following<br>
> &gt; setting:<br>
> &gt;<br>
> &gt; listener-threads 8<br>
> <br>
> I tried to reproduce this by adding the line above to my local config. But<=
> br>
> slapd still works on my system.<br>
> <br>
> Could you please provide a canned config which reproduces the seg fault and=
> <br>
> preferrably a full stack trace?<br>
> <br>
> <a href=3D"http://www.openldap.org/faq/data/cache/59.html" target=3D"_blank=
> ">http://www.openldap.org/faq/data/cache/59.html</a><br>
> <br>
> Make sure you have installed slapd with debug symbols (make install STRIP=
> =3D&quot;&quot;).<br>
> <br>
> Ciao, Michael.<br>
> </blockquote></div><br>
>
> --20cf300faffd868e6d04cf5a0c62--
>
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 4 jackie.qq.zhang@gmail.com 2012-11-26 01:18:50 UTC
Hi, Howard,

GDB did stop at the statement:
**assert( SLAP_SOCK_NOT_ACTIVE(id, s) );**

But the system output is
**Segmentation fault (core dumped)**

It seems not related to whether it's a power of 2 or not, because even
I specify it as 64, i.e., 2^6, the result and error message are still
the same.

Best regards,
Jackie


On Sun, Nov 25, 2012 at 5:04 PM, Howard Chu <hyc@symas.com> wrote:
>
> jackie.qq.zhang@gmail.com wrote:
>>
>> --20cf300faffd868e6d04cf5a0c62
>> Content-Type: text/plain; charset=ISO-8859-1
>> Content-Transfer-Encoding: quoted-printable
>>
>>
>> Hi, Michael,
>>
>> This is my simplified configuration file which can reproduce the segfault.
>> For the purpose of replay, I use "50" instead of "8" because using "8"
>> sometime cannot reproduce the error.
>
>
> This bug report is invalid. You reported a "segfault" originally, not an assert() as shown in this trace. The slapd.conf(5) manpage clearly states that the value should be a power of 2.
>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>> slapd.conf
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>
>> listener-threads 50
>> include       /xxx/etc/openldap/schema/core.schema
>> pidfile         /xxx/var/run/slapd.pid
>> argsfile       /xxx/var/run/slapd.args
>>
>> database        bdb
>> suffix          "dc=3Dxxx,dc=3Dxxx"
>> rootdn          "cn=3Dxxx,dc=3Dxxx,dc=3Dxxx"
>>
>> rootpw          secret
>> directory       /xxx/var/openldap-data
>> index   objectClass     eq
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>
>>
>>
>> The stack traces are:
>>
>> Thread 3 (Thread 0x7ffff4f2c700 (LWP 24897)):
>> #0  0x00007ffff6d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6
>> #1  0x00007ffff7012dc0 in ?? () from /lib/x86_64-linux-gnu/libpthread.so.0
>> #2  0x00007ffff4f2c700 in ?? ()
>> #3  0x0000000000000000 in ?? ()
>>
>> Thread 2 (Thread 0x7ffff572d700 (LWP 24896)):
>> #0  0x000000000042543f in slapd_add (s=3D10, isactive=3D0, sl=3D0x0, id=3D0=
>> ) at
>> daemon.c:857
>> #1  0x0000000000429afc in slapd_daemon_task (ptr=3D0xaa8ed0) at daemon.c:21=
>>
>> 37
>> #2  0x00007ffff7012e9a in start_thread () from
>> /lib/x86_64-linux-gnu/libpthread.so.0
>> #3  0x00007ffff6d404bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
>> #4  0x0000000000000000 in ?? ()
>>
>> Thread 1 (Thread 0x7ffff7fe1700 (LWP 24893)):
>> #0  0x00007ffff6d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6
>> #1  0x00007ffff7011f70 in do_clone.constprop.4 () from
>> /lib/x86_64-linux-gnu/libpthread.so.0
>> #2  0x00007ffff70138ba in pthread_create@@GLIBC_2.2.5 () from
>> /lib/x86_64-linux-gnu/libpthread.so.0
>> #3  0x000000000058ccbb in ldap_pvt_thread_create (thread=3D0xaa8ed8,
>> detach=3D0, start_routine=3D0x429a7c <slapd_daemon_task>, arg=3D0xaa8ed8\
>>
>> ) at thr_posix.c:165
>> #4  0x000000000042bf28 in slapd_daemon () at daemon.c:2918
>> #5  0x00000000004087b8 in main (argc=3D7, argv=3D0x7fffffffe008) at main.c:=
>>
>> 1012
>>
>> The GDB stopped at the following statement:
>>
>> assert( SLAP_SOCK_NOT_ACTIVE(id, s) );
>>
>> which is in slapd_add, daemon.c:857.
>>
>> Best regards,
>> Jackie
>>
>>
>>
>> On Sun, Nov 25, 2012 at 6:29 AM, Michael Str=F6der <michael@stroeder.com>wr=
>> ote:
>>
>>> jackie.qq.zhang@gmail.com wrote:
>>>>
>>>> The default configuration does not have this problem. So I checked ever=
>>
>> y
>>>>
>>>> configuration setting I made and finally found it's caused by the
>>>
>>> following
>>>>
>>>> setting:
>>>>
>>>> listener-threads 8
>>>
>>>
>>> I tried to reproduce this by adding the line above to my local config. Bu=
>>
>> t
>>>
>>> slapd still works on my system.
>>>
>>> Could you please provide a canned config which reproduces the seg fault a=
>>
>> nd
>>>
>>> preferrably a full stack trace?
>>>
>>> http://www.openldap.org/faq/data/cache/59.html
>>>
>>> Make sure you have installed slapd with debug symbols (make install
>>> STRIP=3D"").
>>>
>>> Ciao, Michael.
>>>
>>
>> --20cf300faffd868e6d04cf5a0c62
>> Content-Type: text/html; charset=ISO-8859-1
>> Content-Transfer-Encoding: quoted-printable
>>
>> Hi, Michael,<br><br>This is my simplified configuration file which can repr=
>> oduce the segfault. For the purpose of replay, I use &quot;50&quot; instead=
>>   of &quot;8&quot; because using &quot;8&quot; sometime cannot reproduce the=
>>   error.<br>
>> <br>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
>> slapd.conf<br>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br>
>> listener-threads 50<br>include=A0=A0=A0=A0=A0=A0 /xxx/etc/openldap/schema/c=
>> ore.schema<br>
>> pidfile=A0=A0=A0=A0=A0=A0=A0=A0 /xxx/var/run/slapd.pid<br>
>> argsfile=A0=A0=A0=A0=A0=A0 /xxx/var/run/slapd.args<br>
>> <br>
>> database=A0=A0=A0=A0=A0=A0=A0 bdb <br>
>> suffix=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;dc=3Dxxx,dc=3Dxxx&quot;<br>
>> rootdn=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;cn=3Dxxx,dc=3Dxxx,dc=3Dxxx&quot;<br=
>>>
>>>
>> rootpw=A0=A0=A0=A0=A0=A0=A0=A0=A0 secret<br>
>> directory=A0=A0=A0=A0=A0=A0 /xxx/var/openldap-data<br>
>> index=A0=A0 objectClass=A0=A0=A0=A0 eq<br>
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<br><br><br>The stack traces are:=
>> <br><br>Thread 3 (Thread 0x7ffff4f2c700 (LWP 24897)):<br>#0=A0 0x00007ffff6=
>> d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6<br>#1=A0 0x00007fff=
>> f7012dc0 in ?? () from /lib/x86_64-linux-gnu/libpthread.so.0<br>
>> #2=A0 0x00007ffff4f2c700 in ?? ()<br>#3=A0 0x0000000000000000 in ?? ()<br><=
>> br>Thread 2 (Thread 0x7ffff572d700 (LWP 24896)):<br>#0=A0 0x000000000042543=
>> f in slapd_add (s=3D10, isactive=3D0, sl=3D0x0, id=3D0) at daemon.c:857<br>=
>> #1=A0 0x0000000000429afc in slapd_daemon_task (ptr=3D0xaa8ed0) at daemon.c:=
>> 2137<br>
>> #2=A0 0x00007ffff7012e9a in start_thread () from /lib/x86_64-linux-gnu/libp=
>> thread.so.0<br>#3=A0 0x00007ffff6d404bd in clone () from /lib/x86_64-linux-=
>> gnu/libc.so.6<br>#4=A0 0x0000000000000000 in ?? ()<br><br>Thread 1 (Thread =
>> 0x7ffff7fe1700 (LWP 24893)):<br>
>> #0=A0 0x00007ffff6d40481 in clone () from /lib/x86_64-linux-gnu/libc.so.6<b=
>> r>#1=A0 0x00007ffff7011f70 in do_clone.constprop.4 () from /lib/x86_64-linu=
>> x-gnu/libpthread.so.0<br>#2=A0 0x00007ffff70138ba in pthread_create@@GLIBC_=
>> 2.2.5 () from /lib/x86_64-linux-gnu/libpthread.so.0<br>
>> #3=A0 0x000000000058ccbb in ldap_pvt_thread_create (thread=3D0xaa8ed8, deta=
>> ch=3D0, start_routine=3D0x429a7c &lt;slapd_daemon_task&gt;, arg=3D0xaa8ed8\=
>> <br>) at thr_posix.c:165<br>#4=A0 0x000000000042bf28 in slapd_daemon () at =
>> daemon.c:2918<br>
>> #5=A0 0x00000000004087b8 in main (argc=3D7, argv=3D0x7fffffffe008) at main.=
>> c:1012<br><br>The GDB stopped at the following statement: <br><br>assert( S=
>> LAP_SOCK_NOT_ACTIVE(id, s) );<br><br>which is in slapd_add, daemon.c:857.<b=
>> r>
>> <br>Best regards,<br>Jackie<br><br><br><br><div class=3D"gmail_quote">On Su=
>> n, Nov 25, 2012 at 6:29 AM, Michael Str=F6der <span dir=3D"ltr">&lt;<a href=
>> =3D"mailto:michael@stroeder.com" target=3D"_blank">michael@stroeder.com</a>=
>> &gt;</span> wrote:<br>
>> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
>> x #ccc solid;padding-left:1ex"><a href=3D"mailto:jackie.qq.zhang@gmail.com"=
>>>
>>> jackie.qq.zhang@gmail.com</a> wrote:<br>
>>
>> &gt; The default configuration does not have this problem. So I checked eve=
>> ry<br>
>> &gt; configuration setting I made and finally found it&#39;s caused by the =
>> following<br>
>> &gt; setting:<br>
>> &gt;<br>
>> &gt; listener-threads 8<br>
>> <br>
>> I tried to reproduce this by adding the line above to my local config. But<=
>> br>
>> slapd still works on my system.<br>
>> <br>
>> Could you please provide a canned config which reproduces the seg fault and=
>> <br>
>> preferrably a full stack trace?<br>
>> <br>
>> <a href=3D"http://www.openldap.org/faq/data/cache/59.html" target=3D"_blank=
>> ">http://www.openldap.org/faq/data/cache/59.html</a><br>
>> <br>
>>
>> Make sure you have installed slapd with debug symbols (make install STRIP=
>> =3D&quot;&quot;).<br>
>> <br>
>> Ciao, Michael.<br>
>> </blockquote></div><br>
>>
>> --20cf300faffd868e6d04cf5a0c62--
>>
>>
>>
>
>
> --
>   -- Howard Chu
>   CTO, Symas Corp.           http://www.symas.com
>   Director, Highland Sun     http://highlandsun.com/hyc/
>   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 5 Howard Chu 2012-11-26 03:40:55 UTC
jackie.qq.zhang@gmail.com wrote:
> Hi, Howard,
>
> GDB did stop at the statement:
> **assert( SLAP_SOCK_NOT_ACTIVE(id, s) );**
>
> But the system output is
> **Segmentation fault (core dumped)**
>
> It seems not related to whether it's a power of 2 or not, because even
> I specify it as 64, i.e., 2^6, the result and error message are still
> the same.

That's to be expected since currently this setting has a hard-coded maximum of 
16. Unless you have a machine with more than 1024 cores, I don't think your 
setting is valid.

So again, this bug report is invalid.
-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 6 Howard Chu 2012-11-26 03:46:22 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 7 jackie.qq.zhang@gmail.com 2012-11-26 05:16:07 UTC
Hi, Howard,

Thanks for the explanation.

Yes, it seems that I was confused by the numbers. I cannot reproduce
the case when setting listener-thread as 8. It's possible that I
confused myself by setting the number many times.

I thought the number is to specify the listening threads but it seems
my understanding was wrong.

Best regards,
Jackie


On Sun, Nov 25, 2012 at 7:40 PM, Howard Chu <hyc@symas.com> wrote:
> jackie.qq.zhang@gmail.com wrote:
>>
>> Hi, Howard,
>>
>> GDB did stop at the statement:
>> **assert( SLAP_SOCK_NOT_ACTIVE(id, s) );**
>>
>> But the system output is
>> **Segmentation fault (core dumped)**
>>
>> It seems not related to whether it's a power of 2 or not, because even
>> I specify it as 64, i.e., 2^6, the result and error message are still
>> the same.
>
>
> That's to be expected since currently this setting has a hard-coded maximum
> of 16. Unless you have a machine with more than 1024 cores, I don't think
> your setting is valid.
>
> So again, this bug report is invalid.
>
> --
>   -- Howard Chu
>   CTO, Symas Corp.           http://www.symas.com
>   Director, Highland Sun     http://highlandsun.com/hyc/
>   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 8 Quanah Gibson-Mount 2012-11-26 22:37:07 UTC
changed notes
changed state Test to Release
Comment 9 Quanah Gibson-Mount 2013-03-05 02:19:32 UTC
changed notes
changed state Release to Closed
Comment 10 OpenLDAP project 2014-08-01 21:04:45 UTC
invalid config. fix/override in master.
fix/override in RE24