RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 990316 - QMP: possible memory leaks on commands failure
Summary: QMP: possible memory leaks on commands failure
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Ademar Reis
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 990566
TreeView+ depends on / blocked
 
Reported: 2013-07-30 21:40 UTC by Luiz Capitulino
Modified: 2013-12-05 08:27 UTC (History)
11 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.384.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 990566 (view as bug list)
Environment:
Last Closed: 2013-11-21 07:06:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 21:40:29 UTC

Description Luiz Capitulino 2013-07-30 21:40:37 UTC
Description of problem:

A number of QMP commands will possibly leak memory on failure because the release of QAPI structures is skipped on failure.

Version-Release number of selected component (if applicable): qemu-kvm-0.12.1.2-2.382.el6 (and previous)


How reproducible:

As the leak is usually small, it's hard to see. Maybe you could write a script to send the following command:

{ "execute": "dump-guest-memory", "arguments": { "protocol": "/a/a", "paging": false } }

To QMP in a loop for dozens of minutes and watch for an RSS increase, but more important than trying to reproduce this issue is to make sure that we're not breaking existing commands. So, it's a very good idea to test the following commands (success and error conditions):

o __com.redhat_block-commit
o transaction
o blockdev-snapshot-sync
o __com.redhat_drive-reopen
o __com.redhat_drive-mirror
o dump-guest-memory
o chardev-add/remove

Comment 3 Sibiao Luo 2013-08-01 06:01:49 UTC
(In reply to Luiz Capitulino from comment #0)
> Description of problem:
> 
> A number of QMP commands will possibly leak memory on failure because the
> release of QAPI structures is skipped on failure.
> 
> Version-Release number of selected component (if applicable):
> qemu-kvm-0.12.1.2-2.382.el6 (and previous)
> 
> 
> How reproducible:
> 
> As the leak is usually small, it's hard to see. Maybe you could write a
> script to send the following command:
> 
> { "execute": "dump-guest-memory", "arguments": { "protocol": "/a/a",
> "paging": false } }
> 
> To QMP in a loop for dozens of minutes and watch for an RSS increase, but
> more important than trying to reproduce this issue is to make sure that
> we're not breaking existing commands. So, it's a very good idea to test the
> following commands (success and error conditions):
> 
> o __com.redhat_block-commit
> o transaction
> o blockdev-snapshot-sync
> o __com.redhat_drive-reopen
> o __com.redhat_drive-mirror
> o dump-guest-memory
> o chardev-add/remove

Reproduce this issue on qemu-kvm-rhev-0.12.1.2-2.382.el6.x86_64, that transaction/blockdev-snapshot-sync/__com.redhat_drive-reopen/__com.redhat_drive-mirror/dump-guest-memory will have memory leaks on QMP commands failure, but __com.redhat_block-commit have no memory leaks on QMP commands failure.
btw, chardev-add/remove not support in rhel6.5 currently.

host info:
2.6.32-402.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.382.el6.x86_64

Steps and Results:
# ps aux
USER       PID %CPU %MEM    VSZ   *RSS* TTY      STAT START   TIME COMMAND
...

1.Check the RSS value before run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     50212 30.7  1.6 4876048 4260580 pts/3 Sl+  00:55   3:35 /usr/libexec/qemu-kvm...

2.To QMP in a loop for ten times:
{"execute":"dump-guest-memory","arguments":{"paging":true,"protocol":"file:/a/dump"}}
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/a/dump': No such file or directory", "data": {"filename": "/a/dump", "__com.redhat_error_message": "No such file or directory"}}}

3.Check the RSS value if increase after run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     50212 29.9  1.6 4876048 4260596 pts/3 Sl+  00:55   3:36 /usr/libexec/qemu-kvm...

-----------------------------------------

1.Check the RSS value before run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 60.4  1.5 4877636 4157612 pts/3 Sl+  01:36   0:59 /usr/libexec/qemu-kvm...

2.To QMP in a loop for ten times:
{"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive-system-disk", "snapshot-file": "/a/sn-1", "format": "qcow2"}}
{"error": {"class": "GenericError", "desc": "/a/sn-1: error while creating qcow2: No such file or directory", "data": {"message": "/a/sn-1: error while creating qcow2: No such file or directory"}}}

3.Check the RSS value if increase after run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 55.0  1.5 4880676 4157808 pts/3 Sl+  01:36   1:03 /usr/libexec/qemu-kvm...

-----------------------------------------

1.Check the RSS value before run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 31.3  1.5 4880676 4157808 pts/3 Sl+  01:36   1:13 /usr/libexec/qemu-kvm...

2.To QMP in a loop for ten times:
{ "execute": "__com.redhat_block-commit", "arguments": { "device": "drive-system-disk", "base": "/a/sn1", "top": "/a/sn3", "speed": 1000000000 } }
{"error": {"class": "GenericError", "desc": "Top '/a/sn3' not found", "data": {"top": "/a/sn3"}}}

3.Check the RSS value if increase after run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 29.5  1.5 4880676 4157808 pts/3 Sl+  01:36   1:17 /usr/libexec/qemu-kvm...

-----------------------------------------

1.Check the RSS value before run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 27.9  1.5 4880676 4157808 pts/3 Sl+  01:36   1:18 /usr/libexec/qemu-kvm...

2.To QMP in a loop for ten times:
{ "execute": "__com.redhat_drive-mirror", "arguments": { "device": "drive-system-disk", "target": "/a/sn1", "format": "qcow2", "mode": "absolute-paths", "full": false } }
{"error": {"class": "GenericError", "desc": "/a/sn1: error while creating qcow2: No such file or directory", "data": {"message": "/a/sn1: error while creating qcow2: No such file or directory"}}}

3.Check the RSS value if increase after run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 25.0  1.5 4880676 4157812 pts/3 Sl+  01:36   1:21 /usr/libexec/qemu-kvm...

-----------------------------------------

1.Check the RSS value before run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 23.9  1.5 4880676 4157812 pts/3 Rl+  01:36   1:21 /usr/libexec/qemu-kvm...

2.To QMP in a loop for ten times:
{ "execute" : "__com.redhat_drive-reopen", "arguments" : { "device" : "drive-system-disk", "new-image-file" : "/a/sn2", "format": "qcow2" } }
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/a/sn2': No such file or directory", "data": {"filename": "/a/sn2", "__com.redhat_error_message": "No such file or directory"}}}

3.Check the RSS value if increase after run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 21.7  1.5 4878712 4158020 pts/3 Sl+  01:36   1:23 /usr/libexec/qemu-kvm...

-----------------------------------------

1.Check the RSS value before run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 21.5  1.5 4878712 4158384 pts/3 Sl+  01:36   1:28 /usr/libexec/qemu-kvm...

2To QMP in a loop for ten times:
{ "execute": "transaction", "arguments": {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'drive-system-disk', 'snapshot-file': '/a/sluo-snap1' } } ] } }
{"error": {"class": "GenericError", "desc": "/a/sluo-snap1: error while creating qcow2: No such file or directory", "data": {"message": "/a/sluo-snap1: error while creating qcow2: No such file or directory"}}}

3.Check the RSS value if increase after run QMP command:
# ps -axu | grep qemu-kvm
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
root     51069 18.9  1.5 4881968 4158636 pts/3 Sl+  01:36   1:33 /usr/libexec/qemu-kvm...

Bease on above, make qa_ack+ to it, please correct me if any mistake, thanks.

Best Regards,
sluo

Comment 7 langfang 2013-08-12 09:19:31 UTC
Test this bug as follow version:
# uname -r
2.6.32-410.el6.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-0.12.1.2-2.382.el6.x86_64

1.To QMP in a loop for ten times
{"execute":"dump-guest-memory","arguments":{"paging":true,"protocol":"file:/a/dump"}}
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/a/dump': No such file or directory", "data": {"filename": "/a/dump", "__com.redhat_error_message": "No such file or directory"}}}


RSS value change from 786336 to 786592
----------------------------

2.To QMP in a loop for ten times
{"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive-scsi0-0-0", "snapshot-file": "/a/sn-1", "format": "qcow2"}}

{"error": {"class": "GenericError", "desc": "/a/sn-1: error while creating qcow2: No such file or directory", "data": {"message": "/a/sn-1: error while creating qcow2: No such file or directory"}}}

RSS value change from 786552  to 786632

------------------
3.  To QMP in a loop for ten times

{ "execute": "__com.redhat_drive-mirror", "arguments": { "device": "drive-scsi0-0-0", "target": "/a/sn1", "format": "qcow2", "mode": "absolute-paths", "full": false } }

RSS 786632 to 786632


4. To QMP in a loop for ten times

{ "execute": "__com.redhat_block-commit", "arguments": { "device": "drive-scsi0-0-0", "base": "/a/sn1", "top": "/a/sn3", "speed": 1000000000 } }
{"error": {"class": "GenericError", "desc": "Top '/a/sn3' not found", "data": {"top": "/a/sn3"}}}

RSS not change (876632) 


5.To QMP in a loop for ten times
{ "execute": "transaction", "arguments": {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'drive-scsi0-0-0', 'snapshot-file': '/aa/sluo-snap1' } } ] } }
{"error": {"class": "GenericError", "desc": "/aa/sluo-snap1: error while creating qcow2: No such file or directory", "data": {"message": "/aa/sluo-snap1: error while creating qcow2: No such file or directory"}}}


 RSS value change from 786888 to 787016

***************************

Test this bug on fixed version:
Host
# uname -r
2.6.32-410.el6.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-0.12.1.2-2.386.el6.x86_64


Steps and Results:
# ps aux
USER       PID %CPU %MEM    VSZ   *RSS* TTY      STAT START   TIME COMMAND

Steps:
1.After guest boot up ,get the stable value of RSS

# telnet 10.66.83.191 5557
Trying 10.66.83.191...
Connected to 10.66.83.191.
Escape character is '^]'.
{"QMP": {"version": {"qemu": {"micro": 1, "minor": 12, "major": 0}, "package": "(qemu-kvm-0.12.1.2)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}

# ps aux |grep qemu-kvm
root      5922 20.1  2.2 5115532 738440 pts/0  Sl+  16:07   0:52 /usr/libexec/qemu-kvm

2.To QMP in a loop for ten times
{"execute":"dump-guest-memory","arguments":{"paging":true,"protocol":"file:/a/dump"}}
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/a/dump': No such file or directory", "data": {"filename": "/a/dump", "__com.redhat_error_message": "No such file or directory"}}}

# ps aux |grep qemu-kvm
root      5922 15.7  2.2 5115532 738460 pts/0  Sl+  16:07   0:52 /usr/libexec/qemu-kvm

--------

1.Check the RSS value before run QMP command:
# ps aux |grep qemu-kvm
root      5922 10.9  2.2 5115532 738460 pts/0  Sl+  16:07   0:53 /usr/libexec/qemu-kvm

2.To QMP in a loop for ten times
{"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive-scsi0-0-0", "snapshot-file": "/a/sn-1", "format": "qcow2"}}

3.To QMP in a loop for ten times
# ps aux |grep qemu-kvm
root      5922  9.7  2.2 5118336 738844 pts/0  Sl+  16:07   0:54 /usr/libexec/qemu-kvm

-------
1.Check the RSS value before run QMP command

# ps aux |grep qemu-kvm
root      5922  9.7  2.2 5118336 738844 pts/0  Sl+  16:07   0:54 /usr/libexec/qemu-kvm

2.To QMP in a loop for ten times
{ "execute": "__com.redhat_drive-mirror", "arguments": { "device": "drive-scsi0-0-0", "target": "/a/sn1", "format": "qcow2", "mode": "absolute-paths", "full": false } }
{"error": {"class": "GenericError", "desc": "/a/sn1: error while creating qcow2: No such file or directory", "data": {"message": "/a/sn1: error while creating qcow2: No such file or directory"}}}

3.Check the RSS value if increase after run QMP command:
# ps aux |grep qemu-kvm
root      5922  7.9  2.2 5118336 738844 pts/0  Sl+  16:07   0:54 /usr/libexec/qemu-kvm 
----------

Addtional info 

1)Tried 
{ "execute": "__com.redhat_block-commit", "arguments": { "device": "drive-scsi0-0-0", "base": "/a/sn1", "top": "/a/sn3", "speed": 1000000000 } }
{"error": {"class": "GenericError", "desc": "Top '/a/sn3' not found", "data": {"top": "/a/sn3"}}}


RSS value change from 880128 to 880128

2)Tried 

