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

JRuby 1.7.10 (1.9) convertToType exception when calling Enumerable#grep #1330

Closed
kranzky opened this issue Dec 12, 2013 · 14 comments
Closed

Comments

@kranzky
Copy link

kranzky commented Dec 12, 2013

We're currently running a large Rails (3.2.12) app under JRuby 1.7.4 (1.8), and I'm in the process of updating to Rails 3.2.16 / JRuby 1.7.9 (1.9). Unfortunately we're hitting an issue in some of our specs.

Specifically, we're getting a NilClass#to_ary should return Array exception for some specs that call #count on an ActiveRecord query. This bottoms out in ActiveRecord::Calculations#perform_calculation, in the following code:

        unless arel.ast.grep(Arel::Nodes::OuterJoin).empty?
          distinct = true
        end

Now, arel.ast returns a Arel::Nodes::SelectStatement, which is an Enumerable and is not to be confused with an abstract syntax tree :)

It seems that the JRuby implementation of Enumerable#grep, for some Arel::Nodes::SelectStatement instances, causes the aforementioned to_ary exception.

It should be noted that the specs pass under MRI 1.9.3, and that they also pass if I change the above code to do arel.ast.to_a.grep instead.

Any suggestions about what I can do to pinpoint the underlying cause of this issue? It would be nice if this sets of lightbulbs with someone who can help us, but right now I need some direction about what I can do to narrow things down to the root cause. Cheers!

@dmarcotte
Copy link
Contributor

Hey @jasonhutchens, trying to track this down for you, but having some trouble reproducing.

Are you able to provide some code that demonstrates the problem? (It can even be something fairly complicated in a repo I could fork if that easiest for you).

Also: can you post the backtrace from the error?

Thanks in advance! Looking forward to getting to the bottom of this...

@kranzky
Copy link
Author

kranzky commented Dec 14, 2013

Thanks @dmarcotte! Yes, I knew this would be hard to reproduce; it's going to take me a bit of effort to boil it down to something I can share methinks. I was hoping I could short-cut having to do that. Anyway, let me have a go at putting together a repo that demonstrates the issue. Cheers :)

@dmarcotte
Copy link
Contributor

Thanks @jasonhutchens, and sorry to put you to work :)

In the meantime, can you paste the backtrace from the error that your specs are giving? There's at least a chance I'll be able to deduce something from that, potentially saving you the trouble of setting up a repro.

@kranzky
Copy link
Author

kranzky commented Dec 15, 2013

