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

FiberError, ThreadError on JDK 1.7, JRuby 1.7.8, Rails 3.2.14, CentOS 6.4, using HTTP Streaming #1243

Closed
glendonmccreary opened this issue Nov 20, 2013 · 1 comment

Comments

@glendonmccreary
Copy link

I have a Rails 3.2.14 application that's using http streaming that was working fine with the combination of:
JDK 1.6
JRuby 1.7.4
on CentOS 6.4.

We wanted to upgrade to JDK 1.7, which then resulted in a large number of FiberError exceptions in our local development (Mac OSX 10.9). Upgrading to the latest JRuby resolved the problem in our local environment, but not in our CentOS 6.4 environment.

The code in question is essentially this:

class SomeController < ApplicationController
  ...
  def index
    ...
    render stream: true
  end
end

Commenting out the "render stream: true" makes the FiberErrors and related ThreadErrors disappear, but we'd ideally like to keep streaming on if possible.

We're seeing the following errors with http streaming turned on:

2013-11-19 16:51:08.481 [INFO]  Rendered common/_footer.html.slim (5.0ms) (pid:20813)
2013-11-19 16:51:08.483 [FATAL] FiberError (dead fiber called):
  org/jruby/ext/fiber/ThreadFiber.java:58:in `resume'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/streaming_template_renderer.rb:101:in `delayed_render'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/activesupport-3.2.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/streaming_template_renderer.rb:70:in `delayed_render'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/streaming_template_renderer.rb:56:in `render_template'
  org/jruby/RubyProc.java:290:in `call'
  org/jruby/RubyProc.java:271:in `call'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/streaming_template_renderer.rb:23:in `each'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rack-1.4.5/lib/rack/chunked.rb:23:in `each'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_dispatch/http/response.rb:44:in `each'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_dispatch/http/response.rb:115:in `body'
  /data/jenkins/workspace/JRuby JDK Upgrade/spec/controllers/search_controller_spec.rb:26:in `(root)'
  org/jruby/RubyBasicObject.java:1536:in `instance_eval'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example.rb:114:in `run'
  org/jruby/RubyProc.java:290:in `call'
  org/jruby/RubyProc.java:271:in `call'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-rails-2.13.2/lib/rspec/rails/example/controller_example_group.rb:160:in `ControllerExampleGroup'
  org/jruby/RubyBasicObject.java:1565:in `instance_exec'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example.rb:247:in `instance_eval_with_args'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/hooks.rb:87:in `run'
  org/jruby/RubyProc.java:290:in `call'
  org/jruby/RubyProc.java:271:in `call'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/hooks.rb:85:in `run'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/hooks.rb:418:in `run_hook'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:329:in `run_around_each_hooks'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example.rb:256:in `with_around_each_hooks'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example.rb:111:in `run'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:390:in `run_examples'
  org/jruby/RubyArray.java:2400:in `collect'
  org/jruby/RubyArray.java:2413:in `map'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:386:in `run_examples'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:371:in `run'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:372:in `run'
  org/jruby/RubyArray.java:2400:in `collect'
  org/jruby/RubyArray.java:2413:in `map'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:372:in `run'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:28:in `run'
  org/jruby/RubyArray.java:2400:in `collect'
  org/jruby/RubyArray.java:2413:in `map'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:28:in `run'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/reporter.rb:34:in `report'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:25:in `run'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `autorun'
  org/jruby/RubyProc.java:290:in `call'
  org/jruby/RubyProc.java:228:in `call' (pid:20813)
2013-11-19 16:52:13.668 [INFO]  Rendered common/_footer.html.slim (5.0ms) (pid:20844)
2013-11-19 16:52:13.670 [INFO]  Rendered search/index.html.slim within layouts/application (812.0ms) (pid:20844)
2013-11-19 16:52:13.670 [FATAL] ThreadError (queue shut down):
  org/jruby/ext/thread/SizedQueue.java:121:in `push'
  org/jruby/ext/fiber/ThreadFiber.java:82:in `resume'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/streaming_template_renderer.rb:101:in `delayed_render'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/activesupport-3.2.14/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/activesupport-3.2.14/lib/active_support/notifications.rb:123:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/abstract_renderer.rb:38:in `instrument'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/streaming_template_renderer.rb:70:in `delayed_render'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/streaming_template_renderer.rb:56:in `render_template'
  org/jruby/RubyProc.java:290:in `call'
  org/jruby/RubyProc.java:271:in `call'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_view/renderer/streaming_template_renderer.rb:23:in `each'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rack-1.4.5/lib/rack/chunked.rb:23:in `each'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/actionpack-3.2.14/lib/action_dispatch/http/response.rb:44:in `each'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rack-1.4.5/lib/rack/body_proxy.rb:31:in `each'
  /var/lib/jenkins/.bundle/jruby/1.9/gems/rack-1.4.5/lib/rack/handler/webrick.rb:71:in `service'
  /var/lib/jenkins/.rvm/rubies/jruby-1.7.8/lib/ruby/1.9/webrick/httpserver.rb:138:in `service'
  /var/lib/jenkins/.rvm/rubies/jruby-1.7.8/lib/ruby/1.9/webrick/httpserver.rb:94:in `run'
  /var/lib/jenkins/.rvm/rubies/jruby-1.7.8/lib/ruby/1.9/webrick/server.rb:191:in `start_thread'
  org/jruby/RubyProc.java:290:in `call'
  org/jruby/RubyProc.java:228:in `call' (pid:20844)

I'm curious to see if anyone else has experienced similar issues, and what the fix might be for this. Thanks!

dmke added a commit to slim-template/slim that referenced this issue Dec 29, 2014
As of 

- jruby/jruby#1243 and
- jruby/jruby#1789,

there might be a regression in JRuby 1.7.x, while JRuby 9000 works
just fine. 

(Side note: please don't branch off this commit as long there is
an Work-In-Progress tag. I will force push some minor changes
when fiddleing with Travis...)
dmke added a commit to slim-template/slim that referenced this issue Dec 30, 2014
As of

- jruby/jruby#1243 and
- jruby/jruby#1789,

there might be a regression in JRuby 1.7.x, while JRuby 9000 works
just fine.
dmke added a commit to slim-template/slim that referenced this issue Jan 4, 2015
As of

- jruby/jruby#1243 and
- jruby/jruby#1789,

there might be a regression in JRuby 1.7.x, while JRuby 9000 works
just fine.
dmke added a commit to slim-template/slim that referenced this issue Jan 30, 2015
As of

- jruby/jruby#1243 and
- jruby/jruby#1789,

there might be a regression in JRuby 1.7.x, while JRuby 9000 works
just fine.
@enebo enebo added this to the Invalid or Duplicate milestone May 11, 2016
@enebo
Copy link
Member

enebo commented May 11, 2016

Sorry there has been no interaction from us ever in this bug and I feel guilty in closing this one...If it is still a problem then please re-open. I guess we probably need a more concrete way of reproducing this (bonus if it is minimal) to move further on solving it.

@enebo enebo closed this as completed May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants