New Relic newrelic_rpm (2.12.0) crashes Rails 2.1.1 on render :inline (incl. test case)

oct's Avatar

oct

08 Jun, 2010 09:24 AM via web

Hi,

In a blank rails project, with a single controller, with a single view that does:

render(:inline => "<%= 'coucou' %>glouet")

This crashes the Rails application immediately if new_relic is enabled with the following stack:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]

/usr/lib/ruby/gems/1.8/gems/newrelic_rpm-2.12.1/lib/new_relic/agent/method_tracer.rb:314:in `render'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/template.rb:22:in `render_template'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/base.rb:286:in `render_template'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:877:in `render_with_no_layout'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/layout.rb:259:in `render_without_benchmark'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:51:in `render'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:51:in `render'
app/controllers/pipo_controller.rb:3:in `view'

The attached tgz provides this application (the newrelic.yml file has been removed).

Right now, this issue prevents us from using New Relic correctly on the fotopedia servers, we consider this issue to be urgent.

Thank you very much for you assistance !
-- Pierre.

  1. Support Staff 2 Posted by Bjorn Freeman-Benson on 08 Jun, 2010 03:06 PM

    Bjorn Freeman-Benson's Avatar

    Sorry about that. I've forwarded the issue to one of the agent engineers, but they are all at RailsConf this week so his answer might be slightly delayed. In the meantime, could you either get the latest copy of the agent (using "script/plugin install http://newrelic.rubyforge.org/svn/newrelic_rpm") or let us know what version of the agent you are using?

    • Bjorn
  2. 3 Posted by oct on 08 Jun, 2010 03:10 PM

    oct's Avatar

    Hello Bjorn,

    Thanks for the assistance, we're currently using:

    newrelic_rpm (2.12.0)

    (we just bumped the version, IIRC). I'd rather keep on using the gem, especially on a production server.

    Cheers,
    -- Pierre.

  3. Support Staff 4 Posted by Bill Kayser on 08 Jun, 2010 03:15 PM

    Bill Kayser's Avatar

    Hi Pierre. I'm at Railsconf right now but I'll see if I can get out 2.12.1 with a fix ASAP.

    Thanks for reporting, and thanks for the test case. I'll keep you posted.

  4. Support Staff 5 Posted by Bill Kayser on 08 Jun, 2010 07:26 PM

    Bill Kayser's Avatar

    Pierre I found the bug, have a unit test for it. I'll have a fix shortly. Can you wait for a couple days for QA, or would you like early access?

  5. 6 Posted by oct on 08 Jun, 2010 08:48 PM

    oct's Avatar

    I can wait, sure :)
    Thank you !

  6. Support Staff 7 Posted by Bill Kayser on 10 Jun, 2010 02:02 PM

    Bill Kayser's Avatar

    Pierre, can you please update your gem/plugin and let me know if you still have problems.

  7. Bill Kayser resolved this discussion on 10 Jun, 2010 02:02 PM.

  8. oct re-opened this discussion on 10 Jun, 2010 02:58 PM

  9. 8 Posted by oct on 10 Jun, 2010 02:58 PM

    oct's Avatar

    Hi,

    We have no more crash in the application, that's great ! Thank you for
    your quick fix.

    --
    Pierre.

  10. Bill Kayser resolved this discussion on 10 Jun, 2010 05:26 PM.

Comments are currently closed for this discussion. You can start a new one.