* [Qemu-devel] Preconfig state reachable without --preconfig given
@ 2018-06-01 13:28 Max Reitz
2018-06-01 13:44 ` Max Reitz
2018-06-02 10:46 ` Michal Privoznik
0 siblings, 2 replies; 10+ messages in thread
From: Max Reitz @ 2018-06-01 13:28 UTC (permalink / raw)
To: Igor Mammedov, qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 592 bytes --]
Hi,
The @preconfig RunState documentation states:
> The state is reachable only if the --preconfig CLI option is used.
However, this is not true:
$ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio
QEMU 2.12.50 monitor - type 'help' for more information
(qemu)
HMP not available in preconfig state, use QMP instead
On IRC, Daniel proposed doing the runstate transition immediately after
the command line has been read and no --preconfig option has been found.
Doing that indeed fixes the issue for me (but I don't know whether
that's the best solution).
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-01 13:28 [Qemu-devel] Preconfig state reachable without --preconfig given Max Reitz @ 2018-06-01 13:44 ` Max Reitz 2018-06-02 10:46 ` Michal Privoznik 1 sibling, 0 replies; 10+ messages in thread From: Max Reitz @ 2018-06-01 13:44 UTC (permalink / raw) To: Igor Mammedov, qemu-devel@nongnu.org [-- Attachment #1: Type: text/plain, Size: 1532 bytes --] On 2018-06-01 15:28, Max Reitz wrote: > Hi, > > The @preconfig RunState documentation states: > >> The state is reachable only if the --preconfig CLI option is used. > > However, this is not true: > > $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio > QEMU 2.12.50 monitor - type 'help' for more information > (qemu) > HMP not available in preconfig state, use QMP instead Another issue that has been introduced by commit 047f7038f586d2150f16c6d9ba9cfd0479f0f6ac is this: $ echo quit | x86_64-softmmu/qemu-system-x86_64 \ -drive file=/dev/null,if=ide,readonly=on -monitor stdio QEMU 2.12.50 monitor - type 'help' for more information (qemu) qqemu-system-x86_64: Initialization of device ide-hd failed: Block node is read-only Or: $ echo foo | x86_64-softmmu/qemu-system-x86_64 \ -drive file=/dev/null,if=ide,readonly=on -monitor stdio QEMU 2.12.50 monitor - type 'help' for more information (qemu) fqemu-system-x86_64: Initialization of device ide-hd failed: Block node is read-only So the first character of the next command is printed before the error message. First, this is a change in behavior, and secondly, it seems weird that the monitor accepts a single character before the command line is fully interpreted. (I suspect this is also the reason why the "HMP not available..." message does not appear when you actually execute any command, because processing anything more than a single character is held off until after the runstate transition.) Max [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-01 13:28 [Qemu-devel] Preconfig state reachable without --preconfig given Max Reitz 2018-06-01 13:44 ` Max Reitz @ 2018-06-02 10:46 ` Michal Privoznik 2018-06-04 9:46 ` Max Reitz 2018-06-04 14:04 ` Max Reitz 1 sibling, 2 replies; 10+ messages in thread From: Michal Privoznik @ 2018-06-02 10:46 UTC (permalink / raw) To: Max Reitz, Igor Mammedov, qemu-devel@nongnu.org On 06/01/2018 03:28 PM, Max Reitz wrote: > Hi, > > The @preconfig RunState documentation states: > >> The state is reachable only if the --preconfig CLI option is used. > > However, this is not true: > > $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio > QEMU 2.12.50 monitor - type 'help' for more information > (qemu) > HMP not available in preconfig state, use QMP instead Not sure if this is the same bug, but I've noticed libvirt having troubles detecting capabilities of qemu and debugging lead to this patch: http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00367.html (which by no means I claim is proper solution. It might be viewed as workaround by expert qemu devels) > > On IRC, Daniel proposed doing the runstate transition immediately after > the command line has been read and no --preconfig option has been found. > Doing that indeed fixes the issue for me (but I don't know whether > that's the best solution). Oh has he? I can't find it anywhere. Michal ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-02 10:46 ` Michal Privoznik @ 2018-06-04 9:46 ` Max Reitz 2018-06-04 12:05 ` Igor Mammedov 2018-06-04 14:04 ` Max Reitz 1 sibling, 1 reply; 10+ messages in thread From: Max Reitz @ 2018-06-04 9:46 UTC (permalink / raw) To: Michal Privoznik, Igor Mammedov, qemu-devel@nongnu.org [-- Attachment #1: Type: text/plain, Size: 1526 bytes --] On 2018-06-02 12:46, Michal Privoznik wrote: > On 06/01/2018 03:28 PM, Max Reitz wrote: >> Hi, >> >> The @preconfig RunState documentation states: >> >>> The state is reachable only if the --preconfig CLI option is used. >> >> However, this is not true: >> >> $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio >> QEMU 2.12.50 monitor - type 'help' for more information >> (qemu) >> HMP not available in preconfig state, use QMP instead > > Not sure if this is the same bug, but I've noticed libvirt having > troubles detecting capabilities of qemu and debugging lead to this patch: > > http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00367.html > > (which by no means I claim is proper solution. It might be viewed as > workaround by expert qemu devels) Well, it'd fix both of my issues, so it has that going for it. :-) >> On IRC, Daniel proposed doing the runstate transition immediately after >> the command line has been read and no --preconfig option has been found. >> Doing that indeed fixes the issue for me (but I don't know whether >> that's the best solution). > > Oh has he? I can't find it anywhere. That was in #qemu on OFTC: [Friday, June 1 2018] [15:21:26 CEST] <danpb> if we've not passed --preconfig though, we should not be in PRECONFIG state in the first place IMHO [Friday, June 1 2018] [15:22:27 CEST] <danpb> eg vl.c should set the state to RUN_STATE_PRELAUNCH immediately after parsing CLI args if --preconfig wasn't given Max [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-04 9:46 ` Max Reitz @ 2018-06-04 12:05 ` Igor Mammedov 2018-06-05 11:35 ` Dr. David Alan Gilbert 0 siblings, 1 reply; 10+ messages in thread From: Igor Mammedov @ 2018-06-04 12:05 UTC (permalink / raw) To: Max Reitz; +Cc: Michal Privoznik, qemu-devel@nongnu.org On Mon, 4 Jun 2018 11:46:06 +0200 Max Reitz <mreitz@redhat.com> wrote: > On 2018-06-02 12:46, Michal Privoznik wrote: > > On 06/01/2018 03:28 PM, Max Reitz wrote: > >> Hi, > >> > >> The @preconfig RunState documentation states: > >> > >>> The state is reachable only if the --preconfig CLI option is used. > >> > >> However, this is not true: > >> > >> $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio > >> QEMU 2.12.50 monitor - type 'help' for more information > >> (qemu) > >> HMP not available in preconfig state, use QMP instead > > > > Not sure if this is the same bug, but I've noticed libvirt having > > troubles detecting capabilities of qemu and debugging lead to this patch: > > > > http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00367.html > > > > (which by no means I claim is proper solution. It might be viewed as > > workaround by expert qemu devels) > > Well, it'd fix both of my issues, so it has that going for it. :-) Acked patch. Markus also suggested to drop HMP monitor altogether at this first loop, I'll look into it some more taking in account demonize() issue. > > >> On IRC, Daniel proposed doing the runstate transition immediately after > >> the command line has been read and no --preconfig option has been found. > >> Doing that indeed fixes the issue for me (but I don't know whether > >> that's the best solution). > > > > Oh has he? I can't find it anywhere. > > That was in #qemu on OFTC: > > [Friday, June 1 2018] [15:21:26 CEST] <danpb> if we've not passed > --preconfig though, we should not be in PRECONFIG state in the first > place IMHO > [Friday, June 1 2018] [15:22:27 CEST] <danpb> eg vl.c should set the > state to RUN_STATE_PRELAUNCH immediately after parsing CLI args if > --preconfig wasn't given That's not how it should be, PRECONFIG is there to replace PRELAUNCH at early stages (which commit 8a36283e12 message states) /me is to blame for miss-leading doc comment/ > Max > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-04 12:05 ` Igor Mammedov @ 2018-06-05 11:35 ` Dr. David Alan Gilbert 0 siblings, 0 replies; 10+ messages in thread From: Dr. David Alan Gilbert @ 2018-06-05 11:35 UTC (permalink / raw) To: Igor Mammedov; +Cc: Max Reitz, Michal Privoznik, qemu-devel@nongnu.org * Igor Mammedov (imammedo@redhat.com) wrote: > On Mon, 4 Jun 2018 11:46:06 +0200 > Max Reitz <mreitz@redhat.com> wrote: > > > On 2018-06-02 12:46, Michal Privoznik wrote: > > > On 06/01/2018 03:28 PM, Max Reitz wrote: > > >> Hi, > > >> > > >> The @preconfig RunState documentation states: > > >> > > >>> The state is reachable only if the --preconfig CLI option is used. > > >> > > >> However, this is not true: > > >> > > >> $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio > > >> QEMU 2.12.50 monitor - type 'help' for more information > > >> (qemu) > > >> HMP not available in preconfig state, use QMP instead > > > > > > Not sure if this is the same bug, but I've noticed libvirt having > > > troubles detecting capabilities of qemu and debugging lead to this patch: > > > > > > http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00367.html > > > > > > (which by no means I claim is proper solution. It might be viewed as > > > workaround by expert qemu devels) > > > > Well, it'd fix both of my issues, so it has that going for it. :-) > Acked patch. > > Markus also suggested to drop HMP monitor altogether at this first loop, > I'll look into it some more taking in account demonize() issue. I've got a patchset I'm just tidying which makes HMP work properly with preconfig, i.e it allows a subset of commands. Dave > > > > >> On IRC, Daniel proposed doing the runstate transition immediately after > > >> the command line has been read and no --preconfig option has been found. > > >> Doing that indeed fixes the issue for me (but I don't know whether > > >> that's the best solution). > > > > > > Oh has he? I can't find it anywhere. > > > > That was in #qemu on OFTC: > > > > [Friday, June 1 2018] [15:21:26 CEST] <danpb> if we've not passed > > --preconfig though, we should not be in PRECONFIG state in the first > > place IMHO > > [Friday, June 1 2018] [15:22:27 CEST] <danpb> eg vl.c should set the > > state to RUN_STATE_PRELAUNCH immediately after parsing CLI args if > > --preconfig wasn't given > That's not how it should be, PRECONFIG is there to replace PRELAUNCH > at early stages (which commit 8a36283e12 message states) > /me is to blame for miss-leading doc comment/ > > > Max > > > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-02 10:46 ` Michal Privoznik 2018-06-04 9:46 ` Max Reitz @ 2018-06-04 14:04 ` Max Reitz 2018-06-04 20:24 ` Igor Mammedov 1 sibling, 1 reply; 10+ messages in thread From: Max Reitz @ 2018-06-04 14:04 UTC (permalink / raw) To: Michal Privoznik, Igor Mammedov, qemu-devel@nongnu.org [-- Attachment #1: Type: text/plain, Size: 1116 bytes --] On 2018-06-02 12:46, Michal Privoznik wrote: > On 06/01/2018 03:28 PM, Max Reitz wrote: >> Hi, >> >> The @preconfig RunState documentation states: >> >>> The state is reachable only if the --preconfig CLI option is used. >> >> However, this is not true: >> >> $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio >> QEMU 2.12.50 monitor - type 'help' for more information >> (qemu) >> HMP not available in preconfig state, use QMP instead > > Not sure if this is the same bug, but I've noticed libvirt having > troubles detecting capabilities of qemu and debugging lead to this patch: > > http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00367.html > > (which by no means I claim is proper solution. It might be viewed as > workaround by expert qemu devels) I haven't investigated further, but that patch breaks iotest 091 (which tests migration). It just stops now after the migration has started, so it never completes. Actually, it seems to break all migration iotests (but 203, which migrates to /dev/null), so I suspect it breaks migration as a whole. Max [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-04 14:04 ` Max Reitz @ 2018-06-04 20:24 ` Igor Mammedov 2018-06-06 10:35 ` Max Reitz 0 siblings, 1 reply; 10+ messages in thread From: Igor Mammedov @ 2018-06-04 20:24 UTC (permalink / raw) To: Max Reitz; +Cc: Michal Privoznik, qemu-devel@nongnu.org On Mon, 4 Jun 2018 16:04:33 +0200 Max Reitz <mreitz@redhat.com> wrote: > On 2018-06-02 12:46, Michal Privoznik wrote: > > On 06/01/2018 03:28 PM, Max Reitz wrote: > >> Hi, > >> > >> The @preconfig RunState documentation states: > >> > >>> The state is reachable only if the --preconfig CLI option is used. > >> > >> However, this is not true: > >> > >> $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio > >> QEMU 2.12.50 monitor - type 'help' for more information > >> (qemu) > >> HMP not available in preconfig state, use QMP instead > > > > Not sure if this is the same bug, but I've noticed libvirt having > > troubles detecting capabilities of qemu and debugging lead to this patch: > > > > http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00367.html > > > > (which by no means I claim is proper solution. It might be viewed as > > workaround by expert qemu devels) > > I haven't investigated further, but that patch breaks iotest 091 (which > tests migration). It just stops now after the migration has started, so > it never completes. > > Actually, it seems to break all migration iotests (but 203, which > migrates to /dev/null), so I suspect it breaks migration as a whole. Manual migration to file and restore from it, was tested manually and worked fine, migration-test from 'make check' is ok as well. It's probably due broken to "echo foo | $QEMU" There is another issue with -nodefaults option leading to indefinite timeout even if --preconfig wasn't used. I've just posted fix for that so that it won't be masked out by Michal/Daniel's fix. But I've run iotests and -nodefaults fix doesn't affect outcome of the tests (the same 4 failures). > > Max > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-04 20:24 ` Igor Mammedov @ 2018-06-06 10:35 ` Max Reitz 2018-06-06 11:00 ` Igor Mammedov 0 siblings, 1 reply; 10+ messages in thread From: Max Reitz @ 2018-06-06 10:35 UTC (permalink / raw) To: Igor Mammedov; +Cc: Michal Privoznik, qemu-devel@nongnu.org [-- Attachment #1: Type: text/plain, Size: 1997 bytes --] On 2018-06-04 22:24, Igor Mammedov wrote: > On Mon, 4 Jun 2018 16:04:33 +0200 > Max Reitz <mreitz@redhat.com> wrote: > >> On 2018-06-02 12:46, Michal Privoznik wrote: >>> On 06/01/2018 03:28 PM, Max Reitz wrote: >>>> Hi, >>>> >>>> The @preconfig RunState documentation states: >>>> >>>>> The state is reachable only if the --preconfig CLI option is used. >>>> >>>> However, this is not true: >>>> >>>> $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio >>>> QEMU 2.12.50 monitor - type 'help' for more information >>>> (qemu) >>>> HMP not available in preconfig state, use QMP instead >>> >>> Not sure if this is the same bug, but I've noticed libvirt having >>> troubles detecting capabilities of qemu and debugging lead to this patch: >>> >>> http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00367.html >>> >>> (which by no means I claim is proper solution. It might be viewed as >>> workaround by expert qemu devels) >> >> I haven't investigated further, but that patch breaks iotest 091 (which >> tests migration). It just stops now after the migration has started, so >> it never completes. >> >> Actually, it seems to break all migration iotests (but 203, which >> migrates to /dev/null), so I suspect it breaks migration as a whole. > Manual migration to file and restore from it, was tested manually and > worked fine, migration-test from 'make check' is ok as well. > It's probably due broken to "echo foo | $QEMU" I highly doubt that, because four of the failing migration iotests are written in Python and thus use QMP. (169, 194, 196, 199) They work on master, but fail after that patch. Max > There is another issue with -nodefaults option leading to indefinite > timeout even if --preconfig wasn't used. I've just posted fix for that > so that it won't be masked out by Michal/Daniel's fix. > But I've run iotests and -nodefaults fix doesn't affect outcome of the > tests (the same 4 failures). [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] Preconfig state reachable without --preconfig given 2018-06-06 10:35 ` Max Reitz @ 2018-06-06 11:00 ` Igor Mammedov 0 siblings, 0 replies; 10+ messages in thread From: Igor Mammedov @ 2018-06-06 11:00 UTC (permalink / raw) To: Max Reitz; +Cc: Michal Privoznik, qemu-devel@nongnu.org On Wed, 6 Jun 2018 12:35:07 +0200 Max Reitz <mreitz@redhat.com> wrote: > On 2018-06-04 22:24, Igor Mammedov wrote: > > On Mon, 4 Jun 2018 16:04:33 +0200 > > Max Reitz <mreitz@redhat.com> wrote: > > > >> On 2018-06-02 12:46, Michal Privoznik wrote: > >>> On 06/01/2018 03:28 PM, Max Reitz wrote: > >>>> Hi, > >>>> > >>>> The @preconfig RunState documentation states: > >>>> > >>>>> The state is reachable only if the --preconfig CLI option is used. > >>>> > >>>> However, this is not true: > >>>> > >>>> $ echo | x86_64-softmmu/qemu-system-x86_64 -monitor stdio > >>>> QEMU 2.12.50 monitor - type 'help' for more information > >>>> (qemu) > >>>> HMP not available in preconfig state, use QMP instead > >>> > >>> Not sure if this is the same bug, but I've noticed libvirt having > >>> troubles detecting capabilities of qemu and debugging lead to this patch: > >>> > >>> http://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg00367.html > >>> > >>> (which by no means I claim is proper solution. It might be viewed as > >>> workaround by expert qemu devels) > >> > >> I haven't investigated further, but that patch breaks iotest 091 (which > >> tests migration). It just stops now after the migration has started, so > >> it never completes. > >> > >> Actually, it seems to break all migration iotests (but 203, which > >> migrates to /dev/null), so I suspect it breaks migration as a whole. > > Manual migration to file and restore from it, was tested manually and > > worked fine, migration-test from 'make check' is ok as well. > > It's probably due broken to "echo foo | $QEMU" > > I highly doubt that, because four of the failing migration iotests are > written in Python and thus use QMP. (169, 194, 196, 199) > > They work on master, but fail after that patch. Indeed, this patch breaks migration. There is fixed version on list [CCed] [PATCH v3 1/2] cli: Don't run early event loop if no --preconfig was specified that passes all iotests, some of tests I had to run several times due to transient failures not related to the topic (some timing issues) > > Max > > > There is another issue with -nodefaults option leading to indefinite > > timeout even if --preconfig wasn't used. I've just posted fix for that > > so that it won't be masked out by Michal/Daniel's fix. > > But I've run iotests and -nodefaults fix doesn't affect outcome of the > > tests (the same 4 failures). > ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-06-06 11:00 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-06-01 13:28 [Qemu-devel] Preconfig state reachable without --preconfig given Max Reitz 2018-06-01 13:44 ` Max Reitz 2018-06-02 10:46 ` Michal Privoznik 2018-06-04 9:46 ` Max Reitz 2018-06-04 12:05 ` Igor Mammedov 2018-06-05 11:35 ` Dr. David Alan Gilbert 2018-06-04 14:04 ` Max Reitz 2018-06-04 20:24 ` Igor Mammedov 2018-06-06 10:35 ` Max Reitz 2018-06-06 11:00 ` Igor Mammedov
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).