OpenLDAP
Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest

Viewing Build/8330
Full headers

From: sebastien@slaunay.fr
Subject: Fix robust mutex detection for glibc 2.10 and 2.11
Compose comment
Download message
State:
0 replies:
1 followups: 1

Major security issue: yes  no

Notes:

Notification:


Date: Thu, 03 Dec 2015 18:57:44 +0000
From: sebastien@slaunay.fr
To: openldap-its@OpenLDAP.org
Subject:  Fix robust mutex detection for glibc 2.10 and 2.11
Full_Name: Sebastien Launay
Version: LMDB 0.9.17
OS: Ubuntu 10.04.4 LTS x86_64
URL: https://gist.githubusercontent.com/slaunay/3252415fad66d641e5b1/raw/356a57a7257e0e34fb87e78c12ca247da53f6be1/0001-Fix-robust-mutex-detection-for-glibc-2.10-and-2.11.patch
Submission from: (NULL) (104.36.15.110)


I am having trouble compiling version 0.9.17 as well as the master branch of
LMDB with Ubuntu Lucid.

When compiling the project under Ubuntu Lucid x86_64 (glibc 2.11), I get the
following errors:

$ make
gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized   -c mdb.c
mdb.c: In function 'mdb_mutex_failed':
mdb.c:10137: warning: implicit declaration of function
'pthread_mutex_consistent'
gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized   -c midl.c
ar rs liblmdb.a mdb.o midl.o
ar: creating liblmdb.a
gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized  -fPIC  -c mdb.c -o mdb.lo
mdb.c: In function 'mdb_mutex_failed':
mdb.c:10137: warning: implicit declaration of function
'pthread_mutex_consistent'
gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized  -fPIC  -c midl.c -o midl.lo
gcc  -pthread -shared -o liblmdb.so mdb.lo midl.lo
gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized   -c mdb_stat.c
gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized   mdb_stat.o liblmdb.a  -o mdb_stat
liblmdb.a(mdb.o): In function `mdb_mutex_failed':
/home/vagrant/lmdb/libraries/liblmdb/mdb.c:10137: undefined reference to
`pthread_mutex_consistent'
liblmdb.a(mdb.o): In function `mdb_env_setup_locks':
/home/vagrant/lmdb/libraries/liblmdb/mdb.c:4752: undefinerereference to
`pthread_mutexattr_setrobust'
collect2: ld returned 1 exit status
make: *** [mdb_stat] Error 1

The exact version of the glibc is the following:

$ ldd --version
ldd (Ubuntu EGLIBC 2.11.1-0ubuntu7.21) 2.11.1
Copyright (C) 2009 Free Stwtware Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
$ lsb_release -a
No LSB modules are available.
Distribut I ID: Ubuntu
Description:    Ubuntu 10.04.4 LTS
Release:    10.04
Codename:   lucid

I noticed that pthread_mutexattr_setrobust and pthread_mutex_consistent are
provided since 2.12 not 2.10:
https://github.molgen.mpg.de/git-mirror/glibc/commit/402cd98775db1478f64c9b0dbe00664b89eb2773
https://github.molgen.mpg.de/git-mirror/glibc/commit/78ee21859939ff75ccf8bbe00499b0c462df2e2d

After applying the provided fix against master (see attached patch URL), the
compilation and runtime are working properly.

Followup 1

Download message
Subject: Re: (ITS#8330) Fix robust mutex detection for glibc 2.10 and 2.11
To: sebastien@slaunay.fr, openldap-its@OpenLDAP.org
From: Howard Chu <hyc@symas.com>
Date: Thu, 3 Dec 2015 19:11:08 +0000
sebastien@slaunay.fr wrote:
> Full_Name: Sebastien Launay
> Version: LMDB 0.9.17
> OS: Ubuntu 10.04.4 LTS x86_64
> URL: https://gist.githubusercontent.com/slaunay/3252415fad66d641e5b1/raw/356a57a7257e0e34fb87e78c12ca247da53f6be1/0001-Fix-robust-mutex-detection-for-glibc-2.10-and-2.11.patch
> Submission from: (NULL) (104.36.15.110)
>
>
> I am having trouble compiling version 0.9.17 as well as the master branch
of
> LMDB with Ubuntu Lucid.
>
> When compiling the project under Ubuntu Lucid x86_64 (glibc 2.11), I get
the
> following errors:

Thanks, fixed in git mdb.master

> The exact version of the glibc is the following:
>
> $ ldd --version
> ldd (Ubuntu EGLIBC 2.11.1-0ubuntu7.21) 2.11.1
> Copyright (C) 2009 Free Stwtware Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> Written by Roland McGrath and Ulrich Drepper.
> $ lsb_release -a
> No LSB modules are available.
> Distribut I ID: Ubuntu
> Description:    Ubuntu 10.04.4 LTS
> Release:    10.04
> Codename:   lucid
>
> I noticed that pthread_mutexattr_setrobust and pthread_mutex_consistent are
> provided since 2.12 not 2.10:
> https://github.molgen.mpg.de/git-mirror/glibc/commit/402cd98775db1478f64c9b0dbe00664b89eb2773
> https://github.molgen.mpg.de/git-mirror/glibc/commit/78ee21859939ff75ccf8bbe00499b0c462df2e2d
>
> After applying the provided fix against master (see attached patch URL),
the
> compilation and runtime are working properly.
>
>


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


Up to top level
Build   Contrib   Development   Documentation   Historical   Incoming   Software Bugs   Software Enhancements   Web  

Logged in as guest


The OpenLDAP Issue Tracking System uses a hacked version of JitterBug

______________
© Copyright 2013, OpenLDAP Foundation, info@OpenLDAP.org