Bug 1122779
Summary: | [GSS] (6.3.1) DataSourceProvider does not delete the temporary files it creates | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Kyle Lape <klape> |
Component: | RESTEasy | Assignee: | Weinan Li <weli> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Katerina Odabasi <kanovotn> |
Severity: | urgent | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3.0 | CC: | bbaranow, bmaxwell, kanovotn, klape, rdickens, weli, wsiqueir |
Target Milestone: | CR1 | Keywords: | Triaged |
Target Release: | EAP 6.3.1 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Known Issue | |
Doc Text: |
The `DataSourceProvider` (org.jboss.resteasy.plugins.providers.DataSourceProvider.readDataSource(InputStream, MediaType)) creates a temporary file named `resteasy-provider-datasource ... .tmp` when reading more then 4096 bytes. However, it does not delete the created temporary file itself nor does it provide a facility to do so, resulting in a resource leak. This issue is under investigation and is expected to be resolved in the next release.
|
Story Points: | --- |
Clone Of: | 1113338 | Environment: | |
Last Closed: | 2014-10-13 18:37:56 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1113338 | ||
Bug Blocks: | 1102082, 1105695 |
Description
Kyle Lape
2014-07-24 04:31:26 UTC
The file is now marked for deletion at the shut down of the JVM. In addition, the file is deleted immediately once the input stream has reached the end. While this commit improvies the behavior of RESTEasy, it does not completely eliminate the potential of a build-up of temporary files. If a endpoint does not fully consume attachments, then they won't be deleted until the JVM is restarted, which could be a long time. A potential workaround is to create an EJB timer to delete these files periodically. I wrote such an EJB here: https://github.com/kylape/resteasy-datasource-cleaner Currently waiting for the upstream PRs to be merged. Upstream trunk merged: https://github.com/resteasy/Resteasy/pull/532 @Kyle, could you please create a PR for Branch_2_3 upstream also? I'll merge this to 2.3.8.SP2-redhat for EAP 6.3.1. Upgrading RESTEasy to 2.3.8.SP2 solves the problem: https://github.com/jbossas/jboss-eap/pull/1557/files Hi Weinan, I didn't see this commit in the 2.3.8.SP2 branch. Can you please double check it made the build? My apologies if I was supposed to push the commit myself. Thanks. (In reply to Kyle Lape from comment #7) > Hi Weinan, I didn't see this commit in the 2.3.8.SP2 branch. Can you > please double check it made the build? My apologies if I was supposed to > push the commit myself. Thanks. Seems like I forgot to push my changes. I'll ask Dustin to rebuild a -redhat-2 to include it. Assigned since commit did not make it. Needs respin of redhat-2. Thanks Kyle. Verified in EAP 6.3.1.CP.CR1. Kyle Lape <kyle.lape> updated the status of jira RESTEASY-1080 to Resolved Alessio Soldano <asoldano> updated the status of jira RESTEASY-1080 to Closed |