Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Builder exits unexpectedly #89

Open
crawlik opened this issue Jan 20, 2012 · 2 comments
Open

Builder exits unexpectedly #89

crawlik opened this issue Jan 20, 2012 · 2 comments

Comments

@crawlik
Copy link

crawlik commented Jan 20, 2012

We downloaded /thoughtworks-cruisecontrol.rb-422b3ee from https://github.com/thoughtworks/cruisecontrol.rb/downloads. Got it installed and running but some projects exit unexpectedly. Here is log trace from builder.log.

[fatal] Input/output error
[fatal]   /home/X/cruise/app/models/polling_scheduler.rb:69:in `write'
[fatal]   /home/X/cruise/app/models/polling_scheduler.rb:69:in `puts'
[fatal]   /home/X/cruise/app/models/polling_scheduler.rb:69:in `log_error'
[fatal]   /home/X/cruise/app/models/polling_scheduler.rb:20:in `run'
[fatal]   /home/X/cruise/lib/cruise_control/../../script/builder:86
[fatal]   /home/X/cruise/lib/cruise_control/../../script/builder:85:in `catch'
[fatal]   /home/X/cruise/lib/cruise_control/../../script/builder:85
[fatal]   /home/X/cruise/lib/cruise_control/init.rb:92:in `load'
[fatal]   /home/X/cruise/lib/cruise_control/init.rb:92:in `builder'
[fatal]   /home/X/cruise/lib/cruise_control/init.rb:12:in `send'
[fatal]   /home/X/cruise/lib/cruise_control/init.rb:12:in `run'
[fatal]   /home/X/cruise/cruise:10
[info]  [2012-01-19 23:06:08] Builder for project 'Z' exited

Looks like there an exception which is not handled by this code in script/builder. Guys any recommendations what to do about it?

begin
  project = load_project(project_path)
  startup(project)

  write_to_log_and_console "Builder for project '#{project.name}' started"
  puts "Logging to: #{File.expand_path(CRUISE_OPTIONS[:log_file_name])}"

  while (true) do
    catch(:reload_project) do
      project.scheduler.run
    end
    project = load_project(project_path)
    # this will cause the next call to scheduler to run the build immediately
    project.request_build rescue nil
  end
rescue Interrupt
  # this is okay, we're just control-c'ing the app
rescue Exception => e
  begin
    CruiseControl::Log.fatal(e)
  rescue => logging_error
    STDERR.puts e.message
    STDERR.puts e.backtrace.map { |line| "    #{line}" }
    STDERR.puts "Attempt to log the above error failed with this:"
    STDERR.puts logging_error.message
    STDERR.puts logging_error.backtrace
  end
  CRUISE_OPTIONS[:verbose] ? raise : exit(1)
ensure
  cleanup(project)
end
@owenbyrne
Copy link
Contributor

@crawlik - Which version of rails are you using? From a bit of research it seems that some older versions (2.3.x) may have a bug causing issues with STRERR stream writes in particular circumstances. I'm unable to find much in the way of compelling documentation on the specifics and/or practical fixes. If you are using an older version of rails I'd suggest upgrading if that's possible.

If that isn't a practical solution can you please post the specifics of your environment (ruby version/rails version/platform/anything else special you're doing).

@crawlik
Copy link
Author

crawlik commented Feb 9, 2012

Here is our environment

Ubuntu 10.04
Rails 3.0.7
thin 1.3.1 codename Triple Espress

Cruise started using this command
./cruise start thin -d

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants