JRuby and open-uri File handle issue
------------------------------------

                 Key: JRUBY-4767
                 URL: http://jira.codehaus.org/browse/JRUBY-4767
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.4, JRuby 1.5.0.RC2
         Environment: RHEL 5.4, Centos 5
            Reporter: Homer Simpson
            Assignee: Thomas E Enebo


We noticed a build up of unreleased file handles for the tomcat user when 
running Rails with JRuby (Warbler war) on Tomcat.

The handles building up look like this (using lsof):
java    20153 tomcat   95r  FIFO                0,6          12572360
pipe
java    20153 tomcat   99w  FIFO                0,6          12572360
pipe
java    20153 tomcat  100r  0000               0,11        0 12572361
eventpoll

There are always 2 pipe entries for every 1 eventpoll entry.  These handles 
never go away until we restart Tomcat.

I have pinpointed the functionality causing the issue and created a simple test 
case script that can be run outside of Rails and Tomcat that duplicates the 
problem.

When I run the script below with plain Ruby those handles are not stuck (while 
on the read line)

When I run it with Jruby (tested 1.4.0 and 1.5.0RC2) I see the handles stuck 
until I terminate the script.

Here is the script:
require 'open-uri'

x = open("http://www.google.com";)
puts x.read
x.close
x = nil
puts STDIN.read







-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to