NoMemoryError

John Smilanick wrote:

I am using the Openbase adapter and have had a similar glitch here and there, but after I go into production I consistently get an error on one page.

ActionView::TemplateError (NoMemoryError: failed to allocate memory: SELECT * FROM ...

I cannot track down the exact location of the error, but the production log says it was around: /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/connection_adapters/abstract_adapter.rb:120:in `log' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/connection_adapters/openbase_adapter.rb:152:in `execute' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ active_record/connection_adapters/openbase_adapter.rb:222:in `select'

The development WEBrick spits this out occasionally: ruby(3306,0xa000ed98) malloc: *** error for object 0x219ab00: pointer being reallocated was not allocated ruby(3306,0xa000ed98) malloc: *** set a breakpoint in szone_error to debug ruby(3306,0xa000ed98) malloc: *** error for object 0x219ab00: pointer being reallocated was not allocated ruby(3306,0xa000ed98) malloc: *** set a breakpoint in szone_error to debug /usr/local/lib/ruby/1.8/yaml.rb:380: [BUG] Bus Error ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0]

Are these ruby glitches or something in the Openbase connection? Any tips on debugging this problem?

-John

-- John Smilanick Computing Staff - Webmaster Kavli Institute for Theoretical Physics University of California, Santa Barbara jsmilani@kitp.ucsb.edu (805) 893-6307

John - I notice you had this issue a couple of years ago. Do you have any more experience with this problem now?

I had an app which I was close to completing. I ran my functional tests and the terminal window completely froze. Eventually I had to reboot.

After doing so I couldnt get the app to run again so I decided to take this oppourtunity to quickly rebuild the app. There were a couple of changes I wanted to make to the models, nothing major, just changing the max length of fields etc.

When I copied over the tests from the previous app to the new app and ran them I expected to see a few errors reflecting my changes but instead the whole app freezes. I can only run three or four tests at a time or I get this message:

ruby(3339) malloc: *** vm_allocate(size=1069056) failed (error code=3) ruby(3339) malloc: *** error: can't allocate region ruby(3339) malloc: *** set a breakpoint in szone_error to debug ruby(3339) malloc: *** vm_allocate(size=1069056) failed (error code=3) ruby(3339) malloc: *** error: can't allocate region ruby(3339) malloc: *** set a breakpoint in szone_error to debug ruby(3339) malloc: *** vm_allocate(size=1069056) failed (error code=3) ruby(3339) malloc: *** error: can't allocate region ruby(3339) malloc: *** set a breakpoint in szone_error to debug ruby(3339) malloc: *** vm_allocate(size=1069056) failed (error code=3) ruby(3339) malloc: *** error: can't allocate region ruby(3339) malloc: *** set a breakpoint in szone_error to debug [FATAL] failed to allocate memory rake aborted! Command failed with status (1): [/usr/local/bin/ruby -Ilib:test "/usr/local...]

Any ideas on where the problem could be?

thanks Gavin