test_threaded_nonlocal_return test sometimes fail with an apparent threading 
issue
----------------------------------------------------------------------------------

                 Key: JRUBY-2653
                 URL: http://jira.codehaus.org/browse/JRUBY-2653
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1.2
            Reporter: Charles Oliver Nutter
            Assignee: Thomas E Enebo
             Fix For: JRuby 1.1.3


See the failure here:

{noformat}
test_threaded_nonlocal_return(TestThreadedNonlocalReturn):
NoMethodError: undefined method `<<' for nil:NilClass
    
/export/home/nsieger/bamboo/home/xml-data/build-dir/JRUBY-TRSNAP/maven/jruby/target/test-classes/test/test_threaded_nonlocal_return.rb:16:in
 `test_threaded_nonlocal_return'
    
/export/home/nsieger/bamboo/home/xml-data/build-dir/JRUBY-TRSNAP/maven/jruby/target/test-classes/test/test_threaded_nonlocal_return.rb:16:in
 `times'
    
/export/home/nsieger/bamboo/home/xml-data/build-dir/JRUBY-TRSNAP/maven/jruby/target/test-classes/test/test_threaded_nonlocal_return.rb:16:in
 `test_threaded_nonlocal_return'
{noformat}

I believe this is caused by the lazy initialization of the array 'aggs' as in 
'aggs[j] = []'. My guess is that when multiple threads are doing this, they may 
step on each other by nil'ing a range of values believed to be non-existent 
while at the same time another thread is actually populating them. The fix is 
to pre-initialize all ten slots in the aggs array so there's no cross-thread 
mutation of the aggs array itself.

-- 
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


Reply via email to