[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#247300: marked as done (libc6: malloc() never fails on 2.4 kernels, making processes crash)



Your message dated Sun, 16 May 2004 02:12:33 +0900
with message-id <81fza1zkam.wl@omega.webmasters.gr.jp>
and subject line Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 4 May 2004 12:41:54 +0000
>From vincent@vinc17.org Tue May 04 05:41:54 2004
Return-path: <vincent@vinc17.org>
Received: from greux.loria.fr [152.81.2.43] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BKzFB-0004EP-00; Tue, 04 May 2004 05:41:54 -0700
Received: from lefevre by greux.loria.fr with local (Exim 4.32)
	id 1BKzEg-0007DO-KV; Tue, 04 May 2004 14:41:22 +0200
Date: Tue, 4 May 2004 14:41:22 +0200
From: Vincent Lefevre <vincent@vinc17.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libc6: malloc() never fails on 2.4 kernels, making processes crash
Message-ID: <20040504124122.GA23363@greux.loria.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 2.58
X-Mailer-Info: http://www.vinc17.org/mutt/
User-Agent: Mutt/1.5.6i
Sender: Vincent Lefevre <vincent@vinc17.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 
X-CrossAssassin-Score: 1

Package: libc6
Version: 2.3.2.ds1-12
Severity: grave
Justification: causes non-serious data loss

I've set the overcommit to 0, and the malloc() function never fails,
even when there isn't enough memory left, making processes crash when
they need memory they have already allocated.

I'm not sure whether this is a libc6 or a kernel bug. I'm not familiar
with the glibc source, but could this be due to the following code?

malloc/arena.c:

  /* A memory region aligned to a multiple of HEAP_MAX_SIZE is needed.
     No swap space needs to be reserved for the following large
     mapping (on Linux, this is the case for all non-writable mappings
     anyway). */
  p1 = (char *)MMAP(0, HEAP_MAX_SIZE<<1, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE);
                                                                ^^^^^^^^^^^^^

FYI, here's my test program:

/* $Id: malloc.c 3174 2004-04-28 14:44:41Z lefevre $
 *
 * malloc() test
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define ONEMB 1048576

int main (void)
{
  char *p;
  int i;

  for (i = 1; (p = malloc(ONEMB)) != NULL; i++)
    {
      printf ("Got %d MB\n", i);
      memset (p, 0, ONEMB);
    }
  printf ("malloc() failed - OK\n");
  return 0;
}

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.26
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1

Versions of packages libc6 depends on:
ii  libdb1-compat                 2.1.3-7    The Berkeley database routines [gl

-- no debconf information

---------------------------------------
Received: (at 247300-done) by bugs.debian.org; 15 May 2004 17:12:34 +0000
>From gotom@debian.or.jp Sat May 15 10:12:34 2004
Return-path: <gotom@debian.or.jp>
Received: from omega.webmasters.gr.jp (webmasters.gr.jp) [218.44.239.78] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BP2iA-0004fu-00; Sat, 15 May 2004 10:12:34 -0700
Received: from omega.webmasters.gr.jp (localhost [127.0.0.1])
	by webmasters.gr.jp (Postfix) with ESMTP
	id 3CC99DEB58; Sun, 16 May 2004 02:12:33 +0900 (JST)
Date: Sun, 16 May 2004 02:12:33 +0900
Message-ID: <81fza1zkam.wl@omega.webmasters.gr.jp>
From: GOTO Masanori <gotom@debian.or.jp>
To: Vincent Lefevre <vincent@vinc17.org>, 247300-done@bugs.debian.org
Subject: Re: Bug#247300: libc6: malloc() never fails on 2.4 kernels, making processes crash
In-Reply-To: <20040515165831.GX7161@ay.vinc17.org>
References: <20040506230553.GA21397@nevyn.them.org>
	<20040507072511.GG2089@ay.vinc17.org>
	<20040507152903.GA22323@nevyn.them.org>
	<E1BMRe8-0002RN-00@mrelayng.kundenserver.de>
	<20040508150214.GE1417@ay.vinc17.org>
	<20040509141613.751.qmail@g-w2.w-local>
	<20040509143217.GE7161@ay.vinc17.org>
	<E1BMpph-0007un-00@mrelayng.kundenserver.de>
	<20040509173959.GF7161@ay.vinc17.org>
	<81isexzpzr.wl@omega.webmasters.gr.jp>
	<20040515165831.GX7161@ay.vinc17.org>
User-Agent: Wanderlust/2.9.9 (Unchained Melody) SEMI/1.14.3 (Ushinoya)
 FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.2
 (i386-debian-linux-gnu) MULE/5.0 (SAKAKI)
MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
Content-Type: text/plain; charset=US-ASCII
Delivered-To: 247300-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

At Sat, 15 May 2004 18:58:31 +0200,
Vincent Lefevre wrote:
> > I think we reached agreements that this bug is not glibc releated
> > problem.  Thanks to Wolfram and Daniel.  I would like to close this
> > bug.  Vincent, ok?
> 
> OK.

Thanks ack, I close this bug.

Regards,
-- gotom



Reply to: