From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7613 invoked by alias); 29 Sep 2009 03:25:41 -0000 Received: (qmail 7584 invoked by uid 22791); 29 Sep 2009 03:25:40 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f185.google.com (HELO mail-px0-f185.google.com) (209.85.216.185) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Sep 2009 03:25:33 +0000 Received: by pxi15 with SMTP id 15so5281937pxi.25 for ; Mon, 28 Sep 2009 20:25:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.152.1 with SMTP id z1mr292783wfd.322.1254194732076; Mon, 28 Sep 2009 20:25:32 -0700 (PDT) In-Reply-To: <30ca7ede0909281909n40cccc62m8e3c574546f7208f@mail.gmail.com> References: <30ca7ede0909281909n40cccc62m8e3c574546f7208f@mail.gmail.com> From: Hui Zhu Date: Tue, 29 Sep 2009 03:25:00 -0000 Message-ID: Subject: Re: reg: GDB's generate-core-file option To: Aarthy Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00318.txt.bz2 " (No space left on device)" I think this is the reason. Thanks, Hui On Tue, Sep 29, 2009 at 10:09, Aarthy wrote: > Hi there, > > I am currently working on a product which has many processes running > in a multi threaded fashion. I run my product on a device which has > 200 MB of hard disk space to write the core file. It doesn't have any > swap memory as such. My requirement is that I need to collect the > snapshot of each process at a particular time. So I used > generate-core-file option after attaching each process to GDB. The > problem is that for one process i get the following error. > > warning: Failed to write corefile contents (No space left on device). > ../../gdb/utils.c:1058: internal-error: virtual memory exhausted: > can't allocate 92123136 bytes. > A problem internal to GDB has been detected, > further debugging may prove unreliable. > > I would like to know what could be the reason. I have about 15 > processes running. everything except this process i was able to > generate the forced core file. > This is my ulimit -a output, > > Linux(debug)# ulimit -a > core file size =A0 =A0 =A0 =A0(blocks, -c) 73242 > data seg size =A0 =A0 =A0 =A0 (kbytes, -d) 62500 > file size =A0 =A0 =A0 =A0 =A0 =A0 (blocks, -f) unlimited > max locked memory =A0 =A0 (kbytes, -l) unlimited > max memory size =A0 =A0 =A0 (kbytes, -m) unlimited > open files =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(-n) 1024 > pipe size =A0 =A0 =A0 =A0 =A0(512 bytes, -p) 8 > stack size =A0 =A0 =A0 =A0 =A0 =A0(kbytes, -s) unlimited > cpu time =A0 =A0 =A0 =A0 =A0 =A0 (seconds, -t) unlimited > max user processes =A0 =A0 =A0 =A0 =A0 =A0(-u) 26624 > virtual memory =A0 =A0 =A0 =A0(kbytes, -v) 125000 > > If i change the virtual memory size to unlimited i was able to > generate the core. Kindly let me know how exactly the > generate-core-file works. > > Regards, > Aarthy. >