All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Monitor socket will close after parse command error. Qemu-2.6.2
@ 2017-09-08  3:23 Sam
  2017-09-08  3:32 ` Sam
  0 siblings, 1 reply; 4+ messages in thread
From: Sam @ 2017-09-08  3:23 UTC (permalink / raw)
  To: QEMU Developers

Hi all,

I'm using HMP socket to send command to add netdev, my command like this:

[gangyewei-3@yf-mos-test-net07 tests]$ sudo  python monitor.py 55919
> (qemu):
>  Connected to qemu monitor ...
> on_monitor_open
> ds
> (qemu):
> {'return': ["unknown command: 'ds'"]}
> chardev-add
> socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
> (qemu):
> \{'return': []}
> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
> (qemu):
> {'return': ["unknown command: '\\netdev_add'"]}
> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
> (qemu):
> {'return': []}
> device_add
> virtio-net-pci,netdev=test_intf1,mac=00:22:79:29:d2:6c,id=netdev-test_intf1
> (qemu):
> {'return': []}
> device_del netdev-test_intf1
> (qemu):
> {'return': []}
> netdev_del test_intf1
> (qemu):
> {'return': []}
> chardev-remove char-test_intf1
> (qemu):
> {'return': ["Chardev 'char-test_intf1' is busy"]}
> chardev-remove char-test_intf1
> (qemu):
> {'return': ["Chardev 'char-test_intf1' is busy"]}
> ds
> (qemu):
> {'return': ["unknown command: 'ds'"]}
> chardev-add
> socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
> (qemu):
> {'return': ["Duplicate ID 'char-test_intf1' for chardev", 'Parsing chardev
> args failed']}
> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
> (qemu):
> on_monitor_close
> Disconnect ...
> Bye...
> [gangyewei-3@yf-mos-test-net07 tests]$ telnet 127.0.0.1 55919
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused


the monitor.py is same like telnet, which send command to 127.0.0.1:55919
socket.
At the last 5th line, you could see "on_monitor_close", this is because
server side of 127.0.0.1:55919 socket is down.

I have few questions:
1. Why I got "{'return': ["Chardev 'char-test_intf1' is busy"]}" while
using "chardev-remove char-test_intf1"?
2. Why the server side will close while get "{'return': ["Duplicate ID
'char-test_intf1' for chardev", 'Parsing chardev args failed']}" and then
send same command?

Thank you~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Monitor socket will close after parse command error. Qemu-2.6.2
  2017-09-08  3:23 [Qemu-devel] Monitor socket will close after parse command error. Qemu-2.6.2 Sam
@ 2017-09-08  3:32 ` Sam
  2017-09-08  3:38   ` Sam
  0 siblings, 1 reply; 4+ messages in thread
From: Sam @ 2017-09-08  3:32 UTC (permalink / raw)
  To: QEMU Developers

BTW, same result while using `telnet 127.0.0.1 55919`, which means also
have the two problem in the email before.

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

> Hi all,
>
> I'm using HMP socket to send command to add netdev, my command like this:
>
> [gangyewei-3@yf-mos-test-net07 tests]$ sudo  python monitor.py 55919
>> (qemu):
>>  Connected to qemu monitor ...
>> on_monitor_open
>> ds
>> (qemu):
>> {'return': ["unknown command: 'ds'"]}
>> chardev-add socket,id=char-test_intf1,path=/usr/local/var/run/
>> openvswitch/test_intf1,server=on
>> (qemu):
>> \{'return': []}
>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
>> (qemu):
>> {'return': ["unknown command: '\\netdev_add'"]}
>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
>> (qemu):
>> {'return': []}
>> device_add virtio-net-pci,netdev=test_intf1,mac=00:22:79:29:d2:6c,
>> id=netdev-test_intf1
>> (qemu):
>> {'return': []}
>> device_del netdev-test_intf1
>> (qemu):
>> {'return': []}
>> netdev_del test_intf1
>> (qemu):
>> {'return': []}
>> chardev-remove char-test_intf1
>> (qemu):
>> {'return': ["Chardev 'char-test_intf1' is busy"]}
>> chardev-remove char-test_intf1
>> (qemu):
>> {'return': ["Chardev 'char-test_intf1' is busy"]}
>> ds
>> (qemu):
>> {'return': ["unknown command: 'ds'"]}
>> chardev-add socket,id=char-test_intf1,path=/usr/local/var/run/
>> openvswitch/test_intf1,server=on
>> (qemu):
>> {'return': ["Duplicate ID 'char-test_intf1' for chardev", 'Parsing
>> chardev args failed']}
>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
>> (qemu):
>> on_monitor_close
>> Disconnect ...
>> Bye...
>> [gangyewei-3@yf-mos-test-net07 tests]$ telnet 127.0.0.1 55919
>> Trying 127.0.0.1...
>> telnet: connect to address 127.0.0.1: Connection refused
>
>
> the monitor.py is same like telnet, which send command to 127.0.0.1:55919
> socket.
> At the last 5th line, you could see "on_monitor_close", this is because
> server side of 127.0.0.1:55919 socket is down.
>
> I have few questions:
> 1. Why I got "{'return': ["Chardev 'char-test_intf1' is busy"]}" while
> using "chardev-remove char-test_intf1"?
> 2. Why the server side will close while get "{'return': ["Duplicate ID
> 'char-test_intf1' for chardev", 'Parsing chardev args failed']}" and then
> send same command?
>
> Thank you~
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Monitor socket will close after parse command error. Qemu-2.6.2
  2017-09-08  3:32 ` Sam
