srushti / goldberg

Goldberg is a lightweight CI server written in Ruby which worries about Bundler & RVM so that you don't have to.
Other
243 stars 29 forks source link

Poller Error "cannot start a transaction within a transaction" #131

Closed pagerc closed 11 years ago

pagerc commented 12 years ago

["/usr/local/rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.5/lib/sqlite3/database.rb:97:in close'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.5/lib/sqlite3/database.rb:97:inensure in prepare'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.5/lib/sqlite3/database.rb:97:in prepare'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.5/lib/sqlite3/database.rb:134:inexecute'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/sqlite3-1.3.5/lib/sqlite3/database.rb:484:in transaction'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/connection_adapters/sqlite_adapter.rb:295:inbegin_db_transaction'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:184:in transaction'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/transactions.rb:208:intransaction'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/transactions.rb:293:in with_transaction_returning_status'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/transactions.rb:241:inblock in save'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/transactions.rb:252:in rollback_active_record_state!'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/transactions.rb:240:insave'", "/opt/goldberg/app/models/project.rb:76:in run_build'", "/opt/goldberg/app/models/init.rb:29:inblock in poll'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/relation.rb:15:in each'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/activerecord-3.1.1/lib/active_record/relation.rb:15:ineach'", "/opt/goldberg/app/models/init.rb:27:in poll'", "/opt/goldberg/app/models/init.rb:39:instart_poller'", "/opt/goldberg/bin/goldberg:41:in block (2 levels) in <main>'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/commander-4.0.7/lib/commander/command.rb:180:incall'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/commander-4.0.7/lib/commander/command.rb:180:in call'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/commander-4.0.7/lib/commander/command.rb:155:inrun'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/commander-4.0.7/lib/commander/runner.rb:402:in run_active_command'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/commander-4.0.7/lib/commander/runner.rb:66:inrun!'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/commander-4.0.7/lib/commander/delegates.rb:11:in run!'", "/usr/local/rvm/gems/ruby-1.9.3-p125/gems/commander-4.0.7/lib/commander/import.rb:10:inblock in <top (required)>'"]

srushti commented 12 years ago

This seems to only happen on 1.9.3. And certainly needs to get fixed.

pahnin commented 12 years ago

How to check this? I mean my system has ruby 1.9.3 installed but I think it uses 1.9.1 while running goldberg! Give me some instructions and I can run goldberg on Virtualmachine

srushti commented 12 years ago

You don't need a Virtualmachine. Basically, you need to make sure you're starting goldberg in 1.9.3. Just make sure that running 'ruby -v' on your prompt (just before you start goldberg) gives you something like 'ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.0]'. After that if you force a build you get this error.

pahnin commented 12 years ago

My ruby -v returns this ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux] its also shown while rails server starts

=> Booting WEBrick => Rails 3.2.6 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2012-06-24 18:59:20] INFO WEBrick 1.3.1 [2012-06-24 18:59:20] INFO ruby 1.9.3 (2012-04-20) [x86_64-linux] [2012-06-24 18:59:20] INFO WEBrick::HTTPServer#start: pid=22238 port=3000

So, I confirm that this error does not show up in every 1.9.3 installations

Thanks

pahnin commented 12 years ago

I confirm that my poller is running and I get no error while force build except error from build itself, because it coudnt install lib-xml and its not related to poller

srushti commented 12 years ago

@pahnin Sure, that means you can't reproduce this issue. Leave this alone, and I'll try and get to it soon.

srushti commented 11 years ago

I can't reproduce this issue either, and I was able to in the past. It looks like this has somehow quietly fixed itself. I'm closing this. @pagerc please let me know if this is still occurring for you.