just4est / jmxtrans

Automatically exported from code.google.com/p/jmxtrans
0 stars 0 forks source link

RRDToolWriter Has File Handle Leakage #14

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the program setting the output writer to RRDToolWriter long enough

What is the expected output? What do you see instead?
It will hit the limit of the opened files, and the following process creation 
will throw "Too Many Opened Files" exception.

What version of the product are you using? On what operating system?
Using JmxTrans-250 on CentOS 5.5

Please provide any additional information below.

The I/O streams of the created process of running rrdtool should be explicitly 
closed.

Patch file attached:)

Original issue reported on code.google.com by scott_w...@hotmail.com on 15 Nov 2011 at 3:22

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r262.

Original comment by latch...@gmail.com on 15 Nov 2011 at 5:22

GoogleCodeExporter commented 8 years ago
Good catch. Note your patch isn't 100% accurate either as each of those close() 
statements can throw an exception, so you really need to wrap in 
IOUtils.closeQuietly().

Original comment by latch...@gmail.com on 15 Nov 2011 at 5:23

GoogleCodeExporter commented 8 years ago
Yeah thanks for the correction.
This is a really good tool BTW!

Original comment by scott_w...@hotmail.com on 15 Nov 2011 at 5:29