{ "execute" : "__com.redhat_drive-reopen", "arguments" : { "device" : "drive-scsi0-0-0", "new-image-file" : "/aa/sn2", "format": "qcow2" } }
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/aa/sn2': No such file or directory", "data": {"filename": "/aa/sn2", "__com.redhat_error_message": "No such file or directory"}}}

RSS value change from 739268  to 739716


3) { "execute": "transaction", "arguments": {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'drive-scsi0-0-0', 'snapshot-file': '/aa/sluo-snap1' } } ] } }
{"error": {"class": "GenericError", "desc": "/aa/sluo-snap1: error while creating qcow2: No such file or directory", "data": {"message": "/aa/sluo-snap1: error while creating qcow2: No such file or directory"}}}


RSS value change from  739988 to 740076


According to a above test ,i think this bug has not been fixed. Please correct me if any mistake, thanks.

Comment 8 langfang 2013-08-12 09:29:44 UTC
Test this bug as follow version:
# uname -r
2.6.32-410.el6.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-0.12.1.2-2.382.el6.x86_64

6.To QMP in a loop for ten times


 RSS value change from 786760 to 787360

Comment 9 Luiz Capitulino 2013-08-12 13:46:33 UTC
We can't tell if the RSS increase you're seeing is due to a memory leak or not. A process's RSS may increase for several reasons. I shouldn't have mentioned this test because it's a very poor one.

The leak was found during code review, I don't think there's an easy way of seeing it w/o debugging aid (say, you attach GDB to qmp_marshal_input_blockdev_snapshot_sync() and see pointers like 'device' still valid right before qmp_marshal_input_blockdev_snapshot_sync() returns).

The best way of testing this is to make sure all the commands you tested in comment 7 still work.

Comment 10 Qunfang Zhang 2013-08-13 04:55:22 UTC
Thanks Luiz for the comment. Fang, please test all the commands in comment 0/comment 7 for both success and failed conditions. And make sure all the commands work well or report suitable error.  Thanks.

Comment 11 langfang 2013-08-14 03:35:30 UTC
Test this bug on latest version:
Host:
# uname -r
2.6.32-410.el6.x86_64
#rpm -q qemu-kvm-rhev
qemu-kvm-rhev-0.12.1.2-2.386.el6.x86_64


Guest:
2.6.32-358.el6.x86_64

Tried 8 senarios:

Senario 1)

1.Boot guest
 
2.Do 10 times QMP commands(fail conditions)
#telnet 10.66.83.191 5557
...
{"execute":"chardev-add","arguments":{"id":"bar7","backend":{"type":"file","data":{"out":"/tmps/log7"}}}}
{"error": {"class": "GenericError", "desc": "open /tmps/log7: No such file or directory", "data": {"message": "open /tmps/log7: No such file or directory"}}}
...

3.Do 10 times QMP commands (success conditions)

...

{"execute":"chardev-add","arguments":{"id":"bar7","backend":{"type":"file","data":{"out":"/tmp/log7"}}}}
{"return": {}}
{"execute":"chardev-add","arguments":{"id":"bar8","backend":{"type":"file","data":{"out":"/tmp/log8"}}}}
{"return": {}}
{"execute":"chardev-add","arguments":{"id":"bar9","backend":{"type":"file","data":{"out":"/tmp/log9"}}}}
...

