From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euOMH-0005f5-MX for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:11:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euOMG-0008NK-E8 for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:11:17 -0500 Received: from mail-oi0-x243.google.com ([2607:f8b0:4003:c06::243]:35850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euOMG-0008N5-4q for qemu-devel@nongnu.org; Fri, 09 Mar 2018 15:11:16 -0500 Received: by mail-oi0-x243.google.com with SMTP id u73so7887616oie.3 for ; Fri, 09 Mar 2018 12:11:16 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: From: Michael Clark Date: Sat, 10 Mar 2018 09:11:14 +1300 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [patches] Re: [PULL] RISC-V QEMU Port Submission v8.2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Palmer Dabbelt , Bastian Koppelmann , QEMU Developers , RISC-V Patches , Sagar Karandikar On Sat, Mar 10, 2018 at 5:49 AM, Peter Maydell wrote: > On 9 March 2018 at 14:28, Peter Maydell wrote: > > NB: there was a test failure on OpenBSD host: > > > > TEST: tests/qom-test... (pid=64016) > > /riscv32/qom/spike_v1.9.1: ** > > ERROR:/home/qemu/tests/qom-test.c:64:test_properties: assertion > > failed: (qdict_haskey(response, "return")) > > FAIL > > > > but this seems to have been intermittent -- it was only on that one > > host, and I reran the test suite there and it passed fine the second > > time. So it may be nothing to do with your code; we'll see if it > > comes up again. > > On a later test run I got this different one; openbsd again: > > TEST: tests/test-hmp... (pid=45236) > /riscv32/hmp/spike_v1.9.1: ** > ERROR:/home/qemu/qom/object.c:488:object_new_with_type: assertion > failed: (type != NULL) > Broken pipe > FAIL > > My current best theory is that OpenBSD libc's memory allocator > happens to be more sensitive to a memory corruption bug in the risc > code, resulting in intermittent failures if the allocations happen > to come out the wrong way. You do have at least one invalid-write > off the end of a block according to valgrind: > > ==17441== Invalid write of size 1 > ==17441== at 0x26517F: riscv_isa_string (cpu.c:399) > ==17441== by 0x25C14D: create_fdt (spike.c:125) > ==17441== by 0x25C14D: spike_v1_10_0_board_init (spike.c:199) > ==17441== by 0x2CCE0A: machine_run_board_init (machine.c:807) > ==17441== by 0x1BFF28: main (vl.c:4597) > ==17441== Address 0x3055c425 is 0 bytes after a block of size 5 alloc'd > ==17441== at 0x4C2FB55: calloc (in > /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > ==17441== by 0x70C8770: g_malloc0 (in > /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.2) > ==17441== by 0x26511E: riscv_isa_string (cpu.c:395) > ==17441== by 0x25C14D: create_fdt (spike.c:125) > ==17441== by 0x25C14D: spike_v1_10_0_board_init (spike.c:199) > ==17441== by 0x2CCE0A: machine_run_board_init (machine.c:807) > ==17441== by 0x1BFF28: main (vl.c:4597) > > If you can prioritise a patch that fixes the bug in riscv_isa_string() > I'll apply that and hopefully these intermittent failures will go away. > I'm looking at this right now.