From owner-freebsd-hackers@freebsd.org Thu Jul 12 18:36:04 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0E6910319C3 for ; Thu, 12 Jul 2018 18:36:03 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD8477D9D for ; Thu, 12 Jul 2018 18:36:03 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 2C07310319C1; Thu, 12 Jul 2018 18:36:03 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09B8410319C0 for ; Thu, 12 Jul 2018 18:36:03 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7DB4077D96; Thu, 12 Jul 2018 18:36:02 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pf0-x229.google.com with SMTP id l123-v6so21087606pfl.13; Thu, 12 Jul 2018 11:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uk7Pd6fZDrtkZ1f+VqJVJy74756c+CFwNCaiF1HiO2E=; b=vJZX0pbYjttRG3VvZ6I0OjH7UA9xpBK1e7T15H7dbWdF/C4FOSzmebgSNL4877+BTS mqC0mJkv7EMLxnhpJ6ZAWwTjOULscZ/tRBLWD5nk1lxlAVfeca7RBaUErdmgjaQAaQJQ PqmeiyOaRhXtIbTa73ctACNEY+nW4iD62Egj9aWjESjk0u5ZzSGUF79Qo2oGu0W5p1IH pwJaB4emxQTuuCere3vpzrDBpQu71TsOEjCr/KheLlYZNoCvlXjXmHMctCGWSpjt5xQA ywyOeUZToWHCzmXT9grHoVrFSJahEDaL6wCcsfv6uCsDcZBUAEoJKxVqEt1UPm2oObo4 /TyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=uk7Pd6fZDrtkZ1f+VqJVJy74756c+CFwNCaiF1HiO2E=; b=uQ6OkufDsSHIQQR+i1PFiSJaHGWcMhHfMIGE/gDU0T26yKzEWIITI1BkUOia9fwXMp ummgkruw4fpau72o8tazK9RxjNF+P61JbnhLtro5XMIzTB3bKG+JI/eWxKlxYDiVyuMd 6n8hhL+YQIbnb+xDczmCzkO+TlmXpv46arjZt2slSvgD72rhj4UWh9t+cAMlkIn2lZyh CltyeXBjnF0eGs7MWr5KHbr1Z+RhcrqxptN4FTxtiyNekBwwxo4dmsBdOajdsEFCY7DZ lmmUmZqOzVfWC0jhl1n/jeFM/CpZ4GVj22TLjLQj+MmBN+nP0nFNT3Jfmh8bT+rF1C2j fwlQ== X-Gm-Message-State: AOUpUlF6/4r6T9bGVj+hloh7JawFeMBRWSxl6TBo1ycpcqeKFQMkrXaW XVp85hMyw7HdARwhmye1sWLDJg== X-Google-Smtp-Source: AAOMgpegDXVeHjouu+AUbvsgCDJfzx+gpFZqYDEpsFg0dLeMng3mCANdt2PXfYY/nkR6qiA1ka73FA== X-Received: by 2002:a62:c991:: with SMTP id l17-v6mr3596135pfk.10.1531420561135; Thu, 12 Jul 2018 11:36:01 -0700 (PDT) Received: from raichu (toroon0560w-lp130-09-70-52-224-107.dsl.bell.ca. [70.52.224.107]) by smtp.gmail.com with ESMTPSA id d9-v6sm31043987pfb.86.2018.07.12.11.35.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 11:36:00 -0700 (PDT) Sender: Mark Johnston Date: Thu, 12 Jul 2018 14:35:57 -0400 From: Mark Johnston To: John Baldwin Cc: Alexander Leidinger , hackers@freebsd.org Subject: Re: crashinfo doesn't support compressed crashdumps - which way forward? Message-ID: <20180712183557.GD15892@raichu> References: <20180712141409.Horde.NVSzLsvqE-2PCSDqhhfb0Xd@webmail.leidinger.net> <20180712143118.GA15892@raichu> <6858738d-7eef-cc0f-10bd-900fb822fecd@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6858738d-7eef-cc0f-10bd-900fb822fecd@FreeBSD.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2018 18:36:04 -0000 On Thu, Jul 12, 2018 at 09:09:02AM -0700, John Baldwin wrote: > On 7/12/18 7:31 AM, Mark Johnston wrote: > > On Thu, Jul 12, 2018 at 02:14:09PM +0200, Alexander Leidinger wrote: > >> Hi, > >> > >> the crashinfo script doesn't know how to handle compressed coredumps. > >> What would be acceptable behavior (ordered by my preferrence)? > >> 1) decompress in /var/crash and then proceed normally (already > >> implemented locally) > >> 2) decompress to CRASHTMPDIR:/var/tmp/xxx and delete when finished > >> 3) keep it like it is > >> 4) teach tools to understand compressed dumps (gzip / zstd) > >> > >> Implicitly there is the question what what is the purpose of > >> compressing crashdumps, to have more RAM than space in dumpdev (which > >> is valid in my case), or to save space in /var/crash (which I don't > >> care much about). > > > > I think jhb has a patch which implements 2). I do not have strong > > feelings on which is the right way forward, but I mildly prefer 2) to > > 1). It looks like crashinfo can be disabled in rc.conf, so users who > > are space-constrained in /var/crash can take the additional step of > > setting crashinfo_enable=NO. FWIW, when I committed the compression > > support, my use-case involved both a small dump device and a small > > /var filesystem. > > Yes, here's the patch for 2 which has been tested. 4) is pretty hard > to do in practice as you have to basically decompress into RAM when > reading the core to do anything useful as opposed to a format that > only compressed certain parts (e.g. if the page tables were not > compressed only the payload in a minidump, and if it were compressed > on some kind of block boundaries so that you could locate a given > block and decompress it when reading specific data). Coming up with > such a format would be more useful but requires more work. That patch looks ok to me, FWIW. As I pointed out, it's easy enough to just disable crashinfo if one doesn't want the extraction to take place.