m.unable_to_repair ArrayIndexOutOfBoundsException

45 views
Skip to first unread message

Mat Broughton

unread,
Dec 22, 2021, 2:36:36 AM12/22/21
to OOO Libs
Good Morning,
I am seeing some update failures and are not sure where to look.  The launcher.log indicates a

Is there a way to get verbose logging?  I'm wondering if this may be an issue with digests?

On the client side it also seems to be complaining about " invalid code lengths set" but not sure what this is referring to?

Anyone seen these kind of messages before?  The way the digests are generated haven't changed for ages so I'm a bit lost.
Cheers
Mat


2021/12/22 07:23:16:313 INFO Attempting to refetch 'digest.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest.txt'.
2021/12/22 07:23:16:323 INFO No signing certs, not verifying digest.txt [path=digest.txt]
2021/12/22 07:23:16:327 INFO Attempting to refetch 'digest2.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest2.txt'.
2021/12/22 07:23:16:334 INFO No signing certs, not verifying digest.txt [path=digest2.txt]
2021/12/22 07:23:16:348 INFO Resource failed digest check [rsrc=lib/gemini-common.jar, error=java.util.zip.ZipException: invalid code lengths set]
2021/12/22 07:23:16:353 INFO Resource failed digest check [rsrc=lib/gemini-extractor.jar, error=java.util.zip.ZipException: error in opening zip file]
2021/12/22 07:23:16:391 INFO Resource failed digest check [rsrc=lib/gemini-dependencies.jar, error=java.util.zip.ZipException: invalid literal/length code]
2021/12/22 07:23:16:391 INFO Verified resources [count=12, size=51373k, duration=50ms]
2021/12/22 07:23:16:392 INFO 3 of 12 rsrcs require update (32 assumed valid).
2021/12/22 07:23:16:408 INFO Downloading 3 resources [totalBytes=51842967, maxConcurrent=2]
2021/12/22 07:23:16:413 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-extractor.jar, size=1797757]
2021/12/22 07:23:16:413 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-dependencies.jar, size=49509971]
2021/12/22 07:23:16:531 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-common.jar, size=535239]
2021/12/22 07:23:17:312 WARNING Pants! We couldn't get the job done.
2021/12/22 07:23:17:312 WARNING getdown() failed. [java.io.IOException: m.unable_to_repair=<toString() failure: java.lang.ArrayIndexOutOfBoundsException: 1>]
java.io.IOException: m.unable_to_repair
        at com.threerings.getdown.launcher.Getdown.getdown(Unknown Source)
        at com.threerings.getdown.launcher.Getdown.run(Unknown Source)
2021/12/22 07:23:17:315 INFO Releasing lock

Michael Bayne

unread,
Dec 22, 2021, 1:16:38 PM12/22/21
to ooo-...@googlegroups.com
It's hard to say exactly what might be going on but the zip errors encountered while validating the digest (i.e. "invalid code lengths set") seem like perhaps the jar files failed to download completely or were otherwise corrupted.

Maybe you can double check that the file size of the downloaded jar files matches the reported size from HTTP (which is what Getdown logs when it says "size=1797757" for example).

Assuming they do appear to be the right size, then you could check to see whether you can inspect/unpack them with the standalone jar tool. If all that works, then I'm not sure what the problem is.

It's unlikely to be a problem with the digests or the digest file. What's happening is: Getdown sees that there's a new `digest.txt` file (or `digest2.txt`) and so it needs to verify that the cryptographic hash of the jar files on disk match the hashes in the updated digest file. To compute those hashes it actually hashes the contents of the jar files, not the whole jar files (for reasons I can't remember since I wrote this code 15 years ago), but it's failing to read the jar files during this process. So it just assumes that they must be corrupt or otherwise out of date.

Then it enters a repair process where it redownloads the invalid resources (jar files). You can see it doing that here:

