From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC9Nc-0003uQ-Dy for qemu-devel@nongnu.org; Wed, 30 Nov 2016 13:13:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC9NX-00063v-Gl for qemu-devel@nongnu.org; Wed, 30 Nov 2016 13:13:16 -0500 Received: from mail-wj0-f172.google.com ([209.85.210.172]:33238) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cC9NX-00063O-2r for qemu-devel@nongnu.org; Wed, 30 Nov 2016 13:13:11 -0500 Received: by mail-wj0-f172.google.com with SMTP id xy5so183116552wjc.0 for ; Wed, 30 Nov 2016 10:13:10 -0800 (PST) References: <87twapmozq.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> <871sxsucto.fsf@linaro.org> <5fa51076-c0fe-4fcc-4ae0-e9064ef0e22d@twiddle.net> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <5fa51076-c0fe-4fcc-4ae0-e9064ef0e22d@twiddle.net> Date: Wed, 30 Nov 2016 18:12:07 +0000 Message-ID: <87zikgsuq0.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] Confusion regarding temporaries with branch conditional List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Nikunj A Dadhania , qemu-devel@nongnu.org Richard Henderson writes: > On 11/30/2016 08:55 AM, Alex Bennée wrote: >> >> Nikunj A Dadhania writes: >> >>> Hi, >>> >>> I was writing one instruction and hit following issue: >>> >>> [snip]/qemu/tcg/tcg.c:2039: tcg fatal error >>> qemu-ppc64le: [snip]/qemu/translate-all.c:175: tb_lock: Assertion `!have_tb_lock' failed. >>> Segmentation fault (core dumped) >> >> This is confusing because something is trying to take the tb_lock while >> you are in code generation. tb_lock is held for code generation to >> ensure serialisation of generation. > > Yes, I've seen this myself. I never got around to reporting the "problem" > properly. It's a confusing side effect of a SIGSEGV arriving during tcg code > generation. The signal handler longjmps back with unexpected locks > held. So this is a SEGV which belongs to the translation code rather than the guest? There are places in the cpu loop where we exit that should reset the locks on a restart - see tb_lock_reset() so I'm not quite sure what has happened here. > > Probably we should simply crash earlier and less confusingly. > > > r~ -- Alex Bennée