Sure; see below. Note that the last line of our code in the backtrace, ./app/models/company.rb:740, is doing the count: return self.users_with_role("company_admin").count > 0

     TypeError:
       NilClass#to_ary should return Array
     # java/lang/Thread.java:1503:in `getStackTrace'
     # org/jruby/runtime/backtrace/TraceType.java:175:in `getBacktraceData'
     # org/jruby/runtime/backtrace/TraceType.java:39:in `getBacktrace'
     # org/jruby/exceptions/RaiseException.java:212:in `preRaise'
     # org/jruby/exceptions/RaiseException.java:193:in `preRaise'
     # org/jruby/exceptions/RaiseException.java:110:in `<init>'
     # org/jruby/util/TypeConverter.java:122:in `convertToType'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:210:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:206:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/internal/runtime/methods/JavaMethod.java:367:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:202:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:190:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:197:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:108:in `callVarargs'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/internal/runtime/methods/JavaMethod.java:367:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:202:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:190:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:197:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:108:in `callVarargs'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/internal/runtime/methods/JavaMethod.java:367:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:346:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:204:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:190:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:197:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:108:in `callVarargs'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/Helpers.java:479:in `invoke'
     # org/jruby/internal/runtime/methods/JavaMethod.java:350:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/ast/executable/AbstractScript.java:50:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:261:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:366:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:238:in `call'
     # org/jruby/ast/executable/AbstractScript.java:50:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:261:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:366:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:238:in `call'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:141:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:134:in `call'
     # ./app/models/company.rb:740:in `has_company_admin?'
     # ./app/models/company.rb:740:in `has_company_admin?'
     # org/jruby/internal/runtime/methods/JittedMethod.java:141:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:306:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:136:in `call'
     # ./app/models/user.rb:536:in `available_roles'
     # ./app/models/user.rb:536:in `available_roles'
     # org/jruby/ast/executable/AbstractScript.java:42:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # ./app/models/user.rb:467:in `assign_default_roles'
     # ./app/models/user.rb:467:in `assign_default_roles'
     # org/jruby/internal/runtime/methods/JittedMethod.java:141:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:306:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:136:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:336:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:179:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:183:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:281:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:376:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:247:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:251:in `call'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:336:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:179:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:183:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:113:in `callVarargs'
     # org/jruby/ast/executable/AbstractScript.java:42:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:336:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:179:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:188:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:141:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:306:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:136:in `call'
     # org/jruby/ast/executable/AbstractScript.java:42:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:190:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:197:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:108:in `callVarargs'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:144:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:151:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:107:in `callVarargs'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:144:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:151:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:107:in `callVarargs'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/ast/executable/AbstractScript.java:42:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:177:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:183:in `call'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:316:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:145:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:316:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:145:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:144:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:151:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:107:in `callVarargs'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/ast/executable/AbstractScript.java:42:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:190:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:197:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:108:in `callVarargs'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:177:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:188:in `callIter'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/ast/executable/AbstractScript.java:42:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:177:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:183:in `call'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:316:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:145:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:336:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:179:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:188:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:201:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:211:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:222:in `callIter'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:141:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:306:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:136:in `call'
     # org/jruby/ast/CallNoArgNode.java:60:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:112:in `INTERPRET_BLOCK'
     # org/jruby/runtime/Interpreted19Block.java:206:in `evalBlockBody'
     # org/jruby/runtime/Interpreted19Block.java:194:in `yield'
     # org/jruby/runtime/Interpreted19Block.java:125:in `call'
     # org/jruby/runtime/Block.java:101:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:210:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:206:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:316:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:145:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:241:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:211:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:217:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/CompiledBlock19.java:97:in `yieldSpecific'
     # org/jruby/runtime/Block.java:120:in `yieldSpecific'
     # org/jruby/ast/executable/AbstractScript.java:46:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:241:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:211:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:222:in `callIter'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/ast/CallNoArgBlockPassNode.java:53:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:112:in `INTERPRET_BLOCK'
     # org/jruby/runtime/Interpreted19Block.java:206:in `evalBlockBody'
     # org/jruby/runtime/Interpreted19Block.java:194:in `yield'
     # org/jruby/runtime/Interpreted19Block.java:125:in `call'
     # org/jruby/runtime/Block.java:101:in `call'
     # org/jruby/internal/runtime/methods/ProcMethod.java:64:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:210:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:206:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/ast/FCallOneArgNode.java:36:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:112:in `INTERPRET_BLOCK'
     # ./spec/services/activity_creator_spec.rb:168:in `user'
     # org/jruby/runtime/Interpreted19Block.java:206:in `evalBlockBody'
     # org/jruby/runtime/Interpreted19Block.java:194:in `yield'
     # org/jruby/runtime/Interpreted19Block.java:125:in `call'
     # org/jruby/runtime/Block.java:101:in `call'
     # org/jruby/internal/runtime/methods/ProcMethod.java:64:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:202:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:346:in `cacheAndCall'
     # org/jruby/runtime/callsite/SuperCallSite.java:146:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:151:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:177:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:188:in `callIter'
     # org/jruby/runtime/CompiledBlock19.java:159:in `yield'
     # org/jruby/runtime/CompiledBlock19.java:87:in `call'
     # org/jruby/runtime/Block.java:101:in `call'
     # org/jruby/internal/runtime/methods/ProcMethod.java:64:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:202:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:198:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:306:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:136:in `call'
     # org/jruby/ast/VCallNode.java:88:in `interpret'
     # org/jruby/ast/CallNoArgNode.java:60:in `interpret'
     # org/jruby/ast/HashNode.java:109:in `interpret'
     # org/jruby/ast/FCallTwoArgNode.java:38:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:112:in `INTERPRET_BLOCK'
     # ./spec/services/activity_creator_spec.rb:166:in `planned_season'
     # org/jruby/runtime/Interpreted19Block.java:206:in `evalBlockBody'
     # org/jruby/runtime/Interpreted19Block.java:194:in `yield'
     # org/jruby/runtime/Interpreted19Block.java:125:in `call'
     # org/jruby/runtime/Block.java:101:in `call'
     # org/jruby/internal/runtime/methods/ProcMethod.java:64:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:202:in `call'
     # org/jruby/runtime/callsite/SuperCallSite.java:346:in `cacheAndCall'
     # org/jruby/runtime/callsite/SuperCallSite.java:146:in `callBlock'
     # org/jruby/runtime/callsite/SuperCallSite.java:151:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:177:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:188:in `callIter'
     # org/jruby/runtime/CompiledBlock19.java:159:in `yield'
     # org/jruby/runtime/CompiledBlock19.java:87:in `call'
     # org/jruby/runtime/Block.java:101:in `call'
     # org/jruby/internal/runtime/methods/ProcMethod.java:64:in `call'
     # org/jruby/internal/runtime/methods/DynamicMethod.java:202:in `call'
     # org/jruby/internal/runtime/methods/JavaMethod.java:350:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/runtime/CompiledBlock19.java:159:in `yield'
     # org/jruby/runtime/CompiledBlock19.java:145:in `yield'
     # org/jruby/runtime/Block.java:153:in `yieldNonArray'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:112:in `callVarargs'
     # org/jruby/ast/executable/AbstractScript.java:38:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:168:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:141:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:306:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:136:in `call'
     # org/jruby/ast/executable/AbstractScript.java:50:in `__file__'
     # org/jruby/internal/runtime/methods/JittedMethod.java:261:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:366:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:238:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:141:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:134:in `call'
     # org/jruby/runtime/CompiledBlock19.java:117:in `yieldSpecificInternal'
     # org/jruby/runtime/CompiledBlock19.java:92:in `yieldSpecific'
     # org/jruby/runtime/Block.java:111:in `yieldSpecific'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:221:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:202:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/CallBlock19.java:90:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/Helpers.java:479:in `invoke'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/CallBlock19.java:90:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/Helpers.java:479:in `invoke'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/CallBlock19.java:90:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/Helpers.java:479:in `invoke'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/runtime/CompiledBlock19.java:135:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/CallBlock19.java:90:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/internal/runtime/methods/JittedMethod.java:161:in `call'
     # org/jruby/runtime/Helpers.java:479:in `invoke'
     # org/jruby/runtime/callsite/CachingCallSite.java:143:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/internal/runtime/methods/JittedMethod.java:181:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:326:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:170:in `call'
     # org/jruby/ast/CallOneArgNode.java:57:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:112:in `INTERPRET_BLOCK'
     # org/jruby/runtime/Interpreted19Block.java:206:in `evalBlockBody'
     # org/jruby/runtime/Interpreted19Block.java:157:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/CallBlock19.java:90:in `yield'
     # org/jruby/runtime/Block.java:142:in `yield'
     # org/jruby/runtime/callsite/CachingCallSite.java:316:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:145:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:149:in `call'
     # org/jruby/ast/CallNoArgBlockPassNode.java:53:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:74:in `INTERPRET_METHOD'
     # org/jruby/internal/runtime/methods/InterpretedMethod.java:161:in `call'
     # org/jruby/internal/runtime/methods/DefaultMethod.java:190:in `call'
     # org/jruby/runtime/Helpers.java:479:in `invoke'
     # org/jruby/runtime/callsite/CachingCallSite.java:316:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:145:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:154:in `callIter'
     # org/jruby/ast/CallNoArgBlockNode.java:64:in `interpret'
     # org/jruby/ast/CallNoArgNode.java:60:in `interpret'
     # org/jruby/ast/IfNode.java:110:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/ast/BlockNode.java:71:in `interpret'
     # org/jruby/ast/EnsureNode.java:96:in `interpret'
     # org/jruby/ast/BeginNode.java:83:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:112:in `INTERPRET_BLOCK'
     # org/jruby/runtime/Interpreted19Block.java:206:in `evalBlockBody'
     # org/jruby/runtime/Interpreted19Block.java:157:in `yield'
     # org/jruby/runtime/Interpreted19Block.java:135:in `yieldSpecific'
     # org/jruby/runtime/Block.java:120:in `yieldSpecific'
     # org/jruby/ast/YieldOneNode.java:35:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/ast/EnsureNode.java:96:in `interpret'
     # org/jruby/ast/BeginNode.java:83:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/ast/BlockNode.java:71:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:74:in `INTERPRET_METHOD'
     # org/jruby/internal/runtime/methods/InterpretedMethod.java:247:in `call'
     # org/jruby/internal/runtime/methods/DefaultMethod.java:222:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:356:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:213:in `callBlock'
     # org/jruby/runtime/callsite/CachingCallSite.java:222:in `callIter'
     # org/jruby/ast/CallTwoArgBlockNode.java:62:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/ast/BlockNode.java:71:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:74:in `INTERPRET_METHOD'
     # org/jruby/internal/runtime/methods/InterpretedMethod.java:225:in `call'
     # org/jruby/internal/runtime/methods/DefaultMethod.java:214:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:346:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:204:in `call'
     # org/jruby/ast/CallTwoArgNode.java:59:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/ast/IfNode.java:118:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/ast/BlockNode.java:71:in `interpret'
     # org/jruby/ast/EnsureNode.java:96:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:74:in `INTERPRET_METHOD'
     # org/jruby/internal/runtime/methods/InterpretedMethod.java:268:in `call'
     # org/jruby/internal/runtime/methods/DefaultMethod.java:230:in `call'
     # org/jruby/runtime/callsite/CachingCallSite.java:366:in `cacheAndCall'
     # org/jruby/runtime/callsite/CachingCallSite.java:238:in `call'
     # org/jruby/ast/FCallThreeArgNode.java:40:in `interpret'
     # org/jruby/ast/CallNoArgNode.java:60:in `interpret'
     # org/jruby/ast/DAsgnNode.java:110:in `interpret'
     # org/jruby/ast/NewlineNode.java:105:in `interpret'
     # org/jruby/ast/BlockNode.java:71:in `interpret'
     # org/jruby/evaluator/ASTInterpreter.java:112:in `INTERPRET_BLOCK'
     # org/jruby/runtime/Interpreted19Block.java:206:in `evalBlockBody'
     # org/jruby/runtime/Interpreted19Block.java:194:in `yield'
     # org/jruby/runtime/Interpreted19Block.java:125:in `call'
     # org/jruby/runtime/Block.java:101:in `call'
     # org/jruby/Main.java:294:in `internalRun'
     # org/jruby/Main.java:217:in `run'
     # org/jruby/Main.java:197:in `main'

