qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Cc: Will Drewry <wad@chromium.org>,
	coreyb@linux.vnet.ibm.com, qemu-devel <qemu-devel@nongnu.org>,
	Paul Moore <pmoore@redhat.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-1.7] seccomp: setting "-sandbox on" by default
Date: Thu, 5 Dec 2013 14:15:01 +0100	[thread overview]
Message-ID: <20131205131501.GB6385@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <529F2C48.3060304@linux.vnet.ibm.com>

On Wed, Dec 04, 2013 at 11:21:12AM -0200, Eduardo Otubo wrote:
> On 12/04/2013 07:39 AM, Stefan Hajnoczi wrote:
> >On Fri, Nov 22, 2013 at 11:00:24AM -0500, Paul Moore wrote:
> >>>Developers will only be happy with seccomp if it's easy and rewarding to
> >>>support/debug.
> >>
> >>Agreed.
> >>
> >>As a developer, how do you feel about the audit/syslog based approach I
> >>mentioned earlier?
> >
> >I used the commands you posted (I think that's what you mean).  They
> >produce useful output.
> >
> >The problem is that without an error message on stderr or from the
> >shell, no one will think "QEMU process dead and hung == check seccomp"
> >immediately.  It's frustrating to deal with a "silent" failure.
> 
> The process dies with a SIGKILL, and sig handling in Qemu is hard to
> implement due to dozen of external linked libraries that has their
> own signal masks and conflicts with seccomp. I've already tried this
> approach in the past (you can find in the list by searching for
> debug mode)

I now realize we may be talking past each other.  Dying with
SIGKILL/SIGSYS is perfectly reasonable and I would be happy with that
:-).

But I think there's a bug in seccomp: a multi-threaded process can be
left in a zombie state.  In my case the primary thread was killed by
seccomp but another thread was deadlocked on a futex.

The result is the process isn't quite dead yet.  The shell will not reap
it and we're stuck with a zombie.

I can reproduce it reliably when I run "qemu-system-x86_64 -sandbox on"
on Fedora 20 (qemu-system-x86-1.6.1-2).

Should seccomp use do_group_exit() for SIGKILL?

Stefan

  parent reply	other threads:[~2013-12-05 13:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-22 11:21 [Qemu-devel] [PATCH for-1.7] seccomp: setting "-sandbox on" by default Eduardo Otubo
2013-10-22 13:00 ` Anthony Liguori
2013-10-23 14:42   ` Eduardo Otubo
2013-10-30 10:04     ` Stefan Hajnoczi
2013-11-21 15:14       ` Paolo Bonzini
2013-11-21 15:48         ` Paul Moore
2013-11-21 16:22           ` Eduardo Otubo
2013-11-22 10:39           ` Stefan Hajnoczi
2013-11-22 14:44             ` Paul Moore
2013-11-22 15:48               ` Stefan Hajnoczi
2013-11-22 16:00                 ` Paul Moore
2013-12-04  9:39                   ` Stefan Hajnoczi
2013-12-04 13:21                     ` Eduardo Otubo
2013-12-04 14:46                       ` Corey Bryant
2013-12-05 13:15                       ` Stefan Hajnoczi [this message]
2013-12-05 16:12                         ` Will Drewry
2013-12-06  9:13                           ` Stefan Hajnoczi
2013-12-06 15:40                             ` Will Drewry
2013-12-07  8:13                               ` Stefan Hajnoczi
2013-11-22 10:34       ` Stefan Hajnoczi
2013-11-22 14:38         ` Paul Moore
2013-12-04 13:17           ` Eduardo Otubo

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=20131205131501.GB6385@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=anthony@codemonkey.ws \
    --cc=coreyb@linux.vnet.ibm.com \
    --cc=otubo@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=pmoore@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wad@chromium.org \
    /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).