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 1029726 - Report error on screenshot stream close
Summary: Report error on screenshot stream close
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-13 02:28 UTC by weizhang
Modified: 2013-12-05 14:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-05 14:49:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd.log in level 1 (1.73 MB, text/plain)
2013-11-13 02:28 UTC, weizhang
no flags Details

Description weizhang 2013-11-13 02:28:43 UTC
Created attachment 823237 [details]
libvirtd.log in level 1

Description of problem:
When I test it on perl-Sys-Virt with script
#!/usr/bin/perl
use warnings;
use strict;
use Sys::Virt;

my $uri = "qemu:///system";
my $domname = "test";
my $con = Sys::Virt->new(address => $uri, readonly => 0);
my $dom = $con->get_domain_by_name($domname);
my $st = $con->new_stream();
$dom->screenshot($st, 0);
$st->finish();

It will report error
2013-11-07 09:38:45.373+0000: 907: error : virFDStreamCloseInt:315 : internal error: I/O helper exited abnormally
2013-11-07 09:38:45.374+0000: 907: error : virFDStreamUpdateCallback:133 : internal error: stream is not open


Version-Release number of selected component (if applicable):
perl-Sys-Virt-1.1.1-2.el7.x86_64
kernel-3.10.0-26.el7.x86_64
qemu-kvm-rhev-1.5.3-16.el7.x86_64
libvirt-1.1.1-12.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. start a guest with name test
2. perl test.pl (content of test.pl show in description)
3.

Actual results:
report error
2013-11-07 09:38:45.373+0000: 907: error : virFDStreamCloseInt:315 : internal error: I/O helper exited abnormally
2013-11-07 09:38:45.374+0000: 907: error : virFDStreamUpdateCallback:133 : internal error: stream is not open

Expected results:
No error

Additional info:

Comment 2 Daniel Berrangé 2013-12-02 13:55:06 UTC
These log messages are in libvirtd, so not a perl client bug.

Comment 3 Michal Privoznik 2013-12-05 14:49:20 UTC
This is not a bug.

First of all: you didn't specify where the stream data should go. Then: you need either to recv all data or abort the stream prior calling finish. So in fact your script needs to look like this:

#!/usr/bin/perl
use warnings;
use strict;
use Sys::Virt;

my $f = shift @ARGV;
my $uri = "qemu:///system";
my $domname = "gentoo";
my $con = Sys::Virt->new(address => $uri, readonly => 0);
my $dom = $con->get_domain_by_name($domname);
my $st = $con->new_stream();

open FILE, ">$f" or die "cannot create $f: $!";

sub foo {
	my $st = shift;
	my $data = shift;
	my $nbytes = shift;
	return syswrite FILE, $data, $nbytes;
};

$dom->screenshot($st, 0);
$st->recv_all(\&foo);
$st->finish();


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