From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26896 invoked by alias); 18 May 2009 14:32:02 -0000 Received: (qmail 26887 invoked by uid 22791); 18 May 2009 14:32:01 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from smtp02.lnh.mail.rcn.net (HELO smtp02.lnh.mail.rcn.net) (207.172.157.102) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 May 2009 14:31:54 +0000 Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 18 May 2009 10:31:52 -0400 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.10.5-GA) with ESMTP id PWL96457; Mon, 18 May 2009 10:31:48 -0400 (EDT) Received: from 65-78-31-9.c3-0.lex-ubr3.sbo-lex.ma.cable.rcn.com (HELO homebase.localnet) ([65.78.31.9]) by smtp01.lnh.mail.rcn.net with ESMTP; 18 May 2009 10:31:48 -0400 Received: from psmith by homebase.localnet with local (Exim 4.69) (envelope-from ) id 1M63sW-0001WV-AQ; Mon, 18 May 2009 10:31:44 -0400 Subject: Re: Partial cores using Linux "pipe" core_pattern From: Paul Smith Reply-To: psmith@gnu.org To: Andreas Schwab Cc: Andi Kleen , gdb@sourceware.org In-Reply-To: References: <1242609756.2800.135.camel@homebase.localnet> <87ab5aq3dq.fsf@basil.nowhere.org> <1242653371.2800.163.camel@homebase.localnet> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 18 May 2009 14:32:00 -0000 Message-Id: <1242657103.2800.170.camel@homebase.localnet> Mime-Version: 1.0 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-05/txt/msg00118.txt.bz2 On Mon, 2009-05-18 at 15:49 +0200, Andreas Schwab wrote: > Apparently the ELF core dumper cannot handle short writes (see > dump_write in fs/binfmt_elf.c). You should probably use a read buffer > of at least a page, which is the most the kernel tries to write at once. This is good info; thanks. But, my read buffer is 256K: const int bufsize = 1024 * 256; char *buf = (char *)malloc(bufsize); if (!buf) { _vlog(LOG_ERR, "Failed to allocate read buffer size %d\n", bufsize); exit(1); } (this is compiled with g++ for hysterical raisins, in case that wasn't obvious). I didn't check to see what the "normal" read sizes are. -- ------------------------------------------------------------------------------- Paul D. Smith Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.us "Please remain calm...I may be mad, but I am a professional." --Mad Scientist