Your message dated Fri, 14 May 2010 04:17:07 +0000
with message-id <e1ocmkh-0002yk...@ries.debian.org>
and subject line Bug#541387: fixed in electric-fence 2.1.15
has caused the Debian Bug report #541387,
regarding electric-fence: Fix pthread support
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
541387: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=541387
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: electric-fence
Version: 2.1.14.1
Severity: important
Tags: patch
Hello,
The pthread support is currently completely bogus (using getpid() to
identify threads has been bogus since Linux 2.6...). I don't know why
patch 365382 has still not been included, I guess that's because it's
quite intrusive. The attached patch is much less intrusive and should
thus be fine to be applied ASAP.
Thanks,
Samuel
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages electric-fence depends on:
ii libc6 2.9-23 GNU C Library: Shared libraries
electric-fence recommends no packages.
electric-fence suggests no packages.
-- no debconf information
--
Samuel Thibault <samuel.thiba...@fnac.net>
<s> bah, j'aime bien les feux d'artifices, mais j'ai peur de me prendre un
boeing sur le coin de la gueule si je vais sur le pont de brooklyn
-+- #ens-mim - 11 septembre forever -+-
--- electric-fence-2.1.14.1.original/efence.c 2005-01-15 20:18:20.000000000
+0100
+++ electric-fence-2.1.14.1/efence.c 2009-08-13 22:27:43.000000000 +0200
@@ -188,28 +188,28 @@
/*
* mutex to enable multithreaded operation
*/
-static pthread_mutex_t mutex ;
-static pid_t mutexpid=0;
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_t mutexowner = (pthread_t) -1;
static int locknr=0;
static void lock() {
if (pthread_mutex_trylock(&mutex)) {
- if (mutexpid==getpid()) {
+ if (mutexowner==pthread_self()) {
locknr++;
return;
} else {
pthread_mutex_lock(&mutex);
}
}
- mutexpid=getpid();
+ mutexowner=pthread_self();
locknr=1;
}
static void unlock() {
locknr--;
if (!locknr) {
- mutexpid=0;
+ mutexowner=(pthread_t)-1;
pthread_mutex_unlock(&mutex);
}
}
@@ -429,6 +429,8 @@
size_t slack;
char * address;
+ lock();
+
if ( allocationList == 0 )
initialize();
@@ -615,6 +617,7 @@
if ( !internalUse )
Page_DenyAccess(allocationList, allocationListSize);
+ unlock();
return address;
}
@@ -814,11 +817,9 @@
{
void *allocation;
- if ( allocationList == 0 ) {
- pthread_mutex_init(&mutex, NULL);
- initialize(); /* This sets EF_ALIGNMENT */
- }
lock();
+ if ( allocationList == 0 )
+ initialize(); /* This sets EF_ALIGNMENT */
allocation=memalign(EF_ALIGNMENT, size);
unlock();
@@ -833,10 +834,9 @@
void * allocation;
lock();
-
allocation = malloc(size);
- memset(allocation, 0, size);
unlock();
+ memset(allocation, 0, size);
return allocation;
}
--- End Message ---
--- Begin Message ---
Source: electric-fence
Source-Version: 2.1.15
We believe that the bug you reported is fixed in the latest version of
electric-fence, which is due to be installed in the Debian FTP archive:
electric-fence_2.1.15.dsc
to main/e/electric-fence/electric-fence_2.1.15.dsc
electric-fence_2.1.15.tar.gz
to main/e/electric-fence/electric-fence_2.1.15.tar.gz
electric-fence_2.1.15_i386.deb
to main/e/electric-fence/electric-fence_2.1.15_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 541...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Matthew Vernon <matt...@debian.org> (supplier of updated electric-fence package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Thu, 13 May 2010 21:54:16 +0100
Source: electric-fence
Binary: electric-fence
Architecture: source i386
Version: 2.1.15
Distribution: unstable
Urgency: low
Maintainer: Matthew Vernon <matt...@debian.org>
Changed-By: Matthew Vernon <matt...@debian.org>
Description:
electric-fence - A malloc(3) debugger
Closes: 541387
Changes:
electric-fence (2.1.15) unstable; urgency=low
.
* patch from Samuel Thibault to fix pthread support (closes: #541387)
* update lintian overrides
Checksums-Sha1:
67cd80f8bf6b4dc519c59bb32a1e9a183397f528 840 electric-fence_2.1.15.dsc
796916634a06a676a98005cf350c0b024ecfc940 30443 electric-fence_2.1.15.tar.gz
7bb3bf5c34011b75d3b4c89bcf8984c9741df347 21986 electric-fence_2.1.15_i386.deb
Checksums-Sha256:
d7fb43da46397f599e155b114048b3f576b7e125a6dc7641f9c31854997070e7 840
electric-fence_2.1.15.dsc
42f4eee9e13bf2e28d69856e5a62ae7b5307d04c688d57cae4a09cfaef35d762 30443
electric-fence_2.1.15.tar.gz
c69259574bec86400bbe0ef4472252fdd4938311357fd4d19b241c616be0db88 21986
electric-fence_2.1.15_i386.deb
Files:
778b54b59cba170e3dfcfe63095ec1e9 840 devel extra electric-fence_2.1.15.dsc
acb687c15f6cd27212493eda0c9265fa 30443 devel extra electric-fence_2.1.15.tar.gz
ed11d39a8c48220f228951fc5867dedb 21986 devel extra
electric-fence_2.1.15_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iQCVAwUBS+zMarDSad4X89TRAQjayAP/Zc3XdzEUXem/NeKBXaiuplbJLo6WrZwH
OP05ajHe8vKzr5PyoBI4gz3rEJQhgcmbaU3EJ2ZaQMokbV/lvA3ErFjTMh6W4H/0
ubBx/1eiNsWmeUMIPvCdkjset5g0aC5uxWu+WSyrU+JpwrB/qhhD/2rGfCEY7Kim
hv3AmeFoHA4=
=5T/I
-----END PGP SIGNATURE-----
--- End Message ---