qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Eric Blake <eblake@redhat.com>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL 00/38] QAPI patches for 2018-03-12, 2.12 softfreeze
Date: Mon, 19 Mar 2018 17:26:18 +0800	[thread overview]
Message-ID: <20180319092618.GF2477@xz-mi> (raw)
In-Reply-To: <CAFEAcA85KuXQ7afcAQWJcBeh6ghpnxnGnZWDph51XgQhxPNN4Q@mail.gmail.com>

On Sat, Mar 17, 2018 at 12:10:35PM +0000, Peter Maydell wrote:
> On 16 March 2018 at 14:04, Eric Blake <eblake@redhat.com> wrote:
> > The following changes since commit 3788c7b6e56fa34ee2a73e41706eb2a2447ba75a:
> >
> >   Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2018-03-16 11:05:03 +0000)
> >
> > are available in the Git repository at:
> >
> >   git://repo.or.cz/qemu/ericb.git tags/pull-qapi-2018-03-12-v2
> >
> > for you to fetch changes up to 75eb57e3ed3682f011a6694863044e8b143a9821:
> >
> >   qapi: Pass '-u' when doing non-silent diff (2018-03-16 09:00:07 -0500)
> >
> > v2: rebase on Paolo's queue (should fix tests that failed on v1),
> > fix rebase conflicts, add two more related patches
> > Sending only the changed patches from v1
> >
> > ----------------------------------------------------------------
> > qapi patches for 2018-03-12, 2.12 softfreeze
> >
> > - Marc-André Lureau: 0/4 qapi: generate a literal qobject for introspection
> > - Max Reitz: 0/7 block: Handle null backing link
> > - Daniel P. Berrange: chardev: tcp: postpone TLS work until machine done
> > - Peter Xu: 00/23 QMP: out-of-band (OOB) execution support
> > - Vladimir Sementsov-Ogievskiy: 0/2 block latency histogram
> > - Eric Blake: qapi: Pass '-u' when doing non-silent diff
> >
> > ----------------------------------------------------------------
> 
> Hi. I get a bunch of test assertion failures with this:
> 
> ppc64 host:
> 
> QTEST_QEMU_BINARY=nios2-softmmu/qemu-system-nios2
> QTEST_QEMU_IMG=qemu-img MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((
> ${RANDOM:-0} % 255 + 1)
> )} gtester -k --verbose -m=quick  tests/qmp-test
> tests/device-introspect-test tests/qom-test tests/test-hmp
> TEST: tests/qmp-test... (pid=49431)
>   /nios2/qmp/protocol:                                                 OK
>   /nios2/qmp/oob:                                                      OK
>   /nios2/qmp/query-status:                                             OK
>   /nios2/qmp/query-block:                                              OK
>   /nios2/qmp/query-blockstats:                                         OK
>   /nios2/qmp/query-block-jobs:                                         OK
>   /nios2/qmp/query-named-block-nodes:
> qemu-system-nios2: /home/pm215/qemu/chardev/char-io.c:91: io_watc
> h_poll_finalize: Assertion `iwp->src == ((void *)0)' failed.
> Broken pipe
> FAIL
> 
> FreeBSD host:
> 
> TEST: tests/qmp-test... (pid=68428)
>   /aarch64/qmp/protocol:                                               OK
>   /aarch64/qmp/oob:                                                    OK
> [...]
>   /aarch64/qmp/query-iothreads:
> Assertion failed: (iwp->src == NULL), function io_watch_poll_finalize,
> file /root/qemu/chardev/char-io.c, line 91.
> Broken pipe
> FAIL
> GTester: last random seed: R02S60296bacb6aea7a3d748811fc486c71e
> (pid=68462)
> 
> OpenBSD host:
>   /cris/qmp/qom-list-types:
> assertion "iwp->src == NULL" failed: file "/home/qemu/chardev/cha
> r-io.c", line 91, function "io_watch_poll_finalize"
> Broken pipe
> FAIL
> 
> 
> NetBSD host:
> 
> TEST: tests/tpm-crb-test... (pid=21337)
>   /i386/tpm-crb/test:                                                  OK
> Unexpected error in qio_channel_socket_readv() at
> /root/qemu/io/channel-socket.c:494:
> FAIL: tests/tpm-crb-test
> TEST: tests/tpm-tis-test... (pid=14763)
>   /i386/tpm-tis/test_check_localities:                                 OK
>   /i386/tpm-tis/test_check_access_reg:                                 OK
>   /i386/tpm-tis/test_check_access_reg_seize:                           OK
>   /i386/tpm-tis/test_check_access_reg_release:                         OK
>   /i386/tpm-tis/test_check_transmit:                                   OK
> Unexpected error in qio_channel_socket_readv() at
> /root/qemu/io/channel-socket.c:494:
> FAIL: tests/tpm-tis-test
> 
> SPARC host:
> 
>   /cris/qmp/query-memory-size-summary:
> qemu-system-cris: /srv/pm215/qemu/chardev/char-io.c:91: io_watch_
> poll_finalize: Assertion `iwp->src == NULL' failed.
> Broken pipe
> FAIL
> 
> 
> x86/Linux host:
>   /hppa/qmp/query-memdev:
> qemu-system-hppa: /home/petmay01/linaro/qemu-for-merges/chardev/c
> har-io.c:91: io_watch_poll_finalize: Assertion `iwp->src == NULL' failed.
> Broken pipe
> FAIL
> 
> aarch64 host:
> qemu-system-alpha: /home/pm215/qemu/chardev/char-io.c:91:
> io_watch_poll_finalize: Assertion `iwp->src == ((void *)0)' failed.
> 
> One or two of the build hosts did pass, so that plus the varying
> tests which failed suggests that the iwp->src assert is an
> intermittent or timing based one. The tpm error on NetBSD
> is probably a separate issue.

