Logged in as guest
Viewing Software Bugs/7450 Full headers
Major security issue: yes no
Notes: invalid config. fix/override in master. fix/override in RE24 Notification:
Date: Sun, 25 Nov 2012 07:48:54 +0000 From: jackie.qq.zhang@gmail.com To: openldap-its@OpenLDAP.org Subject: segfault with listener-threads=8
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?
Date: Sun, 25 Nov 2012 15:29:56 +0100 From: =?ISO-8859-1?Q?Michael_Str=F6der?= <michael@stroeder.com> To: jackie.qq.zhang@gmail.com CC: openldap-its@openldap.org Subject: Re: (ITS#7450) segfault with listener-threads=8
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.
Date: Sun, 25 Nov 2012 15:19:30 -0800 Subject: Re: (ITS#7450) segfault with listener-threads=8 From: Jackie Zhang <jackie.qq.zhang@gmail.com> To: =?ISO-8859-1?Q?Michael_Str=F6der?= <michael@stroeder.com> Cc: openldap-its@openldap.org
--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. =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 "50" instead= of "8" because using "8" 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 "dc=3Dxxx,dc=3Dxxx"<br> rootdn=A0=A0=A0=A0=A0=A0=A0=A0=A0 "cn=3Dxxx,dc=3Dxxx,dc=3Dxxx"<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-gn
Date: Sun, 25 Nov 2012 17:04:05 -0800 From: Howard Chu <hyc@symas.com> To: jackie.qq.zhang@gmail.com CC: openldap-its@openldap.org Subject: Re: (ITS#7450) segfault with listener-threads=8
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 "50" instead= > of "8" because using "8" 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>
Date: Sun, 25 Nov 2012 17:18:50 -0800 Subject: Re: (ITS#7450) segfault with listener-threads=8 From: Jackie Zhang <jackie.qq.zhang@gmail.com> To: Howard Chu <hyc@symas.com> Cc: openldap-its@openldap.org
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. >>> >> >&g
Date: Sun, 25 Nov 2012 19:40:55 -0800 From: Howard Chu <hyc@symas.com> To: jackie.qq.zhang@gmail.com CC: openldap-its@openldap.org Subject: Re: (ITS#7450) segfault with listener-threads=8
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/
Date: Sun, 25 Nov 2012 21:16:07 -0800 Subject: Re: (ITS#7450) segfault with listener-threads=8 From: Jackie Zhang <jackie.qq.zhang@gmail.com> To: Howard Chu <hyc@symas.com> Cc: openldap-its@openldap.org
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/
______________ © Copyright 2013, OpenLDAP Foundation, info@OpenLDAP.org