From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e1wJv-00089T-Cb for qemu-devel@nongnu.org; Tue, 10 Oct 2017 11:19:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e1wJm-0006sS-0F for qemu-devel@nongnu.org; Tue, 10 Oct 2017 11:19:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55016) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e1wJl-0006qv-Pz for qemu-devel@nongnu.org; Tue, 10 Oct 2017 11:19:37 -0400 References: <88c14424-9813-5e68-0aa7-38f3cde0a491@tuxfamily.org> <8ae225f4-b3b8-b09d-03ed-9e8b38a051a5@denx.de> <53ae3fc6-90ea-a154-752d-fe50b3d01642@tuxfamily.org> From: Paolo Bonzini Message-ID: Date: Tue, 10 Oct 2017 17:19:33 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] qemu-system-nios2 hangs when emulator is quit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marek Vasut , Thomas Huth , Chris Wulff Cc: Richard Henderson , QEMU Developers On 10/10/2017 10:58, Marek Vasut wrote: >> #0 0x00007ffff7931945 in pthread_cond_wait@@GLIBC_2.3.2 () at /lib64/libpthread.so.0 >> #1 0x00005555557cf9c5 in qemu_cond_wait (cond=cond@entry=0x555555b5f9c0 , mutex=mutex@entry=0x555555b5fa40 ) at util/qemu-thread-posix.c:161 >> #2 0x0000555555606ee8 in pause_all_vcpus () at cpus.c:1620 >> #3 0x00005555555cc43a in main (argc=, argv=, envp=) >> at vl.c:4906 >> >> Looks like the CPU does not get stopped right? Unfortunately, I've got no >> good clue how to debug that further right now... > I'd look at pause_all_vcpus() and check why it is stuck. > I'm a bit overloaded at the moment, so I don't have time to dig in it. > It's actually the CPU thread that is stuck because the start-of-translation-block test is wrong and never succeeds: 0x7fd715fff0c0: mov -0x14(%rsp),%ebp 0x7fd715fff0c4: test %ebp,%ebp 0x7fd715fff0c6: jl 0x7fd715fff0e4 It should be using %r14, not %rsp. I've sent a patch. Paolo