@ 2017-09-08  3:38   ` Sam
  2017-09-12 18:31     ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Sam @ 2017-09-08  3:38 UTC (permalink / raw)
  To: QEMU Developers

[gangyewei-3@yf-mos-test-net07 tests]$ telnet 127.0.0.1 55919
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
QEMU 2.6.2 monitor - type 'help' for more information
(qemu) chardev-add
socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
chardev-add
socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
(qemu)
(qemu) netdev_add
vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
(qemu)
(qemu) device_add
virtio-net-pci,netdev=test_intf1,mac=00:22:79:29:d2:6c,id=netdev-test_intf1
device_add
virtio-net-pci,netdev=test_intf1,mac=00:22:79:29:d2:6c,id=netdev-test_intf1
(qemu)
(qemu) device_del netdev-test_intf1
device_del netdev-test_intf1
(qemu)
(qemu) netdev_del test_intf1
netdev_del test_intf1
(qemu)
(qemu) chardev-remove char-test_intf1
chardev-remove char-test_intf1
Chardev 'char-test_intf1' is busy
(qemu)
(qemu) chardev-remove char-test_intf1
chardev-remove char-test_intf1
Chardev 'char-test_intf1' is busy
(qemu)
(qemu) chardev-remove char-test_intf1
chardev-remove char-test_intf1
Chardev 'char-test_intf1' is busy
(qemu)
(qemu) chardev-add
socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
chardev-add
socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
Duplicate ID 'char-test_intf1' for chardev
Parsing chardev args failed
(qemu)
(qemu) ^[[A^[[A
chardev-remove char-test_intf1
Chardev 'char-test_intf1' is busy
(qemu)
(qemu)

(qemu)
(qemu)

(qemu)
(qemu) netdev_add
vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
Connection closed by foreign host.

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

> BTW, same result while using `telnet 127.0.0.1 55919`, which means also
> have the two problem in the email before.
>
> 2017-09-08 11:23 GMT+08:00 Sam <batmanustc@gmail.com>:
>
>> Hi all,
>>
>> I'm using HMP socket to send command to add netdev, my command like this:
>>
>> [gangyewei-3@yf-mos-test-net07 tests]$ sudo  python monitor.py 55919
>>> (qemu):
>>>  Connected to qemu monitor ...
>>> on_monitor_open
>>> ds
>>> (qemu):
>>> {'return': ["unknown command: 'ds'"]}
>>> chardev-add socket,id=char-test_intf1,path=/usr/local/var/run/openvswitc
>>> h/test_intf1,server=on
>>> (qemu):
>>> \{'return': []}
>>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=
>>> on
>>> (qemu):
>>> {'return': ["unknown command: '\\netdev_add'"]}
>>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=
>>> on
>>> (qemu):
>>> {'return': []}
>>> device_add virtio-net-pci,netdev=test_intf1,mac=00:22:79:29:d2:6c,id=
>>> netdev-test_intf1
>>> (qemu):
>>> {'return': []}
>>> device_del netdev-test_intf1
>>> (qemu):
>>> {'return': []}
>>> netdev_del test_intf1
>>> (qemu):
>>> {'return': []}
>>> chardev-remove char-test_intf1
>>> (qemu):
>>> {'return': ["Chardev 'char-test_intf1' is busy"]}
>>> chardev-remove char-test_intf1
>>> (qemu):
>>> {'return': ["Chardev 'char-test_intf1' is busy"]}
>>> ds
>>> (qemu):
>>> {'return': ["unknown command: 'ds'"]}
>>> chardev-add socket,id=char-test_intf1,path=/usr/local/var/run/openvswitc
>>> h/test_intf1,server=on
>>> (qemu):
>>> {'return': ["Duplicate ID 'char-test_intf1' for chardev", 'Parsing
>>> chardev args failed']}
>>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=
>>> on
>>> (qemu):
>>> on_monitor_close
>>> Disconnect ...
>>> Bye...
>>> [gangyewei-3@yf-mos-test-net07 tests]$ telnet 127.0.0.1 55919
>>> Trying 127.0.0.1...
>>> telnet: connect to address 127.0.0.1: Connection refused
>>
>>
>> the monitor.py is same like telnet, which send command to 127.0.0.1:55919
>> socket.
>> At the last 5th line, you could see "on_monitor_close", this is because
>> server side of 127.0.0.1:55919 socket is down.
>>
>> I have few questions:
>> 1. Why I got "{'return': ["Chardev 'char-test_intf1' is busy"]}" while
>> using "chardev-remove char-test_intf1"?
>> 2. Why the server side will close while get "{'return': ["Duplicate ID
>> 'char-test_intf1' for chardev", 'Parsing chardev args failed']}" and then
>> send same command?
>>
>> Thank you~
>>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] Monitor socket will close after parse command error. Qemu-2.6.2
  2017-09-08  3:38   ` Sam