2021/12/22 07:23:16:408 INFO Downloading 3 resources [totalBytes=51842967, maxConcurrent=2]
2021/12/22 07:23:16:413 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-extractor.jar, size=1797757]
2021/12/22 07:23:16:413 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-dependencies.jar, size=49509971]
2021/12/22 07:23:16:531 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-common.jar, size=535239]

But the strange thing is that there is no further logging indicating that resources failed to validate, and the next thing we see is:

2021/12/22 07:23:17:312 WARNING Pants! We couldn't get the job done.

Which should only happen _after_ it has tried 5 times to download and revalidate the invalid resources. So it's very strange that it is not reporting that it is trying again if the first attempt failed.

Furthermore, when it is verifying its metadata, it should log some additional information:

        log.info("Verifying application: " + _vappbase);
        log.info("Version: " + _version);
        log.info("Class: " + _class);

and I don't see that in your log. So it seems like things are very strange. Like this log file is incomplete, or somehow something else very strange is going on.


--
You received this message because you are subscribed to the Google Groups "OOO Libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ooo-libs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ooo-libs/8c3ab503-1a5d-46c0-8db4-95e558ecdc45n%40googlegroups.com.


--

Michael Bayne

unread,
Dec 22, 2021, 1:23:47 PM12/22/21
to ooo-...@googlegroups.com
Just for comparison, here is a full log (albeit old but nothing has changed since I ran Getdown this last time I tested it):

2020/01/06 14:14:17:723 INFO Using appdir from command line: target/testapp

2020/01/06 14:14:17:725 INFO ------------------ VM Info ------------------

2020/01/06 14:14:17:725 INFO -- OS Name: Mac OS X

2020/01/06 14:14:17:725 INFO -- OS Arch: x86_64

2020/01/06 14:14:17:725 INFO -- OS Vers: 10.15.2

2020/01/06 14:14:17:725 INFO -- Java Vers: 13.0.1

2020/01/06 14:14:17:725 INFO -- Java Home: /Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home

2020/01/06 14:14:17:725 INFO -- User Name: mdb

2020/01/06 14:14:17:726 INFO -- User Home: /Users/mdb

2020/01/06 14:14:17:726 INFO -- Cur dir: /Users/mdb/projects/getdown/testapp

2020/01/06 14:14:17:726 INFO ---------------------------------------------

2020/01/06 14:14:17:745 INFO Getdown starting [version=1.8.7-SNAPSHOT, built=2020-01-06 14:12]

2020/01/06 14:14:17:746 INFO Checking whether we need to use a proxy...

2020/01/06 14:14:17:923 INFO Attempting to fetch without proxy: https://samskivert.com/code/testapp/getdown.txt

2020/01/06 14:14:18:487 INFO No proxy appears to be needed.

2020/01/06 14:14:18:490 INFO Able to lock for updates: true

2020/01/06 14:14:18:491 INFO Verifying application: https://samskivert.com/code/testapp/

2020/01/06 14:14:18:491 INFO Version: -1

2020/01/06 14:14:18:491 INFO Class: com.threerings.testapp.TestApp

2020/01/06 14:14:18:491 INFO Attempting to refetch 'digest.txt' from 'https://samskivert.com/code/testapp/digest.txt'.

2020/01/06 14:14:18:569 INFO No signing certs, not verifying digest.txt [path=digest.txt]

2020/01/06 14:14:18:569 INFO Attempting to refetch 'digest2.txt' from 'https://samskivert.com/code/testapp/digest2.txt'.

2020/01/06 14:14:18:646 INFO No signing certs, not verifying digest.txt [path=digest2.txt]

2020/01/06 14:14:18:979 INFO Verified resources [count=9, alreadyValid=0, size=25473k, duration=332ms]

2020/01/06 14:14:18:980 INFO Nothing to install.

2020/01/06 14:14:18:982 INFO Didn't find any custom environment variables, not setting any.

