Issue Type: Bug Bug
Affects Versions: JRuby 1.6.7
Assignee: Thomas E Enebo
Created: 19/Sep/12 10:47 AM
Description:

We've seen this problem periodically, and it's 100% reproducible if you have the right mystery-combination of things in your migration and database. It seems more likely when you have multiple long-running commands. Also to the use of:

execute <<-SQL
...
SQL

In the end, rake is just running a few SQL statements over AR/JDBC, so it's inexplicable to me that you could use up your heap. During normal operation there appears to be no leaking at all, and then, suddenly, one statement completes and it happens all at once.

This latest time when I had a migration/DB combo that reliably reproduced it, I hooked up yourkit and captured a dump on the crash.

What I see is once a particular command completes (in this case, the execution of raw SQL), the heap gets blasted sky high hundreds of megabytes of com.mysql.jdbc.ByteArrayRow, containing i.e.

[0] byte[9] = {49, 54, 54, 57, 50, 49, 51, 50, 55}

There are 93,043 such Object[]s with 4,346,584 byte[][] underneath, most like the one above.

Under some circumstance, something is improperly holding onto data coming back from JDBC.

Environment: JRuby 1.6.7.2/Rails 3.0.11/activerecord-jdbc-adapter (1.2.2)/activerecord-jdbcmysql-adapter (1.2.0)
Project: JRuby
Priority: Major Major
Reporter: David Wood
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

Reply via email to