@dmarcotte
Copy link
Contributor

Thanks for posting this @jasonhutchens. Unfortunately, I'm so far still unable to deduce the problem (though perhaps someone else will be inspired), so hopefully you're able to put together a repro. Really looking forward to figuring out what's going on here...

@kranzky
Copy link
Author

kranzky commented Dec 16, 2013

Thanks @dmarcotte for looking at this; will post again once I have a sharable repro repo ;)

@kranzky
Copy link
Author

kranzky commented Feb 19, 2014

Sorry for going dark on this @dmarcotte; I can confirm that the issue still exists under 1.7.10, but I don't have the time at the moment to prepare a repro :(

@dmarcotte
Copy link
Contributor

Thanks for checking in @jasonhutchens, and no worries on the no-repro yet. Totally understand time constraints.

Note that there's no expiry date on a repro being awesome. So as long as this is an issue, if you are able to put something together at any point, it would be fantastic no matter how much time has passed.

And it helps to know it's still outstanding on 1.7.10. Keep me posted on how future versions behave, and if you get a chance to try it out on master, it would be great to know if this also manifests there (if you're using rvm, "rvm use jruby-head" is probably the easiest way to check that).

@kares
Copy link
Member

kares commented Mar 20, 2015

any word whether this is still relevant in latest JRuby 1.7.x or a way to reproduce the issue?

@kranzky
Copy link
Author

kranzky commented Mar 21, 2015

No, our app is no longer on JRuby and so I will not be able to repro this issue, and don't know whether it's still relevant.

@kares kares added this to the Invalid or Duplicate milestone Jan 10, 2016
@kares kares closed this as completed Jan 10, 2016
@kevinmtrowbridge
Copy link

For folks in the future -- I just ran into this bug with jruby-1.7.22 -- and it came up when making an ActiveRecordModel.count call.

@kares
Copy link
Member

kares commented Nov 23, 2016

@kevinmtrowbridge could you pls try for us if it exhibits on latest 1.7 (1.7.26) - in that case would re-open

@kevinmtrowbridge
Copy link

@kares: apologies that it took me a while to try with 1.7.26. However, I did today, and I can confirm that it does not happen for me with 1.7.26 whereas it very much does happen with 1.7.22. So that's pretty cool. This can perhaps be definitively closed.

@kares
Copy link
Member

kares commented Jan 7, 2017

Thanks Kevin for the feedback. This stays closed (resolved somewhere along the line) than ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants