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 1073917 - java bindings inspect_list_applications2 throws java.lang.ArrayIndexOutOfBoundsException:
Summary: java bindings inspect_list_applications2 throws java.lang.ArrayIndexOutOfBoun...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1021149 1062533 1073906
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-07 13:33 UTC by Richard W.M. Jones
Modified: 2015-06-10 14:15 UTC (History)
8 users (show)

Fixed In Version: libguestfs-1.27.56-1.1.el7
Doc Type: Bug Fix
Doc Text:
In the Java binding, or APIs that return a list of objects different from String caused an ArrayIndexOutOfBoundsException exception to be triggered. The creation of the result list has been fixed, and these APIs now return the expected result.
Clone Of: 1073906
Environment:
Last Closed: 2015-03-05 13:43:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description Richard W.M. Jones 2014-03-07 13:33:07 UTC
+++ This bug was initially created as a clone of Bug #1073906 +++

Description of problem:

Using the inspect_list_applications2 function causes java.lang.ArrayIndexOutOfBoundsException to be thrown.

Version-Release number of selected component (if applicable):

libguestfs-java-1.25.42-1.fc21.x86_64

How reproducible:

100%

Steps to Reproduce:

Download InspectVM.java file attached.

Compile it like this:

javac -classpath /usr/share/java/libguestfs.jar InspectVM.java 

To test this you will need any Linux disk image.  eg. Build one using
virt-builder:

virt-builder fedora-20

Run the program on this disk image:

$ java -classpath /usr/share/java/libguestfs.jar:. InspectVM fedora-20.img 
Root device: /dev/sda3
  Product name: Fedora release 20 (Heisenbug)
  Version:      20.0
  Type:         linux
  Distro:       fedora
java.lang.ArrayIndexOutOfBoundsException: 231

It shouldn't print the ArrayIndexOutOfBoundsException error.

Comment 2 Richard W.M. Jones 2014-03-07 16:07:10 UTC
Fixed upstream in:

6aa64ee3a3f1c990b5f9ce537f2b840273c3c1ba
d00840d727e4040a7958ecc613599d6ec2851e53
8c219636a272c4288f22392ff27b9c04580aecb4
7a0e71f7331540809db5f539d1a9fe2af050c56a
dff35285e491d1905d38c90d83fed98932cbc3b3

& regression test:

ebf8a3654ac4a691d48199adb8e92e182012a8c2
1ba2e3e14aa6d58bff26646a1328969fda44610f

Comment 3 Lingfei Kong 2014-04-14 02:58:27 UTC
Can reproduce with libguestfs-java-1.22.6-22.el7

Steps to reproduce
1. Download attachment: InspectVM.java
2.# javac -classpath /usr/share/java/libguestfs-1.22.6.jar InspectVM.java
3. Download Fedora 18 disk image
4. java -classpath /usr/share/java/libguestfs-1.22.6.jar:. InspectVM Fedora-18.raw
Root device: /dev/fedora_dhcp-11-24/root
  Product name: Fedora release 18 (Spherical Cow)
  Version:      18.0
  Type:         linux
  Distro:       fedora
java.lang.ArrayIndexOutOfBoundsException: 1188


java throws exception: ArrayIndexOutOfBoundsException

Comment 4 Ludek Smid 2014-06-26 11:16:52 UTC
This request was not resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you need
to escalate this bug.

Comment 7 yuliu 2014-11-10 09:00:29 UTC
1. version : libguestfs-1.28.1-1.9.el7.x86_64

Root device: /dev/fedora_dhcp-11-24/root
  Product name: Fedora release 18 (Spherical Cow)
  Version:      18.0
  Type:         linux
  Distro:       fedora
  Number of apps installed = 1189
    GConf2 3.2.5 3.fc18
...

Verified as above.

Comment 9 errata-xmlrpc 2015-03-05 13:43:25 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.

https://rhn.redhat.com/errata/RHBA-2015-0303.html


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