From owner-freebsd-current@FreeBSD.ORG Wed Aug 20 14:26:26 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 220FA16A4BF for ; Wed, 20 Aug 2003 14:26:26 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 414A943FE0 for ; Wed, 20 Aug 2003 14:26:25 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9/8.12.9) with ESMTP id h7KLQErO051190; Wed, 20 Aug 2003 17:26:14 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)h7KLQEV8051187; Wed, 20 Aug 2003 17:26:14 -0400 (EDT) Date: Wed, 20 Aug 2003 17:26:14 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Yogeshwar Shenoy In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org Subject: Re: 5.1-R: zero byte core file. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2003 21:26:26 -0000 On Wed, 20 Aug 2003, Yogeshwar Shenoy wrote: > While using 5.1-RELEASE, I find that if my application program seg > faults, it produces "programname.core"; but it is 0 bytes. I ran the > exact same program on another machine that was running 4.4-RELEASE, and > I do get a core file that I can use with gdb. I'd really appreciate if > someone could help me resolve this. > > Additional details: - It is not specific to the application program. I > tried a 2 line program: > char p[8]; > memcpy(p, "1234567890123456789012345678901234567890", 40); > with same results on 5.1-R(0 byte core file) and 4.4-R(usable core > file) > > - "ulimit -a" on the 5.1-R machine gives > core file size (blocks, -c) unlimited > > - Just to be sure I used getrlimit() to find what the limit for > RLIMIT_CORE is in my processes, and it is RLIM_INFINITY. > > - I did the basic checks like write permission on current directory, it > looks fine. > > Can someone help me resolve this? With 5.1-CURRENT from July, I get: paprika:~/tmp/core> ./tmp Segmentation fault (core dumped) paprika:~/tmp/core> ls -l total 348 drwxr-xr-x 2 rwatson rwatson 512 Aug 20 17:23 ./ drwxr-xr-x 9 rwatson rwatson 512 Aug 20 17:23 ../ -rwxr-xr-x 1 rwatson rwatson 4677 Aug 20 17:23 tmp* -rw-r--r-- 1 rwatson rwatson 131 Aug 20 17:23 tmp.c -rw------- 1 rwatson rwatson 323584 Aug 20 17:23 tmp.core The corefile isn't very useful, since the stack is completely hosed by the operations, but I do get a core that I can point gdb at. Some elements of core file generation are platform-specific: what architecture are you running on? And, just to confirm, "df ." indicates you have space, right? Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories