
100% cpu load forever while doing DataMapper.auto_migrate!
Reported by Martin Gamsjaeger (snusnu) | November 10th, 2008 @ 12:34 PM
Hey,
I can't get edge dm-0.9.7 to perform auto_migrate! (and auto_upgrade!) anymore. It always hangs forever with 100% cpu usage when performing DataMapper.auto_migrate! When I hit ctrl-c fast enough (!!) i get this stacktrace: http://www.pastie.org/311534 . When I wait "too long" I don't see any error message!
This happens on: mysql Ver 14.13 Distrib 5.1.20-beta, for apple-darwin8.5.1 (i686) using readline 5.0
Dan Kubb suggested a few days ago (in irc), that this is maybe connected to a bug in extlib/pooling.
Asking on irc, no one else seems to experience this behavior, which is kind of weird. My problem is, that I can't really go back to dm-0.9.6 because I need dm-is-remixable which wasn't part of dm-0.9.6 in the first place, and also doesn't work with dm-0.9.6 (it's not a simple dependency mismatch, there is a problem with auto_migrate! as well)
Any ideas?
Comments and changes to this ticket
-
Martin Gamsjaeger (snusnu) November 10th, 2008 @ 12:49 PM
I thought, well, let's use sqlite3 in the meantime .. here is what I get when doing so (basically the same error):
-
Martin Gamsjaeger (snusnu) November 11th, 2008 @ 10:28 AM
if i add these puts statements to extlib/pooling: http://www.pastie.org/312348 ... it NEVER comes as far as even printing "BBBBB" .... ???
-
Martin Gamsjaeger (snusnu) November 11th, 2008 @ 10:49 AM
Nevermind the last comment, it doesn't seem to have any value ...
-
Martin Gamsjaeger (snusnu) November 11th, 2008 @ 11:27 AM
This is what strace -p $PID gives for the two merb processes that merb -i spawns:
http://www.pastie.org/312248 http://www.pastie.org/312251
The funny thing is, I get these errors on 2 different os's. On my main dev box (OSX Tiger) and on a vanilla ubuntu 8.04 vm with only merb-1.0 dependencies installed. (i.e. dm-0.9.6) ... needless to say it happens with dm-0.9.7 as well!! what's even more funny, dm specs pass without problems ...
I should maybe also mention that this happens for
MyModel.auto_migrate! DataMapper.auto_migrate! rake db:automigrate
-
Martin Gamsjaeger (snusnu) November 11th, 2008 @ 02:23 PM
In the meantime, I also tried like 10 different versions of Extlib::Pooling, starting with the initial version right after importing extlib on github.
The error stays the same (on all os's and all rubies), which makes me kind of believe that pooling has nothing to do with it after all.
-
Martin Gamsjaeger (snusnu) November 11th, 2008 @ 07:08 PM
So extlib/pooling has nothing to with it at all
the :length => (1..n) auto_validation for Model.property causes an infinite loop! The original backtrace also supports that: http://www.pastie.org/311534
I removed the offending auto_validation from the docs wiki!
validates_within :property_name, :set => (1..n)
works fine!
thx again dkubb and bernerdschaefer for tracking this down!
-
Dan Kubb (dkubb) November 11th, 2008 @ 09:34 PM
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »