This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Various] libc/1235: DB2 leaks mmaps



This seems to be an ALPHA specific bug (I can reproduce it on an alpha
running RedHat 6.0 but not on my ix86 running the current glibc 2.1.2
development version).

Any volunteers to look into this bug report?

Andreas



Topics:
   Re: libc/1235: DB2 leaks mmaps
   libc/1235: DB2 leaks mmaps


----------------------------------------------------------------------

Date: Wed, 4 Aug 1999 21:30:02 -0400
From: Ulrich Drepper <drepper@cygnus.com>
To: libc-gnats@gnu.org
Cc: gnats-admin@gnu.org
Subject: Re: libc/1235: DB2 leaks mmaps
Message-Id: <199908050130.VAA05976@mescaline.gnu.org>

The following reply was made to PR libc/1235; it has been noted by GNATS.

From: Ulrich Drepper <drepper@cygnus.com>
To: Jason Gunthorpe <jgg@faure.debian.org>
Cc: bugs@gnu.org
Subject: Re: libc/1235: DB2 leaks mmaps
Date: 04 Aug 1999 18:19:53 -0700

 Jason Gunthorpe <jgg@faure.debian.org> writes:
 
 > >Description:
 > 
 > Each open/close iteration of db2 leaks a mmap. Eventually all available FD's
 > are consumed and the system is unsuable. 
 
 I cannot reproduce this.  With glibc 2.1 and 2.1.1 it works just fine.
 I have no idea why it should fail for you.
 
 -- 
 ---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
 Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
 Cygnus Solutions `--' drepper at cygnus.com   `------------------------


------------------------------

Date: Wed, 04 Aug 1999 00:28:41 -0500
From: Jason Gunthorpe <jgg@faure.debian.org>
To: bugs@gnu.org
Subject: libc/1235: DB2 leaks mmaps
Message-Id: <E11BtbV-00045b-00@faure.debian.org>


>Number:         1235
>Category:       libc
>Synopsis:       DB2 leaks 1 mmap per open/close operation
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Wed Aug 04 01:30:01 EDT 1999
>Last-Modified:
>Originator:     
>Organization:
Debian.org
>Release:        libc-2.1.2
>Environment:
Debian GNU/Linux ALPHA Linux
Host type: alpha-unknown-linux-gnu
System: Linux faure 2.2.9 #1 Fri May 21 23:08:39 CDT 1999 alpha unknown
Architecture: alpha

Addons: crypt linuxthreads nss-v1

Build CC: gcc
Compiler version: egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)
Kernel headers: UTS_RELEASE
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:

Each open/close iteration of db2 leaks a mmap. Eventually all available FD's
are consumed and the system is unsuable. 

This bug is fatally serious for users of the NSS db module as programs like
tar will cause the NSS module to open/close the db multiple times - after
about 4000 files are extracted tar aborts. Other long running daemons almost
certainly have the same problem.

>How-To-Repeat:

A test program:

#include <unistd.h>
#include <db.h>

int main(int argc, const char *argv[])
{
   while (1)
   {
      DB *db;
      db_open(argv[1],DB_BTREE,DB_RDONLY,0,NULL,NULL,&db);
      db->close(db,0);
      sleep(1);
   }   
}

Compile+run as:
 gcc -ldb t.cc
 echo "t: foo" | makedb  -o jnk -
 ./a.out jnk

Monitor /proc/`pidof a.out`/maps and watch as it grows with each iteration.

>Fix:
Sorry, I don't know where the db library is leaking these maps.
>Audit-Trail:
>Unformatted:


------------------------------

End of forwardlnBnWJ Digest
***************************



-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]