Doesnt "currently asm" indicate asm spinlocks.. Which can be unreliable. These can be even more unreliable with unpatched bdb?
So perhaps you should try posix style semaphores.. Forcing posix/pthreads both at compile time and at run time..
-----Original Message----- From: Howard Chu hyc@symas.com Sent: Tuesday, 17 February 2009 1:26 AM To: Dieter Kluenter dieter@dkluenter.de Cc: openldap-devel@openldap.org Subject: Re: 2.4.14 prerelease call for testing #2
Dieter Kluenter wrote:
Aaron Richtonrichton@nbcs.rutgers.edu writes:
[..snip..]
#0 0x00002b77bc3da12d in __lock_detect () from /usr/local/BerkeleyDB.4.7/lib/libdb-4.7.so Current language: auto; currently asm
Which is pretty squarely inside BerkeleyDB. But nobody else reported any such problem yet. Seems you'll have to check your BDB build.
Brett Maxfield brett.maxfield@gmail.com writes:
Doesnt "currently asm" indicate asm spinlocks.. Which can be unreliable. These can be even more unreliable with unpatched bdb?
So perhaps you should try posix style semaphores.. Forcing posix/pthreads both at compile time and at run time..
db-4.7.25 has been build with --enable-posixmutexes --enable-pthread_api [...]
-Dieter
On Thu, Feb 19, 2009 at 2:15 AM, Dieter Kluenter dieter@dkluenter.de wrote:
Brett Maxfield brett.maxfield@gmail.com writes:
Doesnt "currently asm" indicate asm spinlocks.. Which can be unreliable. These can be even more unreliable with unpatched bdb?
So perhaps you should try posix style semaphores.. Forcing posix/pthreads both at compile time and at run time..
db-4.7.25 has been build with --enable-posixmutexes --enable-pthread_api
I use ../dist/configure --disable-java --enable-posixmutexes --with-mutex=POSIX/pthreads --enable-largefile --enable-cxx
--with-mutex=POSIX/pthreads is important as it selects posix mutex at runtime, not compile time.
If i remember above was also the workaround for before 4.7 patch #3 was released, which would cause asm to be selected by the selection algorithm and it was asm spinlocks which had the bug.
On solaris at least, i think POSIX/pthreads is better as the thread library is pretty good (IMHO) but i suspect newer Linuxes will have good POSIX/pthreads also.. the BDB library makes debatable choice of asm at runtime even if the platform has a good pthreads implementation.
I think on multi-threaded platform, spinlocks are non-optimal as there are more possible race conditions and consumtion of large numbers of locking / locker objects with openldap using asm spinlocks.. it is probably fine / optimal for single threaded use though.
Cheers Brett
"Brett @Google" brett.maxfield@gmail.com writes:
On Thu, Feb 19, 2009 at 2:15 AM, Dieter Kluenter dieter@dkluenter.de wrote:
Brett Maxfield brett.maxfield@gmail.com writes:
Doesnt "currently asm" indicate asm spinlocks.. Which can be unreliable. These can be even more unreliable with unpatched bdb?
So perhaps you should try posix style semaphores.. Forcing posix/pthreads both at compile time and at run time..
db-4.7.25 has been build with --enable-posixmutexes --enable-pthread_api
I use ../dist/configure --disable-java --enable-posixmutexes --with-mutex=POSIX/pthreads --enable-largefile --enable-cxx
--with-mutex=POSIX/pthreads is important as it selects posix mutex at runtime, not compile time.
I don't think that this configure option is necessary on linux, as libpthread is the default AFAIK. from configure --help: --with-mutex=MUTEX Select non-default mutex implementation.
-Dieter
Dieter Kluenter wrote:
"Brett @Google"brett.maxfield@gmail.com writes:
On Thu, Feb 19, 2009 at 2:15 AM, Dieter Kluenterdieter@dkluenter.de wrote:
Brett Maxfieldbrett.maxfield@gmail.com writes:
Doesnt "currently asm" indicate asm spinlocks.. Which can be unreliable. These can be even more unreliable with unpatched bdb?
So perhaps you should try posix style semaphores.. Forcing posix/pthreads both at compile time and at run time..
db-4.7.25 has been build with --enable-posixmutexes --enable-pthread_api
I use ../dist/configure --disable-java --enable-posixmutexes --with-mutex=POSIX/pthreads --enable-largefile --enable-cxx
--with-mutex=POSIX/pthreads is important as it selects posix mutex at runtime, not compile time.
I don't think that this configure option is necessary on linux, as libpthread is the default AFAIK. from configure --help: --with-mutex=MUTEX Select non-default mutex implementation.
The default on Linux is "hybrid" which means spinlocks and pthread locks. The spinlocks are extremely CPU intensive and have shown no benefit in our testing. You should always use --with-mutex=POSIX/pthreads. This has already been discussed on this list before. Please read the archives instead of posting redundant posts.
2.4.14 was released days ago. Please change the subject from "2.4.14 prerelease" if you're going to continue replying to these threads.