Skip to content
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

Return the memory allocated by Direct Buffer to the OS without waitin… #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ykwyuta
Copy link

@ykwyuta ykwyuta commented Nov 16, 2021

Since Axis did not close the InputStream in the part reading axis2.conf from the classpath, I encountered a problem that the Direct Buffer was not released easily and OOM occurred due to lack of memory. Since there is no place that uses InputStream after parsing XML, there should be no problem even if it is closed here.

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2021

Codecov Report

Merging #223 (7851495) into master (e36a6c1) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #223      +/-   ##
==========================================
- Coverage   42.79%   42.78%   -0.01%     
==========================================
  Files        1500     1500              
  Lines      115038   115042       +4     
  Branches    22671    22671              
==========================================
- Hits        49225    49222       -3     
- Misses      58020    58028       +8     
+ Partials     7793     7792       -1     
Impacted Files Coverage Δ
...rg/apache/axis2/deployment/DescriptionBuilder.java 66.12% <50.00%> (-0.22%) ⬇️
...ansport/testkit/tests/misc/MinConcurrencyTest.java 73.13% <0.00%> (-5.98%) ⬇️
...port/http/server/DefaultHttpConnectionManager.java 66.17% <0.00%> (-2.95%) ⬇️
...e/axis2/dispatchers/AddressingBasedDispatcher.java 81.39% <0.00%> (-2.33%) ⬇️
...s2/transport/http/server/HttpServiceProcessor.java 73.07% <0.00%> (-1.93%) ⬇️
...pache/axis2/addressing/AddressingFaultsHelper.java 55.27% <0.00%> (-1.51%) ⬇️
.../org/apache/axis2/addressing/AddressingHelper.java 52.11% <0.00%> (-0.71%) ⬇️
...che/axis2/jaxws/message/databinding/JAXBUtils.java 75.48% <0.00%> (+0.14%) ⬆️
...src/org/apache/axis2/engine/AxisConfiguration.java 70.51% <0.00%> (+0.17%) ⬆️
...ransport/http/impl/httpclient4/HTTPSenderImpl.java 84.78% <0.00%> (+2.17%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e36a6c1...7851495. Read the comment docs.

@veithen
Copy link
Member

veithen commented Dec 19, 2021

I don't think this is the correct solution. It looks like there is code in org.apache.axis2.deployment.repository.util. ArchiveReader that passes a ZipInputStream into DescriptionBuilder, and calling close() would break that code. Unfortunately there is no test coverage for that code, so it's hard to confirm that. I think we have to assume that it's the responsibility of the code instantiating the DescriptionBuilder to close the input stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants