Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752205AbbLIGls (ORCPT ); Wed, 9 Dec 2015 01:41:48 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:58635 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750819AbbLIGlq (ORCPT ); Wed, 9 Dec 2015 01:41:46 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Dongsheng Yang Cc: Shayan Pooya , , , Richard Weinberger , References: <56679161.303@cn.fujitsu.com> <56679399.6080306@cn.fujitsu.com> <876108fgfq.fsf@x220.int.ebiederm.org> <5667C1BC.7070204@cn.fujitsu.com> Date: Wed, 09 Dec 2015 00:32:51 -0600 In-Reply-To: <5667C1BC.7070204@cn.fujitsu.com> (Dongsheng Yang's message of "Wed, 9 Dec 2015 13:53:00 +0800") Message-ID: <87oae0dtd8.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX1/AH/zUwMDwJZthIpkrQH7OOZt5RNQaFwU= X-SA-Exim-Connect-IP: 70.59.167.217 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * -0.5 BAYES_05 BODY: Bayes spam probability is 1 to 5% * [score: 0.0338] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Dongsheng Yang X-Spam-Relay-Country: X-Spam-Timing: total 1298 ms - load_scoreonly_sql: 0.12 (0.0%), signal_user_changed: 5.0 (0.4%), b_tie_ro: 3.3 (0.3%), parse: 1.47 (0.1%), extract_message_metadata: 14 (1.1%), get_uri_detail_list: 1.66 (0.1%), tests_pri_-1000: 5 (0.4%), tests_pri_-950: 1.45 (0.1%), tests_pri_-900: 1.21 (0.1%), tests_pri_-400: 21 (1.6%), check_bayes: 20 (1.5%), b_tokenize: 6 (0.5%), b_tok_get_all: 6 (0.5%), b_comp_prob: 2.7 (0.2%), b_tok_touch_all: 2.5 (0.2%), b_finish: 0.82 (0.1%), tests_pri_0: 1234 (95.1%), check_dkim_signature: 0.77 (0.1%), check_dkim_adsp: 4.2 (0.3%), tests_pri_500: 9 (0.7%), rewrite_mail: 0.00 (0.0%) Subject: Re: piping core dump to a program escapes container X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1916 Lines: 45 Dongsheng Yang writes: > On 12/09/2015 11:29 AM, Eric W. Biederman wrote: >> Dongsheng Yang writes: >> > [...] > >> There has not yet been an obvious namespace in which to stick >> core_pattern, and even worse exactly how to appropriate launch a process >> in a container has not been figured out. >> >> If those tricky problems can be solved we can have a core_pattern in a >> container. What we have now is the best we have been able to figure out >> so far. > > Thanx Eric, but if I want to make docker works rely on this behaviour, > is that reliable? > > I mean, I want to make a docker container to dump the > core file to a specified path in host by a pipe way. But I am afraid > this behaviour would be changed later. Any suggestion? The kernel rules say if there is a behavior someone depends on and that behavior changes and breaks userspace that is a regression and it is not allowed. As developers we try not to create regressions. But some days it requires someone testing/using the functional enough to catdch an issue. That said the real issue you are likely to run into when developing this as part of docker is that docker doesn't get to own the core pattern. It doesn't make sense for any one application to, as it is a kernel wide setting. To have different app or container specific policies for core dumping likely requires either solving the problems I mentioned with containers or in userspace a solution so there can be an /etc/core_pattern.d/ with different configuration and different scripts that somehow know how to select which core files they want and dump them sanely. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/