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

YAML Processor leaves StreamDecoder open [SPR-13173] #17765

Closed
spring-projects-issues opened this issue Jun 29, 2015 · 1 comment
Closed

YAML Processor leaves StreamDecoder open [SPR-13173] #17765

spring-projects-issues opened this issue Jun 29, 2015 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jun 29, 2015

Erik Salter opened SPR-13173 and commented

When the YAMLProcessor is closed, it is still leaving a reference to a StreamDecoder instance open. (See UnicodeReader::init()) While Spring’s YamlProcessor closes the underlying input stream, the StreamDecoder (and thus the reference to the YAML and all its loaded references) remain open until the YAML reference is eventually GC’d.

The issue comes in when these references are promoted from new to the old generation. The references are then only collected on a FGC. In the interim, the application can have many open handles (we counted 900+ on a production system that only had 2 FGC cycles)

Attached is a snapshot after the YAMLProcessor closes the stream.


Affects: 4.1.3

Reference URL: #17093

Attachments:

Issue Links:

Referenced from: commits 26acb48, 3d131c9

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

It looks like we'll have to avoid the Yaml.load(InputStream) method altogether, using a loadFromReader call with a custom UnicodeReader handle which we're able to close afterwards...

This is arguably a bug in that Yaml class itself. However, if we can work around so easily, let's try to do that.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants