Bug 1113338
Summary: | [GSS] (6.4.0) DataSourceProvider does not delete the temporary files it creates | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | William Antônio <wsiqueir> | ||||
Component: | RESTEasy | Assignee: | Weinan Li <weli> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Katerina Odabasi <kanovotn> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | 6.2.2 | CC: | fnasser, kkhan, klape, mkopecky, weli | ||||
Target Milestone: | DR9 | ||||||
Target Release: | EAP 6.4.0 | ||||||
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: | |||||||
: | 1122779 (view as bug list) | Environment: | |||||
Last Closed: | 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: | |||||||
Bug Blocks: | 1118891, 1122779 | ||||||
Attachments: |
|
Description
William Antônio
2014-06-26 01:47:28 UTC
Created attachment 912312 [details]
A test for the product
A maven project to reproduce the issue on EAP.
Kyle Lape <kyle.lape> updated the status of jira RESTEASY-1080 to Coding In Progress 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. Set the requires_doc_text to '-' because this bug targets 6.4 and duplicates the release note text in Bug 1122779, which targets 6.3.1. Upstream Branch_2_3 fixed: master:resteasy-upstream weinanli$ git log 982512d9 commit 982512d99371735d6bce35764962993b0b4a2f98 Author: Kyle Lape <kyle.lape> Date: Thu Jul 24 08:41:20 2014 -0700 [RESTEASY-1080] DataSourceProvider does not delete the temporary files it creates code reference: https://github.com/resteasy/Resteasy/blob/Branch_2_3/resteasy-jaxrs/src/main/java/org/jboss/resteasy/plugins/providers/DataSourceProvider.java#L133 Kyle Lape <kyle.lape> updated the status of jira RESTEASY-1080 to Resolved The fix is not present because resteasy is still in version 2.3.8.Final-redhat-3 not 2.3.9. Verified on EAP 6.4.0.DR9 Alessio Soldano <asoldano> updated the status of jira RESTEASY-1080 to Closed |