2020/01/06 14:14:18:982 INFO Running /Library/Java/JavaVirtualMachines/jdk-13.0.1.jdk/Contents/Home/bin/java

  -classpath

  /Users/mdb/projects/getdown/testapp/target/testapp/testapp.jar:/Users/mdb/projects/getdown/testapp/target/testapp/getdown-new.jar:/Users/mdb/projects/getdown/testapp/target/testapp/extras

  -Xdock:icon=/Users/mdb/projects/getdown/testapp/target/testapp/../desktop.icns

  -Xdock:name=Getdown Test App

  -Dcom.threerings.getdown=true

  -Dusername=\mdb

  -DJSP_OSNAME="Windows 7"

  com.threerings.testapp.TestApp

  /Users/mdb/projects/getdown/testapp/target/testapp


So a lot of information is missing from your log file. You can see the expected verification logging here:

2020/01/06 14:14:18:491 INFO Verifying application: https://samskivert.com/code/testapp/

2020/01/06 14:14:18:491 INFO Version: -1

2020/01/06 14:14:18:491 INFO Class: com.threerings.testapp.TestApp

2020/01/06 14:14:18:491 INFO Attempting to refetch 'digest.txt' from 'https://samskivert.com/code/testapp/digest.txt'.


before it starts into verifying and redownloading.

Perhaps you only sent the very end of your log file, after it had tried and failed five times to redownload and reverify your resources. In which case the problem is once again that somehow it is failing to download valid jar files and something is corrupting the files on the way to the computer. Maybe the computer has a virus that is tampering with files as they're written to the file system? Maybe it's downloading them through a proxy that is somehow corrupting the data? Maybe the harddrive is full on the target computer (unlikely since that usually fails in a different way which we detect and report). These are unlikely, but there's nothing special about what Getdown is doing (download a jar file and then compute a hash based on its contents) that would cause it to go wrong. Getdown has downloaded and verified millions if not billions of jar files, so I would be quite surprised if somehow there was some failure in this very basic part of its functionality. Not impossible, but I don't know where it might be going wrong.

--

Mat Broughton

unread,
Dec 22, 2021, 1:44:38 PM12/22/21
to OOO Libs

Hello Michael,

