[Evolution] Bug#391521: evolution-data-server creates too many pipes causing other functions to fail

Keith Packard keithp at keithp.com
Sat Oct 7 04:58:39 CEST 2006


Package: evolution-data-server
Version: 1.6.3-1+b1
Severity: important
Tags: patch

evolution-data-server version 1.6.3.1 contains a patch from Novell which
appears to have been a weak attempt to fix Novell bug #176277 where pipes
were created at object creation time rather than being delayed until needed.

On my system, with a few gigs of email, this often causes huge numbers of
pipes to be created unnecessarily, running evolution-data-server out of file
descriptors and causing most other functions to fail.

Reverting this change solves the problem for me, here's the patch I'm using:

diff --git a/libedataserver/e-msgport.c b/libedataserver/e-msgport.c
index de1f9f3..6f8f08d 100644
--- a/libedataserver/e-msgport.c
+++ b/libedataserver/e-msgport.c
@@ -537,9 +537,11 @@ EMsgPort *e_msgport_new(void)
 	e_dlist_init(&mp->queue);
 	mp->lock = g_mutex_new();
 	mp->cond = g_cond_new();
-	e_pipe (mp->pipe.pipe);
+	mp->pipe.fd.read = -1;
+	mp->pipe.fd.write = -1;
 #ifdef HAVE_NSS
-	e_prpipe (mp->prpipe.pipe);
+	mp->prpipe.fd.read = NULL;
+	mp->prpipe.fd.write = NULL;
 #endif
 	mp->condwait = 0;
 
@@ -566,12 +568,21 @@ #endif
 /* get a fd that can be used to wait on the port asynchronously */
 int e_msgport_fd(EMsgPort *mp)
 {
+	g_mutex_lock(mp->lock);
+	if (mp->pipe.fd.read == -1)
+		e_pipe(mp->pipe.pipe);
+	g_mutex_unlock(mp->lock);
 	return mp->pipe.fd.read;
 }
 
 #ifdef HAVE_NSS
 PRFileDesc *e_msgport_prfd(EMsgPort *mp)
 {
+	g_mutex_lock(mp->lock);
+	if (mp->prpipe.fd.read == NULL)
+		e_prpipe (mp->prpipe.pipe);
+	g_mutex_unlock(mp->lock);
+
 	return mp->prpipe.fd.read;
 }
 #endif


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages evolution-data-server depends on:
ii  evolutio 1.6.3-1                         architecture independent files for
ii  libaudio 0.2.6-6                         Open-source version of SGI's audio
ii  libavahi 0.6.13-3                        Avahi client library
ii  libavahi 0.6.13-3                        Avahi common library
ii  libavahi 0.6.13-3                        Avahi glib integration library
ii  libbonob 2.14.0-2                        Bonobo CORBA interfaces library
ii  libc6    2.3.6.ds1-5                     GNU C Library: Shared libraries
ii  libcamel 1.6.3-1+b1                      The Evolution MIME message handlin
ii  libcomer 1.39+1.40-WIP-2006.10.02+dfsg-1 common error description library
ii  libdb4.4 4.4.20-8                        Berkeley v4.4 Database Libraries [
ii  libdbus- 0.93-1                          simple interprocess messaging syst
ii  libebook 1.6.3-1+b1                      Client library for evolution addre
ii  libecal1 1.6.3-1+b1                      Client library for evolution calen
ii  libedata 1.6.3-1+b1                      Backend library for evolution addr
ii  libedata 1.6.3-1+b1                      Backend library for evolution cale
ii  libedata 1.6.3-1+b1                      Utility library for evolution data
ii  libegrou 1.6.3-1+b1                      Client library for accessing group
ii  libesd0  0.2.36-3                        Enlightened Sound Daemon - Shared 
ii  libgconf 2.14.0-4                        GNOME configuration database syste
ii  libgcryp 1.2.3-2                         LGPL Crypto library - runtime libr
ii  libglib2 2.12.4-1                        The GLib library of C routines
ii  libgnome 2.14.1-3                        The GNOME 2 library - runtime file
ii  libgnome 2.14.2-2+b1                     GNOME virtual file-system (runtime
ii  libgnutl 1.4.4-1                         the GNU TLS library - runtime libr
ii  libgpg-e 1.4-1                           library for common error values an
ii  libkrb53 1.4.4-3                         MIT Kerberos runtime libraries
ii  libldap2 2.1.30-13+b1                    OpenLDAP libraries
ii  libnspr4 1.8.0.7-1                       NetScape Portable Runtime Library
ii  libnss3- 1.8.0.7-1                       Network Security Service libraries
ii  liborbit 1:2.14.0-2                      libraries for ORBit2 - a CORBA ORB
ii  libpopt0 1.10-3                          lib for parsing cmdline parameters
ii  libsoup2 2.2.96-1                        an HTTP library implementation in 
ii  libtasn1 0.3.6-1                         Manage ASN.1 structures (runtime)
ii  libxml2  2.6.26.dfsg-4                   GNOME XML library
ii  zlib1g   1:1.2.3-13                      compression library - runtime

evolution-data-server recommends no packages.

-- no debconf information




More information about the Pkg-evolution-maintainers mailing list