From owner-freebsd-hackers@freebsd.org Fri Apr 1 09:41:55 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 889AAAEBE40 for ; Fri, 1 Apr 2016 09:41:55 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 54CF8194C; Fri, 1 Apr 2016 09:41:55 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 00BE04FB03; Fri, 1 Apr 2016 09:32:40 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTP id u319WdeB009588; Fri, 1 Apr 2016 09:32:40 GMT (envelope-from phk@phk.freebsd.dk) To: Matthew Seaman cc: freebsd-hackers@freebsd.org Subject: Re: Catching core files in read-only jails In-reply-to: <56FE13BA.4060500@FreeBSD.org> From: "Poul-Henning Kamp" References: <56FE13BA.4060500@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9586.1459503159.1@critter.freebsd.dk> Date: Fri, 01 Apr 2016 09:32:39 +0000 Message-ID: <9587.1459503159@critter.freebsd.dk> X-Mailman-Approved-At: Fri, 01 Apr 2016 11:22:06 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2016 09:41:55 -0000 -------- In message <56FE13BA.4060500@FreeBSD.org>, Matthew Seaman writes: >> If an application is running on a production server in a read-only >> jail for security purposes, and it crashes occasionally due to some >> unknown bug, is there any way to catch a core file? > >You'll have to mount a read-write filesystem somewhere in your jail and >configure core dumps to be written to that filesystem. Something like >this example from core(5): It would be really nice if instead of coredumps one could select to just get a stack backtrace. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.