linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Cc: Shayan Pooya <shayan@liveve.org>, <cgroups@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Richard Weinberger <richard@nod.at>,
	<containers@lists.linux-foundation.org>
Subject: Re: piping core dump to a program escapes container
Date: Wed, 09 Dec 2015 00:32:51 -0600	[thread overview]
Message-ID: <87oae0dtd8.fsf@x220.int.ebiederm.org> (raw)
In-Reply-To: <5667C1BC.7070204@cn.fujitsu.com> (Dongsheng Yang's message of "Wed, 9 Dec 2015 13:53:00 +0800")

Dongsheng Yang <yangds.fnst@cn.fujitsu.com> writes:

> On 12/09/2015 11:29 AM, Eric W. Biederman wrote:
>> Dongsheng Yang <yangds.fnst@cn.fujitsu.com> 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

  reply	other threads:[~2015-12-09  6:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-24 21:54 piping core dump to a program escapes container Shayan Pooya
2015-11-01 20:25 ` Richard Weinberger
2015-11-05  4:42   ` Shayan Pooya
2015-12-09  2:26 ` Dongsheng Yang
2015-12-09  2:36   ` Dongsheng Yang
2015-12-09  3:29     ` Eric W. Biederman
2015-12-09  5:53       ` Dongsheng Yang
2015-12-09  6:32         ` Eric W. Biederman [this message]
2015-12-09  8:06           ` Dongsheng Yang
2015-12-09  8:34       ` Bruno Prémont
2015-12-10  0:27         ` Dongsheng Yang
2015-12-10  2:58       ` Dongsheng Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oae0dtd8.fsf@x220.int.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=cgroups@vger.kernel.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard@nod.at \
    --cc=shayan@liveve.org \
    --cc=yangds.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).