Results: 
After step 2:RSS value change from  983636 to 1010260, and commands work well and report suitable error.

After step 3:RSS value remain 1010268,and commands work well.



Senario 2)

1.Boot guest
2.Do 10 times QMP commands(fail conditions)
..
{"execute":"chardev-remove","arguments":{"id":"bar"}}
{"error": {"class": "GenericError", "desc": "Chardev 'bar' not found", "data": {"message": "Chardev 'bar' not found"}}}
...

3.Do 10 times QMP commands (success conditions)
..
{"execute":"chardev-remove","arguments":{"id":"bar10"}}
{"return": {}}
{"execute":"chardev-remove","arguments":{"id":"bar11"}}
{"return": {}}
{"execute":"chardev-remove","arguments":{"id":"bar12"}}
{"return": {}}
{"execute":"chardev-remove","arguments":{"id":"bar13"}}
{"return": {}}
...
Results:
After step 2:RSS value change from  1010268 to 1016412, and commands work well and report suitable error.

After step 3,RSS value remain 1016412,and commands work well.

Senarios 3)

1.Boot guest
2.Do 10 times QMP commands(fail conditions)
..
{"execute":"dump-guest-memory","arguments":{"paging":true,"protocol":"file:/a/dump"}}
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/a/dump': No such file or directory", "data": {"filename": "/a/dump", "__com.redhat_error_message": "No such file or directory"}}}
{"execute":"dump-guest-memory","arguments":{"paging":true,"protocol":"file:/a/dump"}}
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/a/dump': No such file or directory", "data": {"filename": "/a/dump", "__com.redhat_error_message": "No such file or directory"}}}
...
3.Do 10 times QMP commands (success conditions)
..
{"execute":"dump-guest-memory","arguments":{"paging":true,"protocol":"file:/tmp/dump8"}}
{"timestamp": {"seconds": 1376448047, "microseconds": 160160}, "event": "STOP"}
{"timestamp": {"seconds": 1376448048, "microseconds": 62543}, "event": "RESUME"}
{"return": {}}
{"execute":"dump-guest-memory","arguments":{"paging":true,"protocol":"file:/tmp/dump9"}}
{"timestamp": {"seconds": 1376448058, "microseconds": 372973}, "event": "STOP"}
{"timestamp": {"seconds": 1376448058, "microseconds": 869108}, "event": "RESUME"}
{"return": {}}
...
Results:
After step 2:RSS value change from   1030752 to  1030760, and commands work well and report suitable error.

After step 3,RSS value change from 1102316 to  1102328,and commands work well.

Senarios 4)

1.Boot guest
2.Do 10 times QMP commands(fail conditions)
..
{ "execute": "__com.redhat_drive-mirror", "arguments": { "device": "drive-scsi0-0-0", "target": "/a/sn1", "format": "qcow2", "mode": "absolute-paths", "full": false } }
{"error": {"class": "GenericError", "desc": "/a/sn1: error while creating qcow2: No such file or directory", "data": {"message": "/a/sn1: error while creating qcow2: No such file or directory"}}}
...

3.Do 1 times QMP commands (success conditions)
..
{ "execute": "__com.redhat_drive-mirror", "arguments": { "device": "drive-scsi0-0-0", "target": "/tmp/sn1", "format": "qcow2", "mode": "absolute-paths", "full": false } }
{"return": {}}
..

Results:
After step 2:RSS value change from  1102328 to 1141564  , and commands work well and report suitable error.

After step 3,RSS value change from 1235648 to 1235656 ,and commands work well.

Senario 5)

1.Boot guest
2.Do 10 times QMP commands(fail conditions)

..{ "execute": "__com.redhat_block-commit", "arguments": { "device": "drive-scsi0-0-0", "base": "/a/sn1", "top": "/a/sn3", "speed": 1000000000 } }
{"error": {"class": "GenericError", "desc": "Top '/a/sn3' not found", "data": {"top": "/a/sn3"}}}
...
3.Do 1 times QMP commands (success conditions).
...

