Bug 619723 - java.lang.ArrayIndexOutOfBoundsException during kickstart
java.lang.ArrayIndexOutOfBoundsException during kickstart
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: WebUI (Show other bugs)
1.0
All Linux
low Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
:
Depends On:
Blocks: space16
  Show dependency treegraph
 
Reported: 2010-07-30 06:12 EDT by Mark Chappell
Modified: 2011-12-22 11:50 EST (History)
3 users (show)

See Also:
Fixed In Version: spacewalk-java-1.6.47-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-22 11:50:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Backtrace from Catalina.out (4.50 KB, text/plain)
2010-07-30 06:12 EDT, Mark Chappell
no flags Details
List of RPMs installed on SW server (1.42 KB, text/plain)
2010-07-30 06:13 EDT, Mark Chappell
no flags Details
Catalina log on repo access (4.08 KB, text/plain)
2011-06-23 13:50 EDT, Kurt Nelson
no flags Details

  None (edit)
Description Mark Chappell 2010-07-30 06:12:19 EDT
Created attachment 435521 [details]
Backtrace from Catalina.out

Description of problem:
I start a (reasonably long) kickstart, it runs most of the way through and then I get a File Not Found message on the machine beeing kickstarted.

Version-Release number of selected component (if applicable):
Will attach full list

How reproducible:
Consistently, but with different failing packages.
Comment 1 Mark Chappell 2010-07-30 06:13:12 EDT
Created attachment 435522 [details]
List of RPMs installed on SW server
Comment 2 Mark Chappell 2010-07-30 06:18:08 EDT
I mentioned the bug to Justin Sherrill via IRC on Thursday.  Possibly relevant information being that :

* It worked 24 hours ago.
* The resultant VM was unbootable (it failed to find the boot image properly)
* Then I changed the partitioning setup in the kickstart to remove the use of LVM
* I also commented out a couple of entries from the package install list (They take a long time to install)
* Tried rebuilding the VM again, and it now fails.  Yesterday with xulrunner, today with rpm-devel
Comment 3 Jan Pazdziora 2010-10-27 04:32:31 EDT
Mass-aligning under space12, so that we don't lose track of this bugzilla. This however does not mean that we plan (will be able to) address this bug in Spacewalk 1.2.
Comment 4 Jan Pazdziora 2010-11-19 11:05:27 EST
Mass-moving to space13.
Comment 5 Miroslav Suchý 2011-04-11 03:34:03 EDT
We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5.
Comment 6 Miroslav Suchý 2011-04-11 03:37:25 EDT
We did not have time for this one during Spacewalk 1.4 time frame. Mass moving to Spacewalk 1.5.
Comment 7 Kurt Nelson 2011-06-23 13:50:24 EDT
Created attachment 509585 [details]
Catalina log on repo access

Whenever http://spacewalk/ks/dist/child/f14updates/Fedora-14-Desktop-x86_64 or similar is accessed via the kickstart, this error happens.
Comment 8 Jan Pazdziora 2011-07-07 04:17:27 EDT
(In reply to comment #0)
> Created attachment 435521 [details]
> Backtrace from Catalina.out
> 
> Description of problem:
> I start a (reasonably long) kickstart, it runs most of the way through and then
> I get a File Not Found message on the machine beeing kickstarted.
> 
> Version-Release number of selected component (if applicable):
> Will attach full list
> 
> How reproducible:
> Consistently, but with different failing packages.

The first backtrace comes from the code

    // Ported from perl - needed for yum's requests for byte ranges
    private StreamInfo manualServeByteRange(HttpServletRequest request,
            HttpServletResponse response,
            String diskPath, String range) {

        // bytes=440-25183
        String[] bytesheader = StringUtils.split(range, "=");
        String[] ranges = StringUtils.split(bytesheader[1], "-");
        long start = Long.valueOf(ranges[0]).longValue();
        long end = Long.valueOf(ranges[1]).longValue();
        if (log.isDebugEnabled()) {
            log.debug("manualServeByteRange Start    : " + start);
            log.debug("manualServeByteRange End      : " + end);
        }

where we process the Range requests. And the range either did not contain the dash (minus) sign, or it was a suffix range request, something like

   bytes=-500 or bytes=9500-

as specified in the 14.35.1 of RFC 2616. In that case, the ranges array would only have single element.

We probably want something like splitPreserveAllTokens there, and correctly account for situations when we will not know the start or end and compute it from the totalSize.
Comment 9 Jan Pazdziora 2011-07-07 04:56:06 EDT
(In reply to comment #7)
> Created attachment 509585 [details]
> Catalina log on repo access
> 
> Whenever http://spacewalk/ks/dist/child/f14updates/Fedora-14-Desktop-x86_64 or
> similar is accessed via the kickstart, this error happens.

Hello,

do kickstart work as expected and does the problem only happen when you try to "browse" the kickstart tree manually?

Spacewalk does not provide the full directory listing -- in will only return the repodata *files* that are needed during kickstart. You might want to append repodata/primary.xml.gz or something similar.
Comment 10 Jan Pazdziora 2011-07-20 07:52:35 EDT
Aligning under space16.
Comment 11 Jan Pazdziora 2011-09-16 10:15:47 EDT
(In reply to comment #8)
> 
> We probably want something like splitPreserveAllTokens there, and correctly
> account for situations when we will not know the start or end and compute it
> from the totalSize.

Fixed in Spacewalk master, 365fb6234d3bbb67919ce058f16b427548421e18, implemented via regexp to also check for the bytes= prefix.
Comment 12 Milan Zázrivec 2011-12-22 11:50:16 EST
Spacewalk 1.6 has been released.

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