qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: gengdongjiu <gengdongjiu@huawei.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	mst@redhat.com,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	Ingo Molnar <mingo@redhat.com>,
	Wuquanming <wuquanming@huawei.com>,
	Huangshaoyu <huangshaoyu@huawei.com>
Subject: Re: [Qemu-devel] [question] mask SIGBUS in qemu main thread
Date: Mon, 20 Nov 2017 12:50:28 +0000	[thread overview]
Message-ID: <878tf1xgff.fsf@linaro.org> (raw)
In-Reply-To: <8726068c-1112-eaea-5315-ec17ae37ae33@huawei.com>


gengdongjiu <gengdongjiu@huawei.com> writes:

> Hi all,
>   sorry to disturb you, I have a question to consult with you why the SIGBUS mask bit is set in the Qemu main thread?
> do we not want to Qemu main thread to handle the SIGBUS signal?
>   thanks.

What exactly do you expect the main thread to do with a SIGBUS signal?

If QEMU doesn't catch the SIGBUS it will be up to the kernel to deal
with it, probably by terminating QEMU. This is fine because this is a
bug in QEMU that shouldn't have occurred.

This is different from dealing with SIGBUS due to the guests action
which might occur in the various vCPU threads.

> As shown in [1], the Qemu main thread PID is 30976.
> "cat /proc/30976/status" in [2], we can see the "SigBlk: 0000000010002240", SIGBUS block bit is 7, so the SIGBUS block bit is set.
> then the Qemu main thread will not be woken up if there is SIGBUS set to it.
> thanks!
>
>
> [1]:
> # ps -eL | grep "qemu"
> 30976 30976 pts/7    00:00:00 qemu-system-x86
> 30976 30977 pts/7    00:00:00 qemu-system-x86
>
> [2]
> # cat /proc/30976/status
> Name:   qemu-system-x86
> State:  S (sleeping)
> Tgid:   30976
> Ngid:   0
> Pid:    30976
> PPid:   34807
> TracerPid:      0
> Uid:    1000    1000    1000    1000
> Gid:    1000    1000    1000    1000
> FDSize: 256
> Groups: 4 24 27 30 46 108 114 115 1000
> NStgid: 30976
> NSpid:  30976
> NSpgid: 30976
> NSsid:  34772
> VmPeak:   604260 kB
> VmSize:   538724 kB
> VmLck:         0 kB
> VmPin:         0 kB
> VmHWM:     34176 kB
> VmRSS:     34176 kB
> VmData:   294308 kB
> VmStk:       136 kB
> VmExe:      4808 kB
> VmLib:     36144 kB
> VmPTE:       528 kB
> VmPMD:        16 kB
> VmSwap:        0 kB
> HugetlbPages:          0 kB
> Threads:        2
> SigQ:   6/514067
> SigPnd: 0000000000000000
> ShdPnd: 0000000000000000
> SigBlk: 0000000010002240
> SigIgn: 0000000000001000
> SigCgt: 0000000180004243
> CapInh: 0000000000000000
> CapPrm: 0000000000000000
> CapEff: 0000000000000000
> CapBnd: 0000003fffffffff
> CapAmb: 0000000000000000
> Seccomp:        0
> Cpus_allowed:   ffff,ffffffff
> Cpus_allowed_list:      0-47
> Mems_allowed:   00000000,00000003
> Mems_allowed_list:      0-1
> voluntary_ctxt_switches:        7638
> nonvoluntary_ctxt_switches:     3


--
Alex Bennée

  reply	other threads:[~2017-11-20 12:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-20 12:32 [Qemu-devel] [question] mask SIGBUS in qemu main thread gengdongjiu
2017-11-20 12:50 ` Alex Bennée [this message]
2017-11-20 13:00   ` Peter Maydell
2017-11-20 13:32     ` gengdongjiu
2017-11-20 14:23     ` Alex Bennée
2017-11-20 14:33       ` Peter Maydell

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=878tf1xgff.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=gengdongjiu@huawei.com \
    --cc=huangshaoyu@huawei.com \
    --cc=mingo@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wuquanming@huawei.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).