Skip to content

File descriptor leak of type 'PIPE' when 'net/http' used to do a GET #2326

Closed
@jsgoecke

Description

@jsgoecke

It appears that under OSX when I open a socket and it then closes (either through a :read_timeout, or sccuessful read) it is leaking a PIPE file descriptor. When done on Linux it does both 'PIPE' and 'eventpoll'.

I am doing something like this in JRuby-1.7.17:

require 'net/http'
require 'uri'

uri = URI.parse("http://google.com/")
response = Net::HTTP.get_response(uri)

And then I get this before running the script:

lsof | grep ruby | grep PIPE
server-7:~ jsgoecke$ 

And then after running the script:

lsof | grep java | grep PIPE
java      31764 jsgoecke   17     PIPE 0x89af0ee9adc4b601      16384          ->0x89af0ee99b775441
java      31764 jsgoecke   18     PIPE 0x89af0ee99b775441      16384          ->0x89af0ee9adc4b601

I did find this issue:

#221

And tried running the Java GC manually with:

require 'jruby'

JRuby.gc

But the FDs seem to hang around.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions