Issue 4481 - test008-concurrency fail on amd64
Summary: test008-concurrency fail on amd64
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-07 14:00 UTC by ivan.lago@ieo-research.it
Modified: 2014-08-01 21:05 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 ivan.lago@ieo-research.it 2006-04-07 14:00:57 UTC
Full_Name: Ivan Lago
Version: 2.3.20
OS: Freebsd 5.4
URL: http://www.openldap.org/its/index.cgi/Incoming?id=4379
Submission from: (NULL) (85.239.176.134)


On all the amd64 machines if i run a make test test008-concurrency hangs
bringing CPU usage for slapd process up to 99%.
I tested it on several machine and it seems to be only an arch-related
problem,since i386 machines never have this problem.
Regards
Ivan

Comment 1 Kurt Zeilenga 2006-04-07 15:02:16 UTC
changed notes
changed state Open to Feedback
Comment 2 ando@openldap.org 2006-04-07 15:25:53 UTC
> Full_Name: Ivan Lago
> Version: 2.3.20
> OS: Freebsd 5.4
> URL: http://www.openldap.org/its/index.cgi/Incoming?id=4379
> Submission from: (NULL) (85.239.176.134)
>
>
> On all the amd64 machines if i run a make test test008-concurrency hangs
> bringing CPU usage for slapd process up to 99%.
> I tested it on several machine and it seems to be only an arch-related
> problem,since i386 machines never have this problem.

Myself and other OpenLDAP developers routinely develop and test on amd64,
and I don't experience anything like that.  I'm using Linux with 2.6
kernel, so it might be some OS related issue.  Can you attach the process
with gdb when it's in that state and produce a backtrace of all threads?

$ gdb
(gdb) thread apply all bt

p.




Ing. Pierangelo Masarati
Responsabile Open Solution
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------

Comment 3 ivan.lago@ieo-research.it 2006-04-10 07:54:33 UTC
Here it is:

root@aaa2:~ gdb -p 6986 /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/servers/slapd/.libs/slapd
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.
This GDB was configured as "amd64-marcel-freebsd"...
Attaching to program: /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/servers/slapd/.libs/slapd, process 6986
Error while mapping shared library sections:
../servers/slapd/back-bdb/.libs/back_bdb-2.3.so.2: No such file or  
directory.
Error while mapping shared library sections:
../servers/slapd/back-monitor/.libs/back_monitor-2.3.so.2: No such  
file or directory.
Reading symbols from /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/libraries/libldap_r/.libs/libldap_r-2.3.so.2...done.
Loaded symbols for /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/libraries/libldap_r/.libs/libldap_r-2.3.so.2
Reading symbols from /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/libraries/liblber/.libs/liblber-2.3.so.2...done.
Loaded symbols for /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/libraries/liblber/.libs/liblber-2.3.so.2
Reading symbols from /usr/lib/libssl.so.3...done.
Loaded symbols for /usr/lib/libssl.so.3
Reading symbols from /lib/libcrypto.so.3...done.
Loaded symbols for /lib/libcrypto.so.3
Reading symbols from /usr/lib/libfetch.so.3...done.
Loaded symbols for /usr/lib/libfetch.so.3
Reading symbols from /usr/lib/libcom_err.so.2...done.
Loaded symbols for /usr/lib/libcom_err.so.2
Reading symbols from /lib/libcrypt.so.2...done.
Loaded symbols for /lib/libcrypt.so.2
Reading symbols from /usr/local/lib/libltdl.so.4...done.
Loaded symbols for /usr/local/lib/libltdl.so.4
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /usr/local/lib/nss_ldap.so.1...done.
Loaded symbols for /usr/local/lib/nss_ldap.so.1
Reading symbols from /usr/local/lib/libldap-2.3.so.2...done.
Loaded symbols for /usr/local/lib/libldap-2.3.so.2
Reading symbols from /usr/local/lib/libdb-4.2.so...done.
Loaded symbols for /usr/local/lib/libdb-4.2.so
Error while reading shared library symbols:
../servers/slapd/back-bdb/.libs/back_bdb-2.3.so.2: No such file or  
directory.
Error while reading shared library symbols:
../servers/slapd/back-monitor/.libs/back_monitor-2.3.so.2: No such  
file or directory.
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
[Switching to Thread 17 (LWP 100210)]
0x00000008012ca118 in select () from /lib/libc.so.5
(gdb) thread apply all bt

Thread 19 (Thread 19 (sleeping)):
#0  0x000000080115aab7 in pthread_mutexattr_init () from /usr/lib/ 
libpthread.so.1
#1  0x000000080115aa10 in pthread_mutexattr_init () from /usr/lib/ 
libpthread.so.1
#2  0x000000080114dc04 in pthread_join () from /usr/lib/libpthread.so.1
#3  0x00000008007367cd in ldap_pvt_thread_join (thread=0x6cac00,  
thread_return=0x0) at thr_posix.c:193
#4  0x0000000000428252 in slapd_daemon () at daemon.c:2239
#5  0x0000000000411fb4 in main (argc=8, argv=0x7fffffffe2e0) at  
main.c:854

Thread 18 (Thread 18 (LWP 100154)):
#0  0x0000000801162bb4 in pthread_testcancel () from /usr/lib/ 
libpthread.so.1
#1  0x0000000000000000 in ?? ()
#2  0x0000000000000000 in ?? ()
#3  0x000000000000001e in ?? ()
#4  0x0000000000000000 in ?? ()
#5  0x00000000006ca800 in ?? ()
#6  0x00000000006ca800 in ?? ()
#7  0x000000000061c000 in ?? ()
#8  0x000000080115b19a in pthread_mutexattr_init () from /usr/lib/ 
libpthread.so.1
#9  0x0000000000000000 in ?? ()
Error accessing memory address 0x7fffffeff000: Bad address.
#0  0x00000008012ca118 in select () from /lib/libc.so.5

Thanks a lot
Ivan

On Apr 7, 2006, at 5:25 PM, Pierangelo Masarati wrote:

>> Full_Name: Ivan Lago
>> Version: 2.3.20
>> OS: Freebsd 5.4
>> URL: http://www.openldap.org/its/index.cgi/Incoming?id=4379
>> Submission from: (NULL) (85.239.176.134)
>>
>>
>> On all the amd64 machines if i run a make test test008-concurrency  
>> hangs
>> bringing CPU usage for slapd process up to 99%.
>> I tested it on several machine and it seems to be only an arch- 
>> related
>> problem,since i386 machines never have this problem.
>
> Myself and other OpenLDAP developers routinely develop and test on  
> amd64,
> and I don't experience anything like that.  I'm using Linux with 2.6
> kernel, so it might be some OS related issue.  Can you attach the  
> process
> with gdb when it's in that state and produce a backtrace of all  
> threads?
>
> $ gdb
> (gdb) thread apply all bt
>
> p.
>
>
>
>
> Ing. Pierangelo Masarati
> Responsabile Open Solution
> OpenLDAP Core Team
>
> SysNet s.n.c.
> Via Dossi, 8 - 27100 Pavia - ITALIA
> http://www.sys-net.it
> ------------------------------------------
> Office:   +39.02.23998309
> Mobile:   +39.333.4963172
> Email:    pierangelo.masarati@sys-net.it
> ------------------------------------------
>

Comment 4 Kurt Zeilenga 2006-04-11 13:48:23 UTC
changed notes
Comment 5 ivan.lago@ieo-research.it 2006-04-12 07:38:21 UTC
I send another trace with all the shared libraries and relative  
symbols loaded, even if the trace does not change at all.
Could it be a problem related to the posix thread implementation  
under FreeBSD?

If you need that I submit other tracebacks done in a different way  
than "thread apply all bt" (suggested by Pierangelo) please let me  
know so I can do it.
We are also considering the possibility to give SSH access to the  
machine to one of your core developers if needed.

Best regards,

Ivan

root@aaa2:/usr/ports/net/openldap23-server/work/openldap-2.3.20/tests  
gdb -p 75067 /usr/ports/net/openldap23-server/work/openldap-2.3.20/ 
servers/slapd/.libs/slapd
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.
This GDB was configured as "amd64-marcel-freebsd"...
Attaching to program: /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/servers/slapd/.libs/slapd, process 75067
Reading symbols from /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/libraries/libldap_r/.libs/libldap_r-2.3.so.2...done.
Loaded symbols for /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/libraries/libldap_r/.libs/libldap_r-2.3.so.2
Reading symbols from /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/libraries/liblber/.libs/liblber-2.3.so.2...done.
Loaded symbols for /usr/ports/net/openldap23-server/work/ 
openldap-2.3.20/libraries/liblber/.libs/liblber-2.3.so.2
Reading symbols from /usr/lib/libssl.so.3...done.
Loaded symbols for /usr/lib/libssl.so.3
Reading symbols from /lib/libcrypto.so.3...done.
Loaded symbols for /lib/libcrypto.so.3
Reading symbols from /usr/lib/libfetch.so.3...done.
Loaded symbols for /usr/lib/libfetch.so.3
Reading symbols from /usr/lib/libcom_err.so.2...done.
Loaded symbols for /usr/lib/libcom_err.so.2
Reading symbols from /lib/libcrypt.so.2...done.
Loaded symbols for /lib/libcrypt.so.2
Reading symbols from /usr/local/lib/libltdl.so.4...done.
Loaded symbols for /usr/local/lib/libltdl.so.4
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /usr/local/lib/nss_ldap.so.1...done.
Loaded symbols for /usr/local/lib/nss_ldap.so.1
Reading symbols from /usr/local/lib/libldap-2.3.so.2...done.
Loaded symbols for /usr/local/lib/libldap-2.3.so.2
Reading symbols from /usr/local/lib/libdb-4.3.so...done.
Loaded symbols for /usr/local/lib/libdb-4.3.so
Reading symbols from ../servers/slapd/back-bdb/.libs/back_bdb-2.3.so. 
2...done.
Loaded symbols for ../servers/slapd/back-bdb/.libs/back_bdb-2.3.so.2
Reading symbols from ../servers/slapd/back-monitor/.libs/ 
back_monitor-2.3.so.2...done.
Loaded symbols for ../servers/slapd/back-monitor/.libs/ 
back_monitor-2.3.so.2
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
[Switching to Thread 17 (LWP 100137)]
0x0000000801298040 in gettimeofday () from /lib/libc.so.5
(gdb) thread apply all bt

Thread 19 (Thread 19 (sleeping)):
#0  0x0000000801128ab7 in pthread_mutexattr_init () from /usr/lib/ 
libpthread.so.1
#1  0x0000000801128a10 in pthread_mutexattr_init () from /usr/lib/ 
libpthread.so.1
#2  0x000000080111bc04 in pthread_join () from /usr/lib/libpthread.so.1
#3  0x000000080070faa9 in ldap_pvt_thread_join ()
    from /usr/ports/net/openldap23-server/work/openldap-2.3.20/ 
libraries/libldap_r/.libs/libldap_r-2.3.so.2
#4  0x0000000000422bb3 in slapd_daemon ()
#5  0x0000000000411d5e in main ()

Thread 18 (Thread 18 (LWP 100185)):
#0  0x0000000801130bb4 in pthread_testcancel () from /usr/lib/ 
libpthread.so.1
#1  0x0000000000000000 in ?? ()
#2  0x0000000000000000 in ?? ()
#3  0x000000000000001e in ?? ()
#4  0x0000000000000000 in ?? ()
#5  0x00000000008cf000 in ?? ()
#6  0x00000000008cf000 in ?? ()
#7  0x00000000005f8000 in ?? ()
#8  0x000000080112919a in pthread_mutexattr_init () from /usr/lib/ 
libpthread.so.1
#9  0x0000000000000000 in ?? ()
Error accessing memory address 0x7fffffeff000: Bad address.
#0  0x0000000801298040 in gettimeofday () from /lib/libc.so.5


Comment 6 ivan.lago@ieo-research.it 2006-04-19 08:23:26 UTC
Hi
At the end the problem was a buggy implementation of posix threads in  
FreeBSD 5.4 on amd64. It was corrected in FreeBSD 6.0

Comment 7 Kurt Zeilenga 2006-04-19 08:43:33 UTC
changed notes
changed state Feedback to Closed
Comment 8 Howard Chu 2009-02-17 06:41:49 UTC
moved from Incoming to Archive.Incoming
Comment 9 OpenLDAP project 2014-08-01 21:05:59 UTC
os bug