Massive thanks for the response.  Yeah, this was all working for me for a few years (or so I thought) and now due to this bloody log4j shell issue (which is only a minor threat in a very small client side swing application that opens no ports and isn't accessible to the internet!) I was forced to double check and it seems to be failing - when i could really do with it working. Sods law!

I guess over the years the appbase  jars have changed and got larger.  The getdown.txt hasn't altered for ages  One is an uber/shaded .jar 48mb (that has the log4j2 package) that I wanted to update.    jar -xf seems to unpack them all locally ok (although it does take a while so not sure if that could cause an issue).

The jar sizes look ok, but the weird warnings about the jars (they are also signed) does seem to indicate that is the issue somehow.  The appbase is by default in an exploded war file in Tomcat, but maybe the hash from the contents of the jar files is throwing things awry due to size?

Another log is at the bottom.

I did try trimming down the getdown.txt file to just the one ubder gemini-dependencies jar and did get it to work but it seemed a bit hit and miss.


The get down file:

# The URL from which the client is downloaded.  Will be changed when gemini app first configured (property gemini-external-extractor-url).
appbase = http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/

# UI Configuration - name of download page should be set.  Defaults to Gemini (property gemini-external-extractor-name)
# background image should be 500 wide * 200 high - or otherwise change ui.progress and ui.status to match -
# relative to top left.  The ui.error_background will be displayed if there is an issue with code download
ui.name = GEMTEST_2.7
ui.background = FFFFFF
ui.background_image = img/upgrade-gemini.png
ui.error_background = img/upgrade-gemini-error.png
ui.icon = img/gemini-logo.ico
ui.progress = 20, 20, 460, 20
ui.progress_bar = 000000
ui.progress_text = FFFFFF
ui.status = 20, 80, 460, 40
ui.status_text = FFFFFF


# Application class path files - first the extractor images need to be on class path
code = img/gemini-tray.png
code = img/gemini-tray-extracting.png
code = img/gemini-extractor.png
# and then the .jar files
code = lib/gemini-common.jar
code = lib/gemini-dependencies.jar
code = lib/gemini-extractor.jar
code = lib/gemini-native.jar

# if we need to update the getdown jar itself add it here.  The old jar was called getdown.jar, the new
# from Gemini 2.4 on (and getdown1.8+) is getdown-launcher.jar
code = lib/getdown-launcher.jar


# This image is used for ui.background_image - not needed on classpath neither is the desktop icon
resource = img/upgrade-gemini.png
resource = img/upgrade-gemini-error.png
resource = img/gemini-logo.ico
# and any .bat files in the extractor folder
resource = repair.bat

# Fine to carry on running if we can't access the 'code' updates
allow_offline = true

# The main entry point for the application
class = com.hpdsoftware.gemini.extractor.WindowsExtractor

# Arguments - the order is important. Load gemini-extractor.properties first
# Getdown puts all the 'code' attributes on classpath.  Not possible to specify additional jvmarg class path so
# the property file in the conf folder is passed through.
apparg = extractor-properties-path=%APPDIR%\config\gemini-extractor.properties
apparg = jnlp.instruction=startup
apparg = appdir=%APPDIR%

# Requires at least this java version - if that isn't what is installed will upgrade to the jre in java_windows.zip
# found at appbase/resources/java_windows.zip - the default embedded jre from gemini 2.4 on is 1.8.022
java_min_version = 1080222
java_local_dir = java_vm
java_location = [windows] resources/java_windows.zip

and the log

2021/12/22 07:23:11:163 INFO Using appdir from command line: extractor
2021/12/22 07:23:11:166 INFO ------------------ VM Info ------------------
2021/12/22 07:23:11:166 INFO -- OS Name: Windows 10
2021/12/22 07:23:11:166 INFO -- OS Arch: x86
2021/12/22 07:23:11:166 INFO -- OS Vers: 10.0
2021/12/22 07:23:11:166 INFO -- Java Vers: 1.8.0_222
2021/12/22 07:23:11:166 INFO -- Java Home: C:\Gemini_Connector_776\extractor\java
2021/12/22 07:23:11:166 INFO -- User Name: matb
2021/12/22 07:23:11:166 INFO -- User Home: C:\Users\matb
2021/12/22 07:23:11:166 INFO -- Cur dir: C:\Gemini_Connector_776
2021/12/22 07:23:11:166 INFO ---------------------------------------------
2021/12/22 07:23:11:671 INFO Getdown starting [version=1.8.1, built=2018-11-26 14:46]
2021/12/22 07:23:11:680 INFO Failed to find proxy settings in Windows registry [error=java.lang.UnsatisfiedLinkError: no jRegistryKey in java.library.path]
2021/12/22 07:23:11:683 INFO ---------------- Proxy Info -----------------
2021/12/22 07:23:11:683 INFO -- Proxy Host: null
2021/12/22 07:23:11:683 INFO -- Proxy Port: null
2021/12/22 07:23:11:683 INFO ---------------------------------------------
2021/12/22 07:23:11:752 INFO Able to lock for updates: true
2021/12/22 07:23:11:754 INFO Checking Java version [current=1080222, wantMin=1080222, wantMax=0]
2021/12/22 07:23:11:840 INFO Verifying application: http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/
2021/12/22 07:23:11:841 INFO Version: -1
2021/12/22 07:23:11:841 INFO Class: com.hpdsoftware.gemini.extractor.WindowsExtractor
2021/12/22 07:23:11:845 INFO Dropping status 'm.validating'.
2021/12/22 07:23:11:847 INFO Attempting to refetch 'digest.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest.txt'.
2021/12/22 07:23:11:913 INFO No signing certs, not verifying digest.txt [path=digest.txt]
2021/12/22 07:23:11:919 INFO Attempting to refetch 'digest2.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest2.txt'.
2021/12/22 07:23:11:933 INFO No signing certs, not verifying digest.txt [path=digest2.txt]
2021/12/22 07:23:11:939 INFO Unversioned digest changed. Revalidating...
2021/12/22 07:23:11:978 INFO Resource failed digest check [rsrc=lib/gemini-extractor.jar, error=java.util.zip.ZipException: invalid CEN header (bad signature)]
2021/12/22 07:23:12:043 INFO Resource failed digest check [rsrc=lib/gemini-common.jar, error=java.util.zip.ZipException: invalid distance too far back]
2021/12/22 07:23:12:165 WARNING Error loading icon image [path=img/gemini-logo.ico]
2021/12/22 07:23:12:165 WARNING Failed to load any icons [iconImages=[img/gemini-logo.ico]]
2021/12/22 07:23:12:218 INFO Resource failed digest check [rsrc=lib/gemini-dependencies.jar, error=java.util.zip.ZipException: invalid stored block lengths]
2021/12/22 07:23:12:219 INFO Verified resources [count=12, size=51373k, duration=258ms]
2021/12/22 07:23:12:220 INFO 3 of 12 rsrcs require update (0 assumed valid).
2021/12/22 07:23:12:251 INFO Downloading 3 resources [totalBytes=51842967, maxConcurrent=2]
2021/12/22 07:23:12:280 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-extractor.jar, size=1797757]
2021/12/22 07:23:12:287 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-dependencies.jar, size=49509971]
2021/12/22 07:23:12:404 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-common.jar, size=535239]
2021/12/22 07:23:13:189 INFO Checking Java version [current=1080222, wantMin=1080222, wantMax=0]
2021/12/22 07:23:13:189 INFO Verifying application: http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/
2021/12/22 07:23:13:190 INFO Version: -1
2021/12/22 07:23:13:190 INFO Class: com.hpdsoftware.gemini.extractor.WindowsExtractor
2021/12/22 07:23:13:191 INFO Attempting to refetch 'digest.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest.txt'.
2021/12/22 07:23:13:200 INFO No signing certs, not verifying digest.txt [path=digest.txt]
2021/12/22 07:23:13:204 INFO Attempting to refetch 'digest2.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest2.txt'.
2021/12/22 07:23:13:213 INFO No signing certs, not verifying digest.txt [path=digest2.txt]
2021/12/22 07:23:13:223 INFO Resource failed digest check [rsrc=lib/gemini-extractor.jar, error=java.util.zip.ZipException: invalid CEN header (bad signature)]
2021/12/22 07:23:13:225 INFO Resource failed digest check [rsrc=lib/gemini-common.jar, error=java.util.zip.ZipException: invalid distance too far back]
2021/12/22 07:23:13:269 INFO Resource failed digest check [rsrc=lib/gemini-dependencies.jar, error=java.util.zip.ZipException: invalid distance too far back]
2021/12/22 07:23:13:269 INFO Verified resources [count=12, size=51373k, duration=49ms]
2021/12/22 07:23:13:269 INFO 3 of 12 rsrcs require update (8 assumed valid).
2021/12/22 07:23:13:283 INFO Downloading 3 resources [totalBytes=51842967, maxConcurrent=2]
2021/12/22 07:23:13:289 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-dependencies.jar, size=49509971]
2021/12/22 07:23:13:289 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-extractor.jar, size=1797757]
2021/12/22 07:23:13:778 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-common.jar, size=535239]
2021/12/22 07:23:14:195 INFO Checking Java version [current=1080222, wantMin=1080222, wantMax=0]
2021/12/22 07:23:14:195 INFO Verifying application: http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/
2021/12/22 07:23:14:195 INFO Version: -1
2021/12/22 07:23:14:195 INFO Class: com.hpdsoftware.gemini.extractor.WindowsExtractor
2021/12/22 07:23:14:197 INFO Attempting to refetch 'digest.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest.txt'.
2021/12/22 07:23:14:204 INFO No signing certs, not verifying digest.txt [path=digest.txt]
2021/12/22 07:23:14:208 INFO Attempting to refetch 'digest2.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest2.txt'.
2021/12/22 07:23:14:216 INFO No signing certs, not verifying digest.txt [path=digest2.txt]
2021/12/22 07:23:14:227 INFO Resource failed digest check [rsrc=lib/gemini-common.jar, error=java.util.zip.ZipException: invalid CEN header (bad signature)]
2021/12/22 07:23:14:233 INFO Resource failed digest check [rsrc=lib/gemini-extractor.jar, error=java.util.zip.ZipException: error in opening zip file]
2021/12/22 07:23:14:283 INFO Resource failed digest check [rsrc=lib/gemini-dependencies.jar, error=java.util.zip.ZipException: invalid distance too far back]
2021/12/22 07:23:14:283 INFO Verified resources [count=12, size=51373k, duration=60ms]
2021/12/22 07:23:14:284 INFO 3 of 12 rsrcs require update (16 assumed valid).
2021/12/22 07:23:14:300 INFO Downloading 3 resources [totalBytes=51842967, maxConcurrent=2]
2021/12/22 07:23:14:306 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-extractor.jar, size=1797757]
2021/12/22 07:23:14:306 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-dependencies.jar, size=49509971]
2021/12/22 07:23:14:505 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-common.jar, size=535239]
2021/12/22 07:23:15:249 INFO Checking Java version [current=1080222, wantMin=1080222, wantMax=0]
2021/12/22 07:23:15:250 INFO Verifying application: http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/
2021/12/22 07:23:15:250 INFO Version: -1
2021/12/22 07:23:15:250 INFO Class: com.hpdsoftware.gemini.extractor.WindowsExtractor
2021/12/22 07:23:15:252 INFO Attempting to refetch 'digest.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest.txt'.
2021/12/22 07:23:15:260 INFO No signing certs, not verifying digest.txt [path=digest.txt]
2021/12/22 07:23:15:265 INFO Attempting to refetch 'digest2.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest2.txt'.
2021/12/22 07:23:15:272 INFO No signing certs, not verifying digest.txt [path=digest2.txt]
2021/12/22 07:23:15:284 INFO Resource failed digest check [rsrc=lib/gemini-extractor.jar, error=java.lang.IllegalArgumentException: MALFORMED]
2021/12/22 07:23:15:286 INFO Resource failed digest check [rsrc=lib/gemini-common.jar, error=java.util.zip.ZipException: error in opening zip file]
2021/12/22 07:23:15:324 INFO Resource failed digest check [rsrc=lib/gemini-dependencies.jar, error=java.util.zip.ZipException: invalid literal/length code]
2021/12/22 07:23:15:325 INFO Verified resources [count=12, size=51373k, duration=47ms]
2021/12/22 07:23:15:326 INFO 3 of 12 rsrcs require update (24 assumed valid).
2021/12/22 07:23:15:341 INFO Downloading 3 resources [totalBytes=51842967, maxConcurrent=2]
2021/12/22 07:23:15:347 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-dependencies.jar, size=49509971]
2021/12/22 07:23:15:348 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-extractor.jar, size=1797757]
2021/12/22 07:23:15:511 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-common.jar, size=535239]
2021/12/22 07:23:16:311 INFO Checking Java version [current=1080222, wantMin=1080222, wantMax=0]
2021/12/22 07:23:16:311 INFO Verifying application: http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/
2021/12/22 07:23:16:311 INFO Version: -1
2021/12/22 07:23:16:311 INFO Class: com.hpdsoftware.gemini.extractor.WindowsExtractor

