JIT Compiler breaking with Rails (undefined local variable or method '_erbout'
for #<Proc:0x163d5c5>) . Some class being used exaclty once per request break
Rails when compiled.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: JRUBY-859
URL: http://jira.codehaus.org/browse/JRUBY-859
Project: JRuby
Issue Type: Bug
Components: Compiler
Environment: JRUBY trunk 21/04/07; java 1.6.0_01; Ubuntu Feisty;
Kernel 2.6.20-15-generic
Reporter: Raphael Valyi
The stack is really minimalist:
{noformat}
ActionView::TemplateError (undefined local variable or method '_erbout' for
#<Proc:0x163d5c5>) in app/views/topics/new.rhtml:
(eval):0:in `method_missing'
(eval):0:in `initialize'
{noformat}
Steps to reproduce:
You should really include the fix for SINGLETONS describded in
http://jira.codehaus.org/browse/JRUBY-857 if this isn't fixed already in the
trunk before you can look at that new bug.
Build any Rails application. For instance that one :
http://jira.codehaus.org/browse/JRUBY-831
(a simple application running jdbc and generated with ./script/generate
scaffold_resource Product title:string description:text)
Enable the JIT compiler and set the JIT threshold quite low (-server
-Djruby.jit.logging=true -Djruby.jit.threshold=6 -Djruby.jit.enabled=true for
instance)
Now browse http://localhost:3000/products and start editing or creating
products.
You don't need to really edit or create a product, just hit the 'edit' and
'new' action pages.
After you requested edit or new as many times as the JIT threshold, you'll get
the error.
The last compiled class before it breaks where for me (depending of the
scenarios):
{noformat}
127.0.0.1 - - [21/Apr/2007:23:57:40 CEST] "GET /products/new HTTP/1.1" 200 901
http://localhost:3000/products -> /products/new
compiled: ClassMethods.locking_column
compiled: ClassMethods.reset_locking_column
compiled: Base.ensure_proper_type
compiled: CompiledTemplates._run_rhtml_47app47views47products47new46rhtml
compiled: CleanWithin.clean_within
compiled: TemplateError.file_name
compiled: TemplateError.clean_backtrace
compiled: Base.read_template_file
compiled: Base.compiled_method_name
compiled: Base.template_requires_setup?
compiled: Base.templates_requiring_setup
127.0.0.1 - - [21/Apr/2007:23:57:41 CEST] "GET /products/new HTTP/1.1" 500 2574
http://localhost:3000/products -> /products/new
compiled: Base.request
compiled: Rescue.rescues_path
127.0.0.1 - - [21/Apr/2007:23:57:41 CEST] "GET /products/new HTTP/1.1" 500 2574
http://localhost:3000/products -> /products/new
compiled: TemplateError.source_location
compiled: Base.response
127.0.0.1 - - [21/Apr/2007:23:57:42 CEST] "GET /products/new HTTP/1.1" 500 2574
http://localhost:3000/products -> /products/new
127.0.0.1 - - [21/Apr/2007:23:57:42 CEST] "GET /products/new HTTP/1.1" 500 2574
{noformat}
{noformat}
http://localhost:3000/products/1;edit -> /stylesheets/scaffold.css?1177099717
compiled: DatabaseStatements.add_limit_offset!
compiled: ClassMethods.instantiate_with_callbacks
compiled: CompiledTemplates._run_rhtml_47app47views47products47edit46rhtml
compiled: Base.id
compiled: Base.define_read_method
compiled: Base.read_attribute
compiled: Base.unserializable_attribute?
compiled: Column.text?
compiled: DynamicSegment.extraction_code
compiled: DynamicSegment.extract_value
compiled: DynamicSegment.value_check
compiled: DynamicSegment.expiry_statement
compiled: DynamicSegment.string_structure
compiled: DynamicSegment.interpolation_chunk
compiled: Base.request
compiled: Rescue.rescues_path
127.0.0.1 - - [22/Apr/2007:00:08:32 CEST] "GET /products/1;edit HTTP/1.1" 500
2607
http://localhost:3000/products -> /products/1;edit
compiled: TemplateError.source_location
compiled: Base.response
127.0.0.1 - - [22/Apr/2007:00:08:33 CEST] "GET /products/1;edit HTTP/1.1" 500
2607
{noformat}
Whith new, I bet the problem is probably occuring when creating an ActiveRecord
stub. With edit the stack is empty...
Also very important: once edit or new is bronken, the other will still work for
a few requests, then it breaks as well.
And finnally, the show and index actions have no problem at all.
No idea where the problem comes from.
--
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