@ 2017-09-12 18:31     ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2017-09-12 18:31 UTC (permalink / raw)
  To: Sam; +Cc: QEMU Developers

* Sam (batmanustc@gmail.com) wrote:
> [gangyewei-3@yf-mos-test-net07 tests]$ telnet 127.0.0.1 55919
> Trying 127.0.0.1...
> Connected to 127.0.0.1.
> Escape character is '^]'.
> QEMU 2.6.2 monitor - type 'help' for more information
> (qemu) chardev-add
> socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
> chardev-add
> socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
> (qemu)
> (qemu) netdev_add
> vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
> (qemu)
> (qemu) device_add
> virtio-net-pci,netdev=test_intf1,mac=00:22:79:29:d2:6c,id=netdev-test_intf1
> device_add
> virtio-net-pci,netdev=test_intf1,mac=00:22:79:29:d2:6c,id=netdev-test_intf1
> (qemu)
> (qemu) device_del netdev-test_intf1
> device_del netdev-test_intf1
> (qemu)
> (qemu) netdev_del test_intf1
> netdev_del test_intf1
> (qemu)
> (qemu) chardev-remove char-test_intf1
> chardev-remove char-test_intf1
> Chardev 'char-test_intf1' is busy
> (qemu)
> (qemu) chardev-remove char-test_intf1
> chardev-remove char-test_intf1
> Chardev 'char-test_intf1' is busy
> (qemu)
> (qemu) chardev-remove char-test_intf1
> chardev-remove char-test_intf1
> Chardev 'char-test_intf1' is busy
> (qemu)
> (qemu) chardev-add
> socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
> chardev-add
> socket,id=char-test_intf1,path=/usr/local/var/run/openvswitch/test_intf1,server=on
> Duplicate ID 'char-test_intf1' for chardev
> Parsing chardev args failed
> (qemu)
> (qemu) ^[[A^[[A
> chardev-remove char-test_intf1
> Chardev 'char-test_intf1' is busy
> (qemu)
> (qemu)
> 
> (qemu)
> (qemu)
> 
> (qemu)
> (qemu) netdev_add
> vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=on
> Connection closed by foreign host.

Is QEMU just crashing at that point?  i.e. segfaulting or aborting?

Dave

> 2017-09-08 11:32 GMT+08:00 Sam <batmanustc@gmail.com>:
> 
> > BTW, same result while using `telnet 127.0.0.1 55919`, which means also
> > have the two problem in the email before.
> >
> > 2017-09-08 11:23 GMT+08:00 Sam <batmanustc@gmail.com>:
> >
> >> Hi all,
> >>
> >> I'm using HMP socket to send command to add netdev, my command like this:
> >>
> >> [gangyewei-3@yf-mos-test-net07 tests]$ sudo  python monitor.py 55919
> >>> (qemu):
> >>>  Connected to qemu monitor ...
> >>> on_monitor_open
> >>> ds
> >>> (qemu):
> >>> {'return': ["unknown command: 'ds'"]}
> >>> chardev-add socket,id=char-test_intf1,path=/usr/local/var/run/openvswitc
> >>> h/test_intf1,server=on
> >>> (qemu):
> >>> \{'return': []}
> >>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=
> >>> on
> >>> (qemu):
> >>> {'return': ["unknown command: '\\netdev_add'"]}
> >>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=
> >>> on
> >>> (qemu):
> >>> {'return': []}
> >>> device_add virtio-net-pci,netdev=test_intf1,mac=00:22:79:29:d2:6c,id=
> >>> netdev-test_intf1
> >>> (qemu):
> >>> {'return': []}
> >>> device_del netdev-test_intf1
> >>> (qemu):
> >>> {'return': []}
> >>> netdev_del test_intf1
> >>> (qemu):
> >>> {'return': []}
> >>> chardev-remove char-test_intf1
> >>> (qemu):
> >>> {'return': ["Chardev 'char-test_intf1' is busy"]}
> >>> chardev-remove char-test_intf1
> >>> (qemu):
> >>> {'return': ["Chardev 'char-test_intf1' is busy"]}
> >>> ds
> >>> (qemu):
> >>> {'return': ["unknown command: 'ds'"]}
> >>> chardev-add socket,id=char-test_intf1,path=/usr/local/var/run/openvswitc
> >>> h/test_intf1,server=on
> >>> (qemu):
> >>> {'return': ["Duplicate ID 'char-test_intf1' for chardev", 'Parsing
> >>> chardev args failed']}
> >>> netdev_add vhost-user,id=test_intf1,chardev=char-test_intf1,vhostforce=
> >>> on
> >>> (qemu):
> >>> on_monitor_close
> >>> Disconnect ...
> >>> Bye...
> >>> [gangyewei-3@yf-mos-test-net07 tests]$ telnet 127.0.0.1 55919
> >>> Trying 127.0.0.1...
> >>> telnet: connect to address 127.0.0.1: Connection refused
> >>
> >>
> >> the monitor.py is same like telnet, which send command to 127.0.0.1:55919
> >> socket.
> >> At the last 5th line, you could see "on_monitor_close", this is because
> >> server side of 127.0.0.1:55919 socket is down.
> >>
> >> I have few questions:
> >> 1. Why I got "{'return': ["Chardev 'char-test_intf1' is busy"]}" while
> >> using "chardev-remove char-test_intf1"?
> >> 2. Why the server side will close while get "{'return': ["Duplicate ID
> >> 'char-test_intf1' for chardev", 'Parsing chardev args failed']}" and then
> >> send same command?
> >>
> >> Thank you~
> >>
> >
> >
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-09-12 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-08  3:23 [Qemu-devel] Monitor socket will close after parse command error. Qemu-2.6.2 Sam
2017-09-08  3:32 ` Sam
2017-09-08  3:38   ` Sam
2017-09-12 18:31     ` Dr. David Alan Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.