New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration from v3.8.3 to v3.9.3 (3.9.0) gives OutOfMemory Error #712
Comments
Hi Andrew, Thanks for reporting and providing insight! Unfortunately I can't work much these days (I have covid... 🙁), but will look into this as soon as possible! In the mean time, it would be great if you can provide code to reproduce! I introduced new buffered stream classes in 3.9 which seems to cause the problems you see. For my own plugins, testing has shown that they provide better performance than the original JDK streams. But your stack trace indicates using PDFBox and their JBIG2 plugin, which I haven't tested. I guess further digging has to be done to figure out why/what happens... The However, the Again, thanks, I will look into it! |
Hi Harald, thank you for your reply and please get well soon! Yep, it is clear that reproducer is needed and I have also walked through changes in releases after 3.8.3 and saw those updates with introduced new streams. I started working on the reproducer yesterday and good thing that I was able to identify 2 samples which cause OOM. Moreover preliminary seems it is related only to the samples which contain JBIG images (as samples with other image types pass fine). So the next step is actual reproducer with minimum code. This can take a while as I bit busy with other projects, but will do my best to prepare it asap. Thank you! |
Hi @AndrewG10i, Have you been able to look more into this? I understand creating code sample to reproduce might take some time, no worries. I really want to fix this problem, however. In the mean time, perhaps you could upload the memory dump, to see if I can get some more details out of it? Uploading the JBIG sample images that cause OOM would also be helpful, if that's possible. |
Hi @haraldk, Almost done with the reproducer. Code itself is ready, surprisingly it is just few lines. Now trying to find a sample that can be shared, as the one I have - could not be shared. Hopefully will update you shortly today on this! |
I did find a possible way to trigger the OOME today, added a test case and a fix for it. Could happen if someone was searching (far) beyond the end of the stream.
|
Great, thank you for the update! ...on our end we are still requiring some time to reproduce exactly the same exception using sources, as currently getting a bit different exception when using TM source code. Anyway will aim to test it today! |
New release (3.9.4) is out now, if you want to try that. And yes, I was actually a bit surprised that you got the |
Great! Yes, just managed to try with master and also 3.9.4 - reproducer works fine (meaning - no issue reproduced anymore). Will run full test and let you know in case of any issues (hopefully not :-)). |
Describe the bug
First of all - thank you so much for your work and such a great image lib!
We are facing with the following issue and would appreciate if you can help to figure out whether it is related to TwelveMonkeys ImageIO lib, or to something else.
So far it is confirmed that after replacing only one single dependency (TwelveMonkeys ImageIO) from v3.8.3 to v3.9.X (tested 3.9.0 and 3.9.3) we start getting Java Heap Memory Errors while running load-tests which pass absolutely fine using v3.8.3. (Environment, JVM settings, etc - all remains the same in tests, only lib version changes).
Memory dump is available as well for analysis.
Version information
TwelveMonkeys ImageIO library: 3.9.3 (3.9.0 also gives the same issue)
Java:
openjdk version "11.0.14.1" 2022-02-08 LTS
OpenJDK Runtime Environment Zulu11.54+25-CA (build 11.0.14.1+1-LTS)
OpenJDK 64-Bit Server VM Zulu11.54+25-CA (build 11.0.14.1+1-LTS, mixed mode)
Extra information about OS version, server version, standalone program or web application packaging, executable wrapper, etc.
Linux CentOS 8 Stream
To Reproduce
Currently not available but willing to prepare.
Expected behavior
No Java OutOfMemory error to happen the same as with v3.8.3.
Example code
Currently not available but willing to prepare.
Sample file(s)
N/A
Stak trace
Screenshots
Additional context
This is a Java EE application running in Payara Micro.
I do understand that so far there is not much information provided but OutOfMemory error comes after 90-120min of running load/performance tests and so far not investigated much as can be fixed simply by downgrading to 3.8.3. Will highly appreciate any clues how to better approach this issue and open to cooperate on resolving & testing any potential fixes. Thanks!
The text was updated successfully, but these errors were encountered: