qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sam <batmanustc@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [QGA] Bug of qga?
Date: Tue, 29 Aug 2017 13:52:47 +0800	[thread overview]
Message-ID: <CAOE=1Z2cbY+vEpM32a1b6oGMa6Ogo==DtTY8mGV_8ncV+UduuQ@mail.gmail.com> (raw)
In-Reply-To: <CAOE=1Z1GxtF-V8tnqpPKVNiJSyD2+yT9+u48c=V855qtwnUxoQ@mail.gmail.com>

I could repeat this several times, I think it's mis-order of qmp in qga
socket.

2017-08-25 11:09 GMT+08:00 Sam <batmanustc@gmail.com>:

> Also I found:
>
> when I use `socat` to take a qga socket, then I use `socat` to communicate
> it will got error.
> But also SOMETIMES, I will not got error and will communicate OK.
>
> If one user take qga socket, another user should got error, is it? But why
> sometimes, the communicate is OK?
>
> 2017-08-25 10:11 GMT+08:00 Sam <batmanustc@gmail.com>:
>
>> Hi all,
>>
>> I'm using qga to send `route -n` and `ping` command to guest. But I found
>> SOMETIMES, the second `ping` command's result is the same as `route -n`
>> command.
>>
>> So I guess is there some cache mechanism of qga command result? So when I
>> send the second command, and receive from qga socket, I receive the result
>> of first command.
>>
>> Or is this bug happened because of I use async mechanism of python code
>> to operate qga socket?
>>
>> This is the python code I use to operate on this qga socket:
>>
>> try:
>>>         sock=socket(AF_UNIX, SOCK_STREAM)
>>>         sock.settimeout(20)
>>>         sock.connect(vm_qga_sockpath)
>>>         sock.send(cmd)
>>>         while True:
>>>             res = sock.recv(1024)
>>>             if len(res):
>>>                 break
>>>     except Exception as e:
>>>         res = -1
>>>     finally:
>>>         sock.settimeout(None)
>>>         sock.close()
>>
>>
>

  reply	other threads:[~2017-08-29  5:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25  2:11 [Qemu-devel] [QGA] Bug of qga? Sam
2017-08-25  3:09 ` Sam
2017-08-29  5:52   ` Sam [this message]
2017-08-29  6:19     ` Sam
2017-08-29  9:04       ` Sameeh Jubran
2017-08-30  6:20         ` Sam
2017-08-30  6:22           ` Sam
2017-09-12 14:59             ` Sameeh Jubran

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='CAOE=1Z2cbY+vEpM32a1b6oGMa6Ogo==DtTY8mGV_8ncV+UduuQ@mail.gmail.com' \
    --to=batmanustc@gmail.com \
    --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).