libdb*, mutex and threading
Hi, libdb* has some important/RC-bugs about mutex support and threading. After looking deeper at it, it seems to me that the way to go is to use the solution from db4.3, namely to add --enable-pthreadsmutexes to configure (and disable it by default) and don't use LD_ASSUME_KERNEL. (Not using LD_ASSUME_KERNELS will make sure it works fine on all 2.6 systems, and not using pthreads will make sure it works fine on all 2.4 systems, so that part is IMHO necessary to fix anyways, even if reported only for amd64. IMHO the mips mutex is also necessary to fix.) Please feel free to use your cluebat on me, if I misunderstood something. If there are no issues, I'll go to implement the necessary changes to the other db-packages, and port the current mips*-mutex support. This will solve the following bugs: db2: (not reported) packages compiled on 2.6 have issues on 2.4 (not reported) Fast mutex support for mips and amd64 db3: #283520: db3: FTBFS: LD_ASSUME_KERNEL=2.4.24 not supported on amd64 (not reported) Fast mutex support for mips and amd64 db4.0: #276828: db4.0: FTBFS on amd64: No linuxthreads (not reported) Fast mutex support for mips and amd64 db4.1: (not reported) packages compiled on 2.6 have issues on 2.4 #281059: db4.1: Fast mutex support for mips and amd64. db4.2: #232305: libdb4.2: Hangs on SMP (HyperThreaded P4) system using slapd 2.1.25-1 #248131: amd64 support: Missing mutexes and "$LD" vs. $LD I also will apply the fix to: #266685: libdb3: db3 loops on mutex on hppa Cheers, Andi -- http://home.arcor.de/andreas-barth/ PGP 1024/89FB5CE5 DC F1 85 6D A6 45 9C 0F 3B BE F1 D0 C5 D1 D9 0C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: libdb*, mutex and threading
On Sun, Jan 16, 2005 at 01:24:57PM +0100, Andreas Barth wrote: > This will solve the following bugs: > db2: > (not reported) packages compiled on 2.6 have issues on 2.4 > (not reported) Fast mutex support for mips and amd64 mutex/spinlocks also seem to be missing for ia64, powerpc and arm. > db3: > #283520: db3: FTBFS: LD_ASSUME_KERNEL=2.4.24 not supported on amd64 > (not reported) Fast mutex support for mips and amd64 Also missing arm mutexes. > db4.0: > #276828: db4.0: FTBFS on amd64: No linuxthreads > (not reported) Fast mutex support for mips and amd64 Also missing arm mutexes. > db4.1: > (not reported) packages compiled on 2.6 have issues on 2.4 > #281059: db4.1: Fast mutex support for mips and amd64. > > db4.2: > #232305: libdb4.2: Hangs on SMP (HyperThreaded P4) system using slapd 2.1.25-1 There doesn't seem to be a fix for this? Or did I miss something? > #248131: amd64 support: Missing mutexes and "$LD" vs. $LD > > > I also will apply the fix to: > #266685: libdb3: db3 loops on mutex on hppa The bug says it was fixed in "libdb4", but db2 to db4.3 seem to have identical code for it. Kurt -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: libdb*, mutex and threading
* Kurt Roeckx ([EMAIL PROTECTED]) [050116 22:45]: > On Sun, Jan 16, 2005 at 01:24:57PM +0100, Andreas Barth wrote: > > db4.2: > > #232305: libdb4.2: Hangs on SMP (HyperThreaded P4) system using slapd > > 2.1.25-1 > There doesn't seem to be a fix for this? Or did I miss > something? AFAICS, this is fixed with changing configure to never link to pthread, and not using LD_ASSUME_KERNEL. Cheers, Andi -- http://home.arcor.de/andreas-barth/ PGP 1024/89FB5CE5 DC F1 85 6D A6 45 9C 0F 3B BE F1 D0 C5 D1 D9 0C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Pkg-db-devel] libdb*, mutex and threading
* Andreas Barth ([EMAIL PROTECTED]) [050130 16:05]: > [...] there is an issue with this hunk: > @@ -21001,7 +21709,7 @@ > echo "$as_me:$LINENO: result: $JAVA_VERSION" >&5 > echo "${ECHO_T}$JAVA_VERSION" >&6 > case "$JAVA_VERSION" in > - 1.[3456789]* | *1.[0-9].[0-9]* | [23456789]* ) ;; > + 1.[3456789]* | 1.[1-9][0-9]* | [23456789]* ) ;; > * ) > { { echo "$as_me:$LINENO: error: Java version 1.3 or higher > required, got $JAVA_VERSION" >&5 > echo "$as_me: error: Java version 1.3 or higher required, got $JAVA_VERSION" > >&2;} > @@ -21057,21 +21765,28 @@ This leads to FTBFS with sablevm installed, giving: configure: error: Java version 1.3 or higher required, got SableVM version 1.1.9 I believe that the real Patch should be to fix this stanza in the upstream auto*-tools: case "$JAVA" in *kaffe* ) JAVA_VERSION=`$JAVA -version 2>&1 | sed -e '/Java Version:/!d' -e 's/.*Java Version: \([^ ]*\)[ ]*/\1/'` ;; * ) JAVA_VERSION=`$JAVA -version 2>&1 | sed -e '/ version /!d' -e 's/.*"\(.*\)".*/\1/'` ;; esac echo "$as_me:$LINENO: result: $JAVA_VERSION" >&5 echo "${ECHO_T}$JAVA_VERSION" >&6 case "$JAVA_VERSION" in 1.[3456789]* | *1.[0-9].[0-9]* | [23456789]* ) ;; (and special-case also Sablevm). But well, for now, I undid this hunk. Of course, I'll document that - and if somebody knows where to file this bug against, please do so. Cheers, Andi -- http://home.arcor.de/andreas-barth/ PGP 1024/89FB5CE5 DC F1 85 6D A6 45 9C 0F 3B BE F1 D0 C5 D1 D9 0C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Pkg-db-devel] libdb*, mutex and threading
* Andreas Barth ([EMAIL PROTECTED]) [050130 16:35]: > * Andreas Barth ([EMAIL PROTECTED]) [050130 16:05]: > > [...] > there is an issue with this hunk: > [...] In the end, I did the following additional changes: - newer ltmain.sh taken from /usr/share/libtool/ltmain.sh - set the java version match in configure.ac to 1.[[3456789]]* | *1.[[0-9]]* | [[23456789]]* which is basically wrong, but the same as till now. - s/shrext/shrext_cmds/ in dist/aclocal/sosuffix. I'll upload the final source package to people.debian.org/~aba/db4.2/ once gluck is available again. Cheers, Andi -- http://home.arcor.de/andreas-barth/ PGP 1024/89FB5CE5 DC F1 85 6D A6 45 9C 0F 3B BE F1 D0 C5 D1 D9 0C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Pkg-db-devel] Re: libdb*, mutex and threading
> > > db4.2: > > > #232305: libdb4.2: Hangs on SMP (HyperThreaded P4) system using slapd > > > 2.1.25-1 > > > There doesn't seem to be a fix for this? Or did I miss > > something? > > AFAICS, this is fixed with changing configure to never link to pthread, > and not using LD_ASSUME_KERNEL. When is it linking to pthread? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Pkg-db-devel] Re: libdb*, mutex and threading
* Clint Adams ([EMAIL PROTECTED]) [050116 23:25]: > > > > db4.2: > > > > #232305: libdb4.2: Hangs on SMP (HyperThreaded P4) system using slapd > > > > 2.1.25-1 > > > There doesn't seem to be a fix for this? Or did I miss > > > something? > > AFAICS, this is fixed with changing configure to never link to pthread, > > and not using LD_ASSUME_KERNEL. > When is it linking to pthread? I hope that I didn't misrepresent that changes from: * Forward-port Kurt Roeckx's patch from bug#281059. - Add fast mutexes for MIPS and amd64. - Add --enable-pthreadsmutexes to configure. * Remove LD_ASSUME_KERNEL hack, since the --enable-pthreadsmutexes option defaults to off. (from db4.3 changelog) (But I meant that change - with dropping the LD_ASSUME_KERNEL hack, this problem should AFAICS also disappear.) Cheers, Andi -- http://home.arcor.de/andreas-barth/ PGP 1024/89FB5CE5 DC F1 85 6D A6 45 9C 0F 3B BE F1 D0 C5 D1 D9 0C -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Pkg-db-devel] Re: libdb*, mutex and threading
> (But I meant that change - with dropping the LD_ASSUME_KERNEL hack, this > problem should AFAICS also disappear.) Well, none of the current packages should be linking against -lpthread; I don't see why continuing to not link them against -lpthread should solve any bugs. Am I missing something? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: [Pkg-db-devel] Re: libdb*, mutex and threading
* Clint Adams: >> > > db4.2: >> > > #232305: libdb4.2: Hangs on SMP (HyperThreaded P4) system using slapd >> > > 2.1.25-1 >> >> > There doesn't seem to be a fix for this? Or did I miss >> > something? >> >> AFAICS, this is fixed with changing configure to never link to pthread, >> and not using LD_ASSUME_KERNEL. > > When is it linking to pthread? When it detects that POSIX mutexes can cross address spaces, I believe. If this logic has been overridden (for example, by setting db_cv_mutex, or by patching configure.ac---which is a must for Debian, to support 2.4 kernels without NPTL), linking against a threading library should not occur. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]