NativeBinaryLoader: attempt to fix StackOverflowExceptions from Over Stacked Loading Retries#38
Merged
pavly-gerges merged 5 commits intomasterfrom Mar 11, 2025
Merged
Conversation
added 2 commits
March 10, 2025 17:39
Member
Author
|
This is a test to the new API: SEVERE: Cannot load the dynamic library: /media/pavl/pavl-g/Projects/jSnapLoader/snaploader-examples/libs/Linux/amd64/libjmealloc.so
java.lang.UnsatisfiedLinkError: /media/pavl/pavl-g/Projects/jSnapLoader/snaploader-examples/libs/Linux/amd64/libjmealloc.so: /media/pavl/pavl-g/Projects/jSnapLoader/snaploader-examples/libs/Linux/amd64/libjmealloc.so: file too short
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2404)
at java.base/java.lang.Runtime.load0(Runtime.java:817)
at java.base/java.lang.System.load(System.java:2015)
at electrostatic4j.snaploader.NativeBinaryLoader.loadBinary(NativeBinaryLoader.java:264)
at electrostatic4j.snaploader.NativeBinaryLoader$1.onExtractionCompleted(NativeBinaryLoader.java:316)
at electrostatic4j.snaploader.filesystem.FileExtractor.extract(FileExtractor.java:149)
at electrostatic4j.snaploader.filesystem.ConcurrentFileExtractor.extract(ConcurrentFileExtractor.java:72)
at electrostatic4j.snaploader.NativeBinaryLoader.cleanExtractBinary(NativeBinaryLoader.java:357)
at electrostatic4j.snaploader.NativeBinaryLoader.loadBinary(NativeBinaryLoader.java:288)
at electrostatic4j.snaploader.NativeBinaryLoader$1.onExtractionCompleted(NativeBinaryLoader.java:316)
at electrostatic4j.snaploader.filesystem.FileExtractor.extract(FileExtractor.java:149)
at electrostatic4j.snaploader.filesystem.ConcurrentFileExtractor.extract(ConcurrentFileExtractor.java:72)
at electrostatic4j.snaploader.NativeBinaryLoader.cleanExtractBinary(NativeBinaryLoader.java:357)
at electrostatic4j.snaploader.NativeBinaryLoader.loadBinary(NativeBinaryLoader.java:288)
at electrostatic4j.snaploader.NativeBinaryLoader.loadLibrary(NativeBinaryLoader.java:163)
at electrostatic4j.snaploader.examples.TestRetryExhaustionException.main(TestRetryExhaustionException.java:79)
Mar 11, 2025 7:00:30 AM electrostatic4j.snaploader.NativeBinaryLoader$1 cleanExtractBinary
SEVERE: Error while loading the binary!
electrostatic4j.snaploader.throwable.LoadingRetryExhaustionException: Library loading retries exceeded the maximum!
at electrostatic4j.snaploader.NativeBinaryLoader.loadBinary(NativeBinaryLoader.java:284)
at electrostatic4j.snaploader.NativeBinaryLoader$1.onExtractionCompleted(NativeBinaryLoader.java:316)
at electrostatic4j.snaploader.filesystem.FileExtractor.extract(FileExtractor.java:149)
at electrostatic4j.snaploader.filesystem.ConcurrentFileExtractor.extract(ConcurrentFileExtractor.java:72)
at electrostatic4j.snaploader.NativeBinaryLoader.cleanExtractBinary(NativeBinaryLoader.java:357)
at electrostatic4j.snaploader.NativeBinaryLoader.loadBinary(NativeBinaryLoader.java:288)
at electrostatic4j.snaploader.NativeBinaryLoader$1.onExtractionCompleted(NativeBinaryLoader.java:316)
at electrostatic4j.snaploader.filesystem.FileExtractor.extract(FileExtractor.java:149)
at electrostatic4j.snaploader.filesystem.ConcurrentFileExtractor.extract(ConcurrentFileExtractor.java:72)
at electrostatic4j.snaploader.NativeBinaryLoader.cleanExtractBinary(NativeBinaryLoader.java:357)
at electrostatic4j.snaploader.NativeBinaryLoader.loadBinary(NativeBinaryLoader.java:288)
at electrostatic4j.snaploader.NativeBinaryLoader.loadLibrary(NativeBinaryLoader.java:163)
at electrostatic4j.snaploader.examples.TestRetryExhaustionException.main(TestRetryExhaustionException.java:79)
BUILD SUCCESSFUL in 2s
4 actionable tasks: 1 executed, 3 up-to-date |
added 3 commits
March 11, 2025 07:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This issue was introducing potential memory leaks on failure of the stack memory to accomodate the overstacked calls to the
loadBinary()andcleanExtractBinary()stacks.The issue #32. happens commonly as a result of attempting to extract an originally-shipped corrupted binary or trying to load a non-binary file, in either ways the function pointer table is broken.