{ "execute": "__com.redhat_block-commit", "arguments": { "device": "drive-scsi0-0-0", "base": "/tmp/sn1", "top": "/tmp/sn3", "speed": 1000000000 } }
{"return": {}}
{"timestamp": {"seconds": 1376449710, "microseconds": 924311}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-scsi0-0-0", "len": 21474836480, "offset": 21474836480, "speed": 1000000000, "type": "commit"}}
...

Results:
After step 2:RSS value remain  1235656 , and commands work well and report suitable error.

After step 3,RSS value change from 757292 to 757616  ,and commands work well.

Senario 6)

1.Boot guest
2.Do 10 times QMP commands(fail conditions)
..{ "execute" : "__com.redhat_drive-reopen", "arguments" : { "device" : "drive-scsi0-0-0", "new-image-file" : "/aa/sn2", "format": "qcow2" } }
{"error": {"class": "OpenFileFailed", "desc": "Could not open '/aa/sn2': No such file or directory", "data": {"filename": "/aa/sn2", "__com.redhat_error_message": "No such file or directory"}}}
..

3.Do 1 times QMP commands (success conditions).
...{ "execute" : "__com.redhat_drive-reopen", "arguments" : { "device" : "drive-scsi0-0-0", "new-image-file" : "/tmp/sn1", "format": "qcow2" } }
{"return": {}}
...

Results:
After step 2:RSS value change from 773448 to 774196, and commands work well and report suitable error.

After step 3,RSS value change from 774196 to  774212 ,and commands work well.


Senario 7)

1.Boot guest
2.Do 10 times QMP commands(fail conditions)

..{"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive-scsi0-0-0", "snapshot-file": "/a/sn-1", "format": "qcow2"}}
{"error": {"class": "GenericError", "desc": "/a/sn-1: error while creating qcow2: No such file or directory", "data": {"message": "/a/sn-1: error while creating qcow2: No such file or directory"}}}
..

3.Do 1 times QMP commands (success conditions).
...
{"execute": "blockdev-snapshot-sync", "arguments": {"device": "drive-scsi0-0-0", "snapshot-file": "/tmp/sn3", "format": "qcow2"}}
{"return": {}}

...

Results:
After step 2:RSS value change from  776188  to  776548, and commands work well and report suitable error.
 
After step 3,RSS value change from  776588  to   776872 ,and commands work well.

Senario 8)

1.Boot guest
2.Do 10 times QMP commands(fail conditions)

...{ "execute": "transaction", "arguments": {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'drive-scsi0-0-0', 'snapshot-file': '/aa/sluo-snap1' } } ] } }
{"error": {"class": "GenericError", "desc": "/aa/sluo-snap1: error while creating qcow2: No such file or directory", "data": {"message": "/aa/sluo-snap1: error while creating qcow2: No such file or directory"}}}
..


3.Do 1 times QMP commands (success conditions).
..
{ "execute": "transaction", "arguments": {'actions': [ { 'type': 'blockdev-snapshot-sync', 'data' : { 'device': 'drive-scsi0-0-0', 'snapshot-file': '/tmp/lang' } } ] } }
{"return": {}}
...
Results:
After step 2:RSS value remain 775008  , and commands work well and report suitable error.
 
After step 3,RSS value change from  775508 to 775628 ,and commands work well.



According above test and comment9(10),we can verify this bug.

Comment 12 langfang 2013-08-14 03:38:18 UTC
Addtional info :

I tried all the commands in comment 0/comment 7 for both success and failed conditions. And make sure all the commands work well or report suitable error. 

Commands include:

o __com.redhat_block-commit
o transaction
o blockdev-snapshot-sync
o __com.redhat_drive-reopen
o __com.redhat_drive-mirror
o dump-guest-memory
o chardev-add/remove



So ,we can verify this bug, thanks

Comment 14 errata-xmlrpc 2013-11-21 07:06:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-1553.html


Note You need to log in before you can comment on or make changes to this bug.