![]() |
|
|
Issue Type:
|
Bug
|
Affects Versions:
|
JRuby 1.7.0.pre1 |
Assignee:
|
Thomas E Enebo
|
Attachments:
|
test.rb, thread_list_race.patch |
Created:
|
27/Jun/12 9:47 AM
|
Description:
|
There is a race condition in the Thread.list function where it is possible to read the list before the thread has been added.
I first saw this issue in JRuby 1.4 and reported it (JRUBY-4307), but the ticket was not solved. I haven't checked to see if the code has changed, but there is still an issue with this functionality in JRuby 1.7.
At the time, in 1.4, it was causing a problem with Active Record connection caching whereby connections were being closed by other threads while still in use because the thread list was incorrect. It only happened under heavy stress. The active record code is still using this functionality but I have not confirmed if the issue is still happening or not. See function clear_stale_cached_connections! (line 196) in jruby-1.7.0.preview1\lib\ruby\gems\shared\gems\activerecord-3.2.3\lib\active_record\connection_adapters\abstract\connection_pool.rb.
Another related ticket is JRUBY-2380.
I am attaching a patch which fixes the issue in my test application.
Thanks,
Simon
|
Environment:
|
Windows 7, hp pavilion dv6
|
Project:
|
JRuby
|
Labels:
|
jruby
|
Priority:
|
Major
|
Reporter:
|
Simon Smith
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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