2021/12/22 07:23:16:313 INFO Attempting to refetch 'digest.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest.txt'.
2021/12/22 07:23:16:323 INFO No signing certs, not verifying digest.txt [path=digest.txt]
2021/12/22 07:23:16:327 INFO Attempting to refetch 'digest2.txt' from 'http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/digest2.txt'.
2021/12/22 07:23:16:334 INFO No signing certs, not verifying digest.txt [path=digest2.txt]
2021/12/22 07:23:16:348 INFO Resource failed digest check [rsrc=lib/gemini-common.jar, error=java.util.zip.ZipException: invalid code lengths set]
2021/12/22 07:23:16:353 INFO Resource failed digest check [rsrc=lib/gemini-extractor.jar, error=java.util.zip.ZipException: error in opening zip file]
2021/12/22 07:23:16:391 INFO Resource failed digest check [rsrc=lib/gemini-dependencies.jar, error=java.util.zip.ZipException: invalid literal/length code]
2021/12/22 07:23:16:391 INFO Verified resources [count=12, size=51373k, duration=50ms]
2021/12/22 07:23:16:392 INFO 3 of 12 rsrcs require update (32 assumed valid).
2021/12/22 07:23:16:408 INFO Downloading 3 resources [totalBytes=51842967, maxConcurrent=2]
2021/12/22 07:23:16:413 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-extractor.jar, size=1797757]
2021/12/22 07:23:16:413 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-dependencies.jar, size=49509971]
2021/12/22 07:23:16:531 INFO Downloading resource [url=http://10.234.101.82:12897/GEMTEST_2.7-external/extractor/lib/gemini-common.jar, size=535239]
2021/12/22 07:23:17:312 WARNING Pants! We couldn't get the job done.
2021/12/22 07:23:17:312 WARNING getdown() failed. [java.io.IOException: m.unable_to_repair=<toString() failure: java.lang.ArrayIndexOutOfBoundsException: 1>]
java.io.IOException: m.unable_to_repair
        at com.threerings.getdown.launcher.Getdown.getdown(Unknown Source)
        at com.threerings.getdown.launcher.Getdown.run(Unknown Source)
2021/12/22 07:23:17:315 INFO Releasing lock

Mat Broughton

unread,
Dec 22, 2021, 1:51:16 PM12/22/21
to OOO Libs
The jars work and function fine as I can re-install the app  (without using getdown) and the app runs fine under Java with the very same .jars I am trying to run using getdown, Just googling the invalid literal/length code  and invalid code lengths to try and work out what it thinks the issue is!

Michael Bayne

unread,
Dec 22, 2021, 4:25:21 PM12/22/21
to ooo-...@googlegroups.com
Yeah, looking at the full log, it doesn't look like anything is out of the ordinary, except that Getdown is downloading .jar files that are somehow corrupt or trigger problems with the ZipInputStream that it uses to compute the digest.

Is it possible that you made the jars with a newer version of Java and that ancient Java 1.8 is struggling to understand them? It seems unlikely if you can use that same Java to run the app directly without Getdown doing anything.

It is unlikely that the size of the jar files is causing any problems. We used some pretty big jar files in the past, and I think other projects have used very large jar files. I don't know of any bugs in the Java Zip implementation that would manifest unless maybe the jar file size exceeded like 4GB or something.

Getdown just uses Java's standard ZipFile API to read the .jar files and passes all the data of the individual files through a MessageDigest to create the hash for the jar.

The code is pretty simple:

                ZipFile zip = new ZipFile(target);
                List<? extends ZipEntry> entries = Collections.list(zip.entries());
                Collections.sort(entries, ENTRY_COMP);

                int eidx = 0;
                for (ZipEntry entry : entries) {
                    // old versions of the digest code skipped metadata
                    if (version < 2) {
                        if (entry.getName().startsWith("META-INF")) {
                            updateProgress(obs, eidx, entries.size());
                            continue;
                        }
                    }

                    try (InputStream in = zip.getInputStream(entry)) {
                        while ((read = in.read(buffer)) != -1) {
                            md.update(buffer, 0, read);
                        }
                    }

                    updateProgress(obs, eidx, entries.size());
                }

Then it closes the zip file and moves on, but it never gets to that point. It's getting errors from the Java zip reader while it's reading data and passing it to the MessageDigest.

Sorry I have no other clues. Somehow the Java zip decoder can't read these files, but whatever Java uses to read jar files is OK with it.



--
Reply all
Reply to author
Forward
0 new messages