[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [question] mask SIGBUS in qemu main thread
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [question] mask SIGBUS in qemu main thread |
Date: |
Mon, 20 Nov 2017 12:50:28 +0000 |
User-agent: |
mu4e 1.0-alpha2; emacs 26.0.90 |
gengdongjiu <address@hidden> 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