jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-2941

popen IO lockup with multiple threads

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.1.3
  • Fix Version/s: JRuby 1.2
  • Component/s: Core Classes/Modules
  • Labels:
    None
  • Environment:
    Linux Sun JRE 1.6 amd64
  • Testcase included:
    yes

Description

Running the attached program locks up in first iteration in JRuby but allows thousands of iterations in MRI.

This change works around the issue in JRuby:

— testt.rb 2008-08-21 10:18:07.000000000 +0200
+++ testt.rb~ 2008-08-21 09:03:24.000000000 +0200
@@ -2,7 +2,7 @@
analyzer = IO.popen( 'cat', IO::RDWR )
res = []

  • t = Thread.new( (analyzer),res){|fd,ary|
    + t = Thread.new( (IO::for_fd analyzer.fileno),res){|fd,ary|
    while l = fd.gets do
    STDERR.putc 8
    ary.push l
  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    testt.patch
    21/Aug/08 3:38 AM
    0.3 kB
    Michal Suchanek
  2. File
    testt.rb
    21/Aug/08 3:34 AM
    0.4 kB
    Michal Suchanek

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Michal Suchanek added a comment - 21/Aug/08 3:38 AM

the change as attachment - Jira clobbers patches in comments

Show
Michal Suchanek added a comment - 21/Aug/08 3:38 AM the change as attachment - Jira clobbers patches in comments
Hide
Permalink
Charles Oliver Nutter added a comment - 08/Feb/09 5:08 PM

Works on trunk.

Show
Charles Oliver Nutter added a comment - 08/Feb/09 5:08 PM Works on trunk.

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    Michal Suchanek
Vote (0)
Watch (0)

Dates

  • Created:
    21/Aug/08 3:34 AM
    Updated:
    21/Mar/09 1:14 PM
    Resolved:
    08/Feb/09 5:08 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.