I think I still need this to be squashed into "monitor: allow using IO
thread for parsing", which I dropped during respin from v7 to v8:

diff --git a/monitor.c b/monitor.c
index f9ef3e5266..121194111f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4556,6 +4556,11 @@ void monitor_init(Chardev *chr, int flags)
         qemu_chr_fe_set_echo(&mon->chr, true);
         json_message_parser_init(&mon->qmp.parser, handle_qmp_command);
         if (mon->use_io_thr) {
+            /*
+             * Make sure the old iowatch be gone.  It's possible when
+             * e.g. the chardev is in client mode, with wait=on.
+             */
+            remove_fd_in_watch(chr);
             /*
              * We can't call qemu_chr_fe_set_handlers() directly here
              * since during the procedure the chardev will be active

I thought there should be no pending task on main thread after the QIO
and CHARDEV fixes, but I missed the most general io watch and we still
possibly need the line.

We should fix the assertion problem with above, but not sure about
whether it can fix the QIO issue since I haven't seen that before (and
I can't reproduce that too in my environment).

I hope the fix can work for us.  But in all cases, please feel free to
drop the series if needed.  Sorry for the trouble.

-- 
Peter Xu

  reply	other threads:[~2018-03-19  9:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 14:04 [Qemu-devel] [PULL 00/38] QAPI patches for 2018-03-12, 2.12 softfreeze Eric Blake
2018-03-16 14:04 ` [Qemu-devel] [PULL 07/38] qapi: Replace qobject_to_X(o) by qobject_to(X, o) Eric Blake
2018-03-16 14:04 ` [Qemu-devel] [PULL 12/38] chardev: tcp: postpone TLS work until machine done Eric Blake
2018-03-16 14:04 ` [Qemu-devel] [PULL 27/38] qmp: add new event "command-dropped" Eric Blake
2018-03-16 14:05 ` [Qemu-devel] [PULL 38/38] qapi: Pass '-u' when doing non-silent diff Eric Blake
2018-03-17 12:10 ` [Qemu-devel] [PULL 00/38] QAPI patches for 2018-03-12, 2.12 softfreeze Peter Maydell
2018-03-19  9:26   ` Peter Xu [this message]
2018-03-19 14:57     ` Eric Blake
2018-03-19 15:27       ` Eric Blake
2018-03-20  2:55         ` Peter Xu

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=20180319092618.GF2477@xz-mi \
    --to=peterx@redhat.com \
